Spaces:
Runtime error
Runtime error
Update agent.py
Browse files
agent.py
CHANGED
@@ -847,7 +847,17 @@ def call_llm(state):
|
|
847 |
tool_node = ToolNode(tools)
|
848 |
|
849 |
|
850 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
851 |
|
852 |
builder.add_node("call_llm", call_llm)
|
853 |
builder.add_node("call_tool", tool_node)
|
|
|
847 |
tool_node = ToolNode(tools)
|
848 |
|
849 |
|
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)
|
863 |
builder.add_node("call_tool", tool_node)
|