Spaces:
Sleeping
Sleeping
File size: 438 Bytes
c0f74f5 | 1 2 3 4 5 6 7 8 9 10 11 12 | 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] |