zidankhan's picture
Upload 43 files
c0f74f5 verified
raw
history blame contribute delete
438 Bytes
from langgraph.graph import StateGraph
from langgraph.graph.message import TypedDict,Annotated,Literal
from typing import List,Optional
from operator import add
from langchain_core.messages import BaseMessage
from langchain_core.documents import Document
class AgentGraph(TypedDict):
messages:Annotated[List[BaseMessage],add]
documents:List[Document]
source:Literal["rag","wiki","final"]
api_key: Optional[str]