Spaces:
Running
Running
Update agent.py
Browse files
agent.py
CHANGED
@@ -850,13 +850,13 @@ tool_node = ToolNode(tools)
|
|
850 |
from langgraph.graph import StateGraph
|
851 |
from typing import TypedDict
|
852 |
|
853 |
-
|
854 |
-
|
|
|
|
|
855 |
|
856 |
-
|
857 |
-
|
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)
|