Fix langgraph kwargs error
Build Agents Runtime / build (push) Successful in 4m22s Details

This commit is contained in:
Deep Koluguri 2026-06-28 14:48:24 -04:00
parent 188fa5a388
commit 6057da51cb
1 changed files with 2 additions and 1 deletions

View File

@ -75,6 +75,7 @@ If the user asks to scrape utility data, run the utility scraper, or fetch utili
If they ask for a reminder, use the `set_reminder` tool and pass {target_jid} as the target_jid!
"""
agent = create_react_agent(llm, tools, state_modifier=system_prompt)
# Use state_modifier or prompt depending on langgraph version, falling back to older syntax if needed.
agent = create_react_agent(llm, tools, messages_modifier=system_prompt)
result = agent.invoke({"messages": [("user", user_request)]})
return result["messages"][-1].content