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

Terminal tool gives ValueError: Could not parse LLM output: when there is a new libe before action string. #3365

Closed
My- opened this issue Apr 22, 2023 · 1 comment

Comments

@My-
Copy link
Contributor

My- commented Apr 22, 2023

While playing with the LLaMA models I noticed what parse exception was thrown even output looked good.

Screenshot

Screenshot_20230422_220902

For curious one the prompt I used was:

agent({"input":"""
There is a file in `~/.bashrc.d/` directory containing openai api key.
Can you find that key?
"""})
@My-
Copy link
Contributor Author

My- commented Apr 22, 2023

I have a fix. Will create PR shortly.

My- pushed a commit to My-/langchain that referenced this issue Apr 22, 2023
Changed regex to cover new line before action serious.

regex101: https://regex101.com/r/CXl1kB/1
vowelparrot pushed a commit that referenced this issue Apr 26, 2023
…3367)

Fix for: [Changed regex to cover new line before action
serious.](#3365)
---

This PR fixes the issue where `ValueError: Could not parse LLM output:`
was thrown on seems to be valid input.

Changed regex to cover new lines before action serious (after the
keywords "Action:" and "Action Input:").

regex101: https://regex101.com/r/CXl1kB/1

---------

Co-authored-by: msarskus <msarskus@cisco.com>
vowelparrot pushed a commit that referenced this issue Apr 28, 2023
…3367)

Fix for: [Changed regex to cover new line before action
serious.](#3365)
---

This PR fixes the issue where `ValueError: Could not parse LLM output:`
was thrown on seems to be valid input.

Changed regex to cover new lines before action serious (after the
keywords "Action:" and "Action Input:").

regex101: https://regex101.com/r/CXl1kB/1

---------

Co-authored-by: msarskus <msarskus@cisco.com>
samching pushed a commit to samching/langchain that referenced this issue May 1, 2023
…n serious (langchain-ai#3367)

Fix for: [Changed regex to cover new line before action
serious.](langchain-ai#3365)
---

This PR fixes the issue where `ValueError: Could not parse LLM output:`
was thrown on seems to be valid input.

Changed regex to cover new lines before action serious (after the
keywords "Action:" and "Action Input:").

regex101: https://regex101.com/r/CXl1kB/1

---------

Co-authored-by: msarskus <msarskus@cisco.com>
yanghua pushed a commit to yanghua/langchain that referenced this issue May 9, 2023
…n serious (langchain-ai#3367)

Fix for: [Changed regex to cover new line before action
serious.](langchain-ai#3365)
---

This PR fixes the issue where `ValueError: Could not parse LLM output:`
was thrown on seems to be valid input.

Changed regex to cover new lines before action serious (after the
keywords "Action:" and "Action Input:").

regex101: https://regex101.com/r/CXl1kB/1

---------

Co-authored-by: msarskus <msarskus@cisco.com>
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

1 participant