EniasCailliau / GirlfriendGPT

Girlfriend GPT is a Python project to build your own AI girlfriend using ChatGPT4.0
https://gptgirlfriend.online
2.58k stars 437 forks source link

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 1 year ago

xXG0DLessXx commented 1 year ago

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/python@3.11/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/python@3.11/3.11.3/lib/python3.11/site-packages/langchain/chains/base.py", line 140, in call raise e File "/home/linuxbrew/.linuxbrew/Cellar/python@3.11/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/python@3.11/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/python@3.11/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/python@3.11/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/python@3.11/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/python@3.11/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 commented 1 year ago

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 commented 1 year ago

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

czs1886 commented 1 year ago

same here!

andersonamaral2 commented 1 year ago

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

amankton commented 1 year ago

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 commented 1 year ago

Any updates on this?

gapizaver commented 1 year ago

This has been fixed in the latest version.