Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -34,7 +34,7 @@ def create_langgraph_agent():
|
|
| 34 |
# 3. Agentin solmu (kutsuu kielimallia)
|
| 35 |
def agent_node(state):
|
| 36 |
print("Calling agent node...")
|
| 37 |
-
return {"messages": [llm_with_tools.invoke(state["messages"])]}
|
| 38 |
|
| 39 |
# 4. Työkalusolmu
|
| 40 |
tool_node = ToolNode(tools)
|
|
@@ -49,7 +49,8 @@ def create_langgraph_agent():
|
|
| 49 |
graph.add_edge("tools", "agent")
|
| 50 |
|
| 51 |
# 6. Graafin kääntäminen ja turvarajan asettaminen
|
| 52 |
-
app = graph.compile(recursion_limit=15)
|
|
|
|
| 53 |
print("LangGraph agent compiled and ready.")
|
| 54 |
return app
|
| 55 |
|
|
|
|
| 34 |
# 3. Agentin solmu (kutsuu kielimallia)
|
| 35 |
def agent_node(state):
|
| 36 |
print("Calling agent node...")
|
| 37 |
+
return {"messages": [llm_with_tools.invoke(state["messages"]) ]}
|
| 38 |
|
| 39 |
# 4. Työkalusolmu
|
| 40 |
tool_node = ToolNode(tools)
|
|
|
|
| 49 |
graph.add_edge("tools", "agent")
|
| 50 |
|
| 51 |
# 6. Graafin kääntäminen ja turvarajan asettaminen
|
| 52 |
+
- app = graph.compile(recursion_limit=15)
|
| 53 |
+
+ app = graph.compile()
|
| 54 |
print("LangGraph agent compiled and ready.")
|
| 55 |
return app
|
| 56 |
|