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

chore: Use run instead of predict_and_parse #188

Merged
merged 1 commit into from
Jul 11, 2023

Conversation

BorisWilhelms
Copy link
Contributor

Related issue #185

This PR set the KorParser as the OutputParser on the LLMChain. This is needed, since predict_and_parse on the LLMChain is deprecated and run should be used. For this minimum LangChain version is raised to 0.0.205.

This PR includes

  • Needed changes to code
  • Needed change to documentation
  • A minimal integration test (needs OpenAI API key) to be sure, things are still working correct

@eyurtsev
Copy link
Owner

eyurtsev commented Jul 8, 2023

Thanks for all your efforts very much appreciated! I'll try to merge on Monday!

@eyurtsev
Copy link
Owner

Sorry took a while -- was trying to figure out whether to use call method vs. run method and type mismatches on the run method. Code looks good! Thanks!

@@ -0,0 +1,33 @@
from langchain.chat_models import ChatOpenAI
Copy link
Owner

Choose a reason for hiding this comment

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

Any objections if I re-write as a unit test instead of an integration test? I think a mock response from open AI will work well for this test case?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No objections, feed free to re-write the test.

@eyurtsev eyurtsev merged commit ba20aa1 into eyurtsev:main Jul 11, 2023
@BorisWilhelms BorisWilhelms deleted the predict_and_parse-deprecated branch July 11, 2023 08:19
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.

2 participants