Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I get this parse error... Maybe needs to escape special chars?: OutputParserException(f"Could not parse LLM output: {text}") langchain.schema.OutputParserException: Could not parse LLM output #29

Open
xXG0DLessXx opened this issue Jun 1, 2023 · 7 comments

Comments

@xXG0DLessXx
Copy link

I keep getting this error. It's fairly random as to when it happens.. Not sure why:

----- Agent Run 1 -----
Prompt: Heyyy whats up?

Entering new AgentExecutor chain...
Traceback (most recent call last):
File "/home/user/Downloads/GirlfriendGPT/main.py", line 86, in
main()
File "/home/user/Downloads/GirlfriendGPT/main.py", line 60, in main
run(
File "/home/user/Downloads/GirlfriendGPT/main.py", line 76, in run_agent
response = agent.create_response(incoming_message=message)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/Downloads/GirlfriendGPT/src/agent/base.py", line 71, in create_response
response = conversation.run(input=incoming_message.text)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/linuxbrew/.linuxbrew/Cellar/[email protected]/3.11.3/lib/python3.11/site-packages/langchain/chains/base.py", line 239, in run
return self(kwargs, callbacks=callbacks)[self.output_keys[0]]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/linuxbrew/.linuxbrew/Cellar/[email protected]/3.11.3/lib/python3.11/site-packages/langchain/chains/base.py", line 140, in call
raise e
File "/home/linuxbrew/.linuxbrew/Cellar/[email protected]/3.11.3/lib/python3.11/site-packages/langchain/chains/base.py", line 134, in call
self._call(inputs, run_manager=run_manager)
File "/home/linuxbrew/.linuxbrew/Cellar/[email protected]/3.11.3/lib/python3.11/site-packages/langchain/agents/agent.py", line 905, in _call
next_step_output = self._take_next_step(
^^^^^^^^^^^^^^^^^^^^^
File "/home/linuxbrew/.linuxbrew/Cellar/[email protected]/3.11.3/lib/python3.11/site-packages/langchain/agents/agent.py", line 749, in _take_next_step
raise e
File "/home/linuxbrew/.linuxbrew/Cellar/[email protected]/3.11.3/lib/python3.11/site-packages/langchain/agents/agent.py", line 742, in _take_next_step
output = self.agent.plan(
^^^^^^^^^^^^^^^^
File "/home/linuxbrew/.linuxbrew/Cellar/[email protected]/3.11.3/lib/python3.11/site-packages/langchain/agents/agent.py", line 426, in plan
return self.output_parser.parse(full_output)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/linuxbrew/.linuxbrew/Cellar/[email protected]/3.11.3/lib/python3.11/site-packages/langchain/agents/conversational/output_parser.py", line 23, in parse
raise OutputParserException(f"Could not parse LLM output: {text}")
langchain.schema.OutputParserException: Could not parse LLM output: `Thought: Do I need to use a tool? No

Alice: Hi there! Not much, just hanging out. How about you?`

@xXG0DLessXx
Copy link
Author

Also, I'm getting this error in telegram sometimes:
An error happened while creating a response: [ObjectNotFound]
Unable to find object id=659F3BC0-5A83-4011-BE28-7772376738F8 handle=?

And also, sometimes the responses are like this:
Oh, that's too bad! Maybe we can find something interesting to talk about together. Do you have any hobbies or interests that you enjoy?" UUID: None

It adds "UUID: None"? Am I doing something wrong?

@sashimirolls
Copy link

Same! I find that it's all in the prompting!

@czs1886
Copy link

czs1886 commented Jul 4, 2023

same here!

@andersonamaral2
Copy link

This error keeps, and no idea what I did in the prompt do cause this.

@amankton
Copy link

Pretty much the same issue here. Running in Anaconda Pronpt. I got this error:
Input: Hello
Traceback (most recent call last):
File "src/api.py", line 135, in
AgentREPL(
File "C:\Users\User\anaconda3\envs\girlfriendgpt\lib\site-packages\steamship\utils\repl.py", line 145, in run
self.run_with_client(client, **kwargs)
File "C:\Users\User\anaconda3\envs\girlfriendgpt\lib\site-packages\steamship\utils\repl.py", line 140, in run_with_client
response = responder(input_text, **kwargs)
File "C:\Users\User\Desktop\GirlfirendGPT\GirlfriendGPT\src\agent\base.py", line 147, in prompt
self.run_agent(None, context) # Maybe I override this
File "C:\Users\User\Desktop\GirlfirendGPT\GirlfriendGPT\src\agent\base.py", line 124, in run_agent
output_messages = self.respond(incoming_message, chat_id, context.client)
File "C:\Users\User\Desktop\GirlfirendGPT\GirlfriendGPT\src\agent\base.py", line 99, in respond
response = conversation.run(input=incoming_message.text)
File "C:\Users\User\anaconda3\envs\girlfriendgpt\lib\site-packages\langchain\chains\base.py", line 270, in run
return self(kwargs, callbacks=callbacks, tags=tags)[self.output_keys[0]]
File "C:\Users\User\anaconda3\envs\girlfriendgpt\lib\site-packages\langchain\chains\base.py", line 149, in call
raise e
File "C:\Users\User\anaconda3\envs\girlfriendgpt\lib\site-packages\langchain\chains\base.py", line 143, in call
self._call(inputs, run_manager=run_manager)
File "C:\Users\User\anaconda3\envs\girlfriendgpt\lib\site-packages\langchain\agents\agent.py", line 957, in _call
next_step_output = self._take_next_step(
File "C:\Users\User\anaconda3\envs\girlfriendgpt\lib\site-packages\langchain\agents\agent.py", line 773, in _take_next_step
raise e
File "C:\Users\User\anaconda3\envs\girlfriendgpt\lib\site-packages\langchain\agents\agent.py", line 762, in _take_next_step
output = self.agent.plan(
File "C:\Users\User\anaconda3\envs\girlfriendgpt\lib\site-packages\langchain\agents\agent.py", line 444, in plan
return self.output_parser.parse(full_output)
File "C:\Users\User\anaconda3\envs\girlfriendgpt\lib\site-packages\langchain\agents\conversational\output_parser.py", line 23, in parse
raise OutputParserException(f"Could not parse LLM output: {text}")
langchain.schema.OutputParserException: Could not parse LLM output: Sacha: Hey there! How's it going? I'm Sacha, by the way. What's your name? 😊

@gapizaver
Copy link

Any updates on this?

@gapizaver
Copy link

This has been fixed in the latest version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants