File size: 958 Bytes
f3ee24f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21

# ══════════════════════════════════════════════════════════════════════════════
# FILE: agent/state.py
# ══════════════════════════════════════════════════════════════════════════════

from typing import TypedDict, Annotated, List, Optional
from langchain_core.messages import BaseMessage
import operator

class AgentState(TypedDict):
    messages: Annotated[List[BaseMessage], operator.add]
    current_node: str
    model_name: str
    session_id: str
    hf_token: str
    iteration_count: int
    should_end: bool
    final_answer: Optional[str]
    error: Optional[str]
    conversation_history: List[dict]
    pending_tool: Optional[dict]