wt002 commited on
Commit
4aededf
·
verified ·
1 Parent(s): c754c7a

Update agent.py

Browse files
Files changed (1) hide show
  1. agent.py +6 -6
agent.py CHANGED
@@ -850,13 +850,13 @@ tool_node = ToolNode(tools)
850
  from langgraph.graph import StateGraph
851
  from typing import TypedDict
852
 
853
- class InputSchema(TypedDict):
854
- question: str
 
 
855
 
856
- class OutputSchema(TypedDict):
857
- answer: str
858
-
859
- builder = StateGraph(input_schema=InputSchema, output_schema=OutputSchema)
860
 
861
 
862
  builder.add_node("call_llm", call_llm)
 
850
  from langgraph.graph import StateGraph
851
  from typing import TypedDict
852
 
853
+ # Define the state schema
854
+ class AgentState(TypedDict):
855
+ input: str
856
+ result: str
857
 
858
+ # Create the state graph builder with state_schema
859
+ builder = StateGraph(AgentState)
 
 
860
 
861
 
862
  builder.add_node("call_llm", call_llm)