Chainlit / cookbook

Chainlit's cookbook repo
https://github.com/Chainlit/chainlit
713 stars 270 forks source link

Unable to parse output in `langchain-ask-human` example #58

Open gameveloster opened 8 months ago

gameveloster commented 8 months ago

Tried running the langchain-ask-human example provided at https://github.com/Chainlit/cookbook/blob/b0e0a0c6f78c5ab69c10d32d6763bea9871ee69e/langchain-ask-human/app.py

However, when I ask the question I need to order pizza for a hackathon. How many should I order? just like in the video ask-human.mp4, I get the error

An output parsing error occurred. In order to pass this error back to the agent and have it try again, pass handle_parsing_errors=True to the AgentExecutor. This is the error: Could not parse LLM output: Thought: I should ask a human for guidance.
Action:
{
"action": "human",
"action_input": "How many people are attending the hackathon?"
}

Anyone knows the solution to this? Thanks


My packages:

chainlit                                 0.7.700
langchain                                0.0.352
langchain-community                      0.0.6
langchain-core                           0.1.3
openai                                   0.27.4
willydouhard commented 8 months ago

what model are you using? It looks like the model is not able to produce a correct output format.

gameveloster commented 8 months ago

@willydouhard gpt-3.5-turbo, which is the default for ChatOpenAI and OpenAI since the example did not specify a model.

Any suggestions on which 7B open weights model is suitable for this task?

willydouhard commented 8 months ago

You can try mistral instruct. You can also try gpt 4 quickly just to check if it fixes the bug