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

[Fix #3365]: Changed regex to cover new line before action serious #3367

Merged
merged 3 commits into from
Apr 25, 2023

Conversation

My-
Copy link
Contributor

@My- My- commented Apr 22, 2023

Fix for: Changed regex to cover new line before action serious.

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

Changed regex to cover new line before action serious.

regex101: https://regex101.com/r/CXl1kB/1
@My- My- force-pushed the fix-3365_newline_before_action branch from e9dc8f1 to f55905b Compare April 22, 2023 22:42
Copy link
Contributor

@hwchase17 hwchase17 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

@My-
Copy link
Contributor Author

My- commented Apr 24, 2023

thanks!

@hwchase17 no, it is Thank you for this project :)

PS: I run Linter and I hope the build will pass now :)

@My- My- requested a review from hwchase17 April 24, 2023 09:02
@hwchase17 hwchase17 merged commit a4d85f7 into langchain-ai:master Apr 25, 2023
9 checks passed
@ananyatripathi
Copy link

Since this PR got merged I am getting ValueError: Could not parse LLM output: The forecast for Product X at location Y is 233.0 with trend and seasonality is present.. Even if there is no issue with the output

vowelparrot pushed a commit that referenced this pull request 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 pull request 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 pull request 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>
@My-
Copy link
Contributor Author

My- commented May 1, 2023

Since this PR got merged I am getting ValueError: Could not parse LLM output: The forecast for Product X at location Y is 233.0 with trend and seasonality is present.. Even if there is no issue with the output

@ananyatripathi is that all output you are getting? I mean there are no keywords like "Action", "Action Input" or others?

My change should allow having a new line after the keyword which was giving an error before... and to my understanding not having keywords is a ValueError... maybe your string/prompt is final and just missing the "Final Answer" keyword...

Probably you could create an issue and we could continue the discussion there. I might lack experience but I hope I will be able to find how my change could add to the braking change.

yanghua pushed a commit to yanghua/langchain that referenced this pull request 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

Successfully merging this pull request may close these issues.

None yet

4 participants