feat(workers): Define WorkerState for the Researcher subgraph
This commit is contained in:
21
backend/src/ea_chatbot/graph/workers/researcher/state.py
Normal file
21
backend/src/ea_chatbot/graph/workers/researcher/state.py
Normal file
@@ -0,0 +1,21 @@
|
||||
from typing import TypedDict, List, Dict, Any, Optional
|
||||
from langchain_core.messages import BaseMessage
|
||||
|
||||
class WorkerState(TypedDict):
|
||||
"""Internal state for the Researcher worker subgraph."""
|
||||
|
||||
# Internal worker conversation
|
||||
messages: List[BaseMessage]
|
||||
|
||||
# The specific sub-task assigned by the Orchestrator
|
||||
task: str
|
||||
|
||||
# Search context
|
||||
queries: List[str]
|
||||
raw_results: List[str]
|
||||
|
||||
# Number of internal retry/refinement attempts
|
||||
iterations: int
|
||||
|
||||
# The final research summary to return to the Orchestrator
|
||||
result: Optional[str]
|
||||
Reference in New Issue
Block a user