Update tools.py
Browse files
tools.py
CHANGED
@@ -57,8 +57,8 @@ def create_calculator_tool() -> Graph:
|
|
57 |
|
58 |
return {"output": output}
|
59 |
|
60 |
-
# Create the graph
|
61 |
-
workflow = StateGraph()
|
62 |
|
63 |
# Add the calculator tool node
|
64 |
workflow.add_node("calculator", ToolNode(calculator_function))
|
@@ -100,8 +100,8 @@ def create_search_tool() -> Graph:
|
|
100 |
|
101 |
return {"output": output}
|
102 |
|
103 |
-
# Create the graph
|
104 |
-
workflow = StateGraph()
|
105 |
|
106 |
# Add the search tool node
|
107 |
workflow.add_node("search", ToolNode(search_function))
|
|
|
57 |
|
58 |
return {"output": output}
|
59 |
|
60 |
+
# Create the graph with state schema
|
61 |
+
workflow = StateGraph(dict)
|
62 |
|
63 |
# Add the calculator tool node
|
64 |
workflow.add_node("calculator", ToolNode(calculator_function))
|
|
|
100 |
|
101 |
return {"output": output}
|
102 |
|
103 |
+
# Create the graph with state schema
|
104 |
+
workflow = StateGraph(dict)
|
105 |
|
106 |
# Add the search tool node
|
107 |
workflow.add_node("search", ToolNode(search_function))
|