This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en" class="scroll-smooth"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Intelligent Address Validation Platform</title> | |
<script src="https://cdn.tailwindcss.com"></script> | |
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script> | |
<link rel="preconnect" href="https://fonts.googleapis.com"> | |
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# --- config.py --- | |
import os | |
from pydantic_settings import BaseSettings | |
from dotenv import load_dotenv | |
import datetime | |
load_dotenv() | |
class Settings(BaseSettings): | |
""" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import asyncio | |
import pickle | |
import time # Needed for TTL calculation example | |
from datetime import datetime, timezone, timedelta # Needed for TTL calculation example | |
from contextlib import asynccontextmanager | |
from typing import AsyncGenerator, Optional, Sequence, Tuple, Dict, Any, List, Union, TypedDict # Added TypedDict | |
import aiobotocore.session | |
from botocore.exceptions import ClientError | |
from boto3.dynamodb.types import TypeDeserializer, TypeSerializer |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Configuration for evaluating a chatbot endpoint with DeepEval & Bedrock Judge | |
judge_config: | |
type: bedrock # Only Bedrock judge supported currently | |
config: | |
model_id: "anthropic.claude-3-haiku-20240307-v1:0" # Replace with your judge model ID | |
# Optional: override default generation params for judge | |
# max_tokens: 512 | |
# temperature: 0.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
project/ | |
│ | |
├── state.py # Defines the agent's state | |
├── prompts.py # Manages prompt templates | |
├── config.py # Handles configuration and initialization | |
├── tools.py # Contains utility functions and tools | |
├── guardrails.py # Implements safety checks | |
├── nodes.py # Defines workflow nodes for LangGraph | |
├── workflow.py # Orchestrates the main workflow using LangGraph |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
from typing import TypedDict, Annotated, Literal, List | |
from langchain_aws import ChatBedrock | |
from langchain_community.vectorstores import PGVector | |
from langchain_core.messages import HumanMessage, AIMessage | |
from langchain_core.tools import tool | |
from langgraph.graph import StateGraph, END | |
from langgraph.checkpoint.memory import MemorySaver | |
from langchain_openai import OpenAIEmbeddings | |
import operator |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
NewerOlder