langchain icon indicating copy to clipboard operation
langchain copied to clipboard

Bug with parsing

Open vforv opened this issue 1 year ago • 1 comments

I am using this example https://langchain.readthedocs.io/en/latest/modules/chat/examples/agent.html with my data If I am not using Chat (ChatOpenAI) it works without issue So probably some issue how you handling output

Entering new AgentExecutor chain...
DEBUG:Chroma:time to pre process our knn query: 1.430511474609375e-06
DEBUG:Chroma:time to run knn query: 0.0008881092071533203
Thought: I am not sure if I was created by AA or not. I need to use the QA System to find out.

Action: QA System

Action Input: .....
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
[<ipython-input-52-e127e5158c61>](https://localhost:8080/#) in <module>
----> 1 agent_executor.run("Are you create by OpenAI?")

8 frames
[/usr/local/lib/python3.9/dist-packages/langchain/agents/mrkl/base.py](https://localhost:8080/#) in get_action_and_input(llm_output)
     44     match = re.search(regex, llm_output, re.DOTALL)
     45     if not match:
---> 46         raise ValueError(f"Could not parse LLM output: `{llm_output}`")
     47     action = match.group(1).strip()
     48     action_input = match.group(2)

ValueError: Could not parse LLM output: `Based on the information available to me

vforv avatar Mar 15 '23 11:03 vforv

This issue is a duplicate of #1477.

claust avatar Mar 15 '23 19:03 claust

Hi, @vforv! I'm Dosu, and I'm here to help the LangChain team manage their backlog. I wanted to let you know that we are marking this issue as stale.

From what I understand, you reported a bug related to parsing in the code provided by the user. The issue involves the output handling in the ChatOpenAI example, which leads to a ValueError when trying to parse the LLM output. Claust commented that this issue is a duplicate of #1477, so it seems that there is already a similar issue being addressed.

Before we close this issue, we wanted to check with you if it is still relevant to the latest version of the LangChain repository. If it is, please let us know by commenting on the issue. Otherwise, feel free to close the issue yourself or it will be automatically closed in 7 days.

Thank you for your contribution to the LangChain repository!

dosubot[bot] avatar Aug 24 '23 16:08 dosubot[bot]