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

LangChain v0.1.0 #572

Merged
merged 5 commits into from
Jan 10, 2024
Merged

LangChain v0.1.0 #572

merged 5 commits into from
Jan 10, 2024

Conversation

dlqqq
Copy link
Member

@dlqqq dlqqq commented Jan 10, 2024

This PR resolves the weird conflict that newer LangChain packages had introduced, documented in #558. This PR re-defines the metaclass used by Pydantic to preserve our class attributes. This means that we are now free to name the class attributes on our providers however we'd like, without having to worry about whether the next version added a Pydantic field or not.

Since most of the effort was in defining and testing the metaclass, it was relatively simple to remove our existing version pins on LangChain and upgrade to langchain>=0.1.0. So I included those changes here as well.

This PR has the added benefit of not introducing any breaking API changes, as it does not rename the Provider.name attribute.

@dlqqq dlqqq force-pushed the resolve-langchain-conflicts branch from 04c985a to f7a752c Compare January 10, 2024 01:58
@dlqqq dlqqq added the enhancement New feature or request label Jan 10, 2024
@dlqqq dlqqq marked this pull request as ready for review January 10, 2024 02:25
@JasonWeill JasonWeill linked an issue Jan 10, 2024 that may be closed by this pull request
Copy link
Collaborator

@JasonWeill JasonWeill left a comment

Choose a reason for hiding this comment

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

Great work!

@dlqqq dlqqq merged commit 814eb44 into jupyterlab:main Jan 10, 2024
9 of 10 checks passed
@dlqqq
Copy link
Member Author

dlqqq commented Jan 10, 2024

@meeseeksdev please backport to 1.x

meeseeksmachine pushed a commit to meeseeksmachine/jupyter-ai that referenced this pull request Jan 10, 2024
dlqqq added a commit that referenced this pull request Jan 10, 2024
Co-authored-by: david qiu <david@qiu.dev>
@dhirschfeld
Copy link
Member

Would love to see this in a release to avoid deps in my environment being downgraded.

@dlqqq
Copy link
Member Author

dlqqq commented Jan 17, 2024

@dhirschfeld Tentatively, we are planning a minor release tomorrow. Thanks for your patience! 🤗

dbelgrod pushed a commit to dbelgrod/jupyter-ai that referenced this pull request Jun 10, 2024
* implement ProviderMetaclass

* add ProviderMetaclass test

* bump langchain to v0.1.0

* migrate import statements deprecated by langchain v0.1

* lint
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upgrade to langchain-0.1.0
4 participants