Update tools.py
Browse files
tools.py
CHANGED
@@ -70,11 +70,15 @@ def create_calculator_tool() -> Graph:
|
|
70 |
"operation": input_data["operation"]
|
71 |
}
|
72 |
}
|
73 |
-
|
74 |
workflow = StateGraph(state_schema=CalculatorState)
|
|
|
75 |
workflow.add_node("calculator", ToolNode(calculator_function))
|
|
|
76 |
workflow.set_entry_point("calculator")
|
|
|
77 |
workflow.set_finish_point("calculator")
|
|
|
78 |
print("Calculator workflow created and compiled")
|
79 |
return workflow.compile()
|
80 |
|
|
|
70 |
"operation": input_data["operation"]
|
71 |
}
|
72 |
}
|
73 |
+
print("Calculator function defined")
|
74 |
workflow = StateGraph(state_schema=CalculatorState)
|
75 |
+
print("Calculator workflow created")
|
76 |
workflow.add_node("calculator", ToolNode(calculator_function))
|
77 |
+
print("Calculator tool node added")
|
78 |
workflow.set_entry_point("calculator")
|
79 |
+
print("Calculator workflow set entry point")
|
80 |
workflow.set_finish_point("calculator")
|
81 |
+
print("Calculator workflow set finish point")
|
82 |
print("Calculator workflow created and compiled")
|
83 |
return workflow.compile()
|
84 |
|