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

Remove deprecated chain #306

Merged
merged 4 commits into from
Jul 20, 2024

Conversation

Sachin-Bhat
Copy link
Contributor

@Sachin-Bhat Sachin-Bhat commented Jul 16, 2024

Hey @eyurtsev

Here are the listed changes:

  • kor/extraction/api.py: Removed deprecated LLMChain and arun and instead replaced them with RunnableSequence and ainvoke respectively, Added set_verbose context to set the verbosity within the context of a function to mimic the old chain_kwargs verbose functionality.
  • tests/extraction/test_extraction_with_chain.py: Removed deprecated LLMChain, mimic langchain.verbose with get_verbose()

Please let me know if any changes need to be made. Merging this fixes #305.

Cheers,
Sachin

@Sachin-Bhat Sachin-Bhat marked this pull request as draft July 16, 2024 03:38
@Sachin-Bhat Sachin-Bhat marked this pull request as ready for review July 16, 2024 03:38
@eyurtsev
Copy link
Owner

Awesome, I'll confirm this works and make this a breaking release since .run interface won't be available anymore

@Sachin-Bhat Sachin-Bhat changed the title Feature remove deprecated chain Remove deprecated chain Jul 17, 2024
@Sachin-Bhat
Copy link
Contributor Author

Hey @eyurtsev,

Do let me know if any changes need to be made from my side.

Cheers,
Sachin

@eyurtsev eyurtsev self-requested a review July 20, 2024 01:48
@eyurtsev eyurtsev merged commit d170c68 into eyurtsev:main Jul 20, 2024
9 checks passed
@Sachin-Bhat
Copy link
Contributor Author

Hey @eyurtsev

Are we looking at a new release with this merge?

Cheers,
Sachin

@eyurtsev
Copy link
Owner

Yep, but there are a few remaining issues to resolve. I'm updating the documentation right now.

I deprecated verbose functionality, and looking at how to get the prompt out of the chain since we lost that

@eyurtsev eyurtsev mentioned this pull request Jul 20, 2024
@Sachin-Bhat
Copy link
Contributor Author

Maybe langchain.globals.set_verbose(bool) is an avenue to explore within the context of the function?

@eyurtsev eyurtsev mentioned this pull request Jul 20, 2024
@eyurtsev
Copy link
Owner

Maybe langchain.globals.set_verbose(bool) is an avenue to explore within the context of the function?

The context needs to be set at chain run time rather than chain creation time.

The best way to do this with runnables is by passing a callback or langchain_core.globals.set_verbose / set_debug.

@eyurtsev
Copy link
Owner

Released #311

@eyurtsev
Copy link
Owner

Thanks for your help!

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.

LLMChain is deprecated
2 participants