You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
All in all, this example is inspirational, but doesn't really hit the mark in terms of a recommended approach for building a ReAct agent with LangChain/LangGraph
The text was updated successfully, but these errors were encountered:
And I added the HumanInputChainlit tool (with some logging)
App logs show the tool class being called but I am never prompted in the UI nor do I see log message to indicate response is returned...it's just hanging.
logger.debug(f"query: {query}")
res = run_sync(cl.AskUserMessage(content=query).send())
logger.debug(f"response: {res}")
I have verified the LangGraph logic by creating a Jupyter notebook (that approach uses the built-in input instead of AskUserMessage) - this problem is unique to running in the Chainlit server.
This example calls
initialize_agent
function: https://github.com/Chainlit/cookbook/blob/main/langchain-ask-human/app.py#L55But that is deprecated: https://github.com/langchain-ai/langchain/blob/2ab5673eb1eae4a8945ed090d81b6f47e4639d58/libs/langchain/langchain/agents/initialize.py#L15-L22
In fact, the alternative suggested
create_react_agent
is also not recommended: https://github.com/langchain-ai/langchain/blob/2ab5673eb1eae4a8945ed090d81b6f47e4639d58/libs/langchain/langchain/agents/react/agent.py#L30-L34And using langgraph prebuilt is recommended: https://github.com/langchain-ai/langgraph/blob/6906e12edb551162f5fede5d9f55b4bb206bb59c/libs/langgraph/langgraph/prebuilt/chat_agent_executor.py#L197
All in all, this example is inspirational, but doesn't really hit the mark in terms of a recommended approach for building a ReAct agent with LangChain/LangGraph
The text was updated successfully, but these errors were encountered: