manasajanj's picture
rename state to state.py
81a861c verified
import operator
from typing import Annotated, TypedDict, List, Optional
from langchain_core.messages import BaseMessage
class AgentState(TypedDict):
"""
state passed between every node in the graph.
Fields
-----
messages: Includes conversation history without replacing.
task_id: Unique task Identifier of GAIA
question: random ques from GAIA API
level: The difficulty level of the task
file_name: Optional filename attached to the question
answer: The extracted answer
"""
messages: Annotated[List[BaseMessage], operator.add]
task_id: str
question: str
level: str
file_name: str
answer: str
file_name: Optional[str]
answer: Optional[str]