-
-
Notifications
You must be signed in to change notification settings - Fork 339
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
Pydantic v1 and v2 compatibility #466
Conversation
@JasonWeill |
We talked about this earlier today: depending on LangChain's Following the guidance from LangChain, users who are building on top of Jupyter AI will be expected to use Pydantic v1 classes, to prevent conflicts. This is in LangChain's docs about Pydantic v1, which I link to from our docs as revised in this PR. |
This reverts commit f24bb76.
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
3476063
to
b634eb8
Compare
@meeseeksdev please backport to 1.x |
Owee, I'm MrMeeseeks, Look at me. There seem to be a conflict, please backport manually. Here are approximate instructions:
And apply the correct labels and milestones. Congratulations — you did some good work! Hopefully your backport PR will be tested by the continuous integration and merged soon! Remember to remove the If these instructions are inaccurate, feel free to suggest an improvement. |
* Revert "Copy edits for Jupyternaut messages" This reverts commit f24bb76. * Uses langchain.pydantic_v1 for compatibility * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Removes pydantic as a dependency, now that we use it via langchain * Adds developer docs, removes remaining dependency * Doc edits per @dlqqq * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> (cherry picked from commit 2c89d13)
* Revert "Copy edits for Jupyternaut messages" This reverts commit f24bb76. * Uses langchain.pydantic_v1 for compatibility * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Removes pydantic as a dependency, now that we use it via langchain * Adds developer docs, removes remaining dependency * Doc edits per @dlqqq * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> (cherry picked from commit 2c89d13)
* Revert "Copy edits for Jupyternaut messages" This reverts commit f24bb76. * Uses langchain.pydantic_v1 for compatibility * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Removes pydantic as a dependency, now that we use it via langchain * Adds developer docs, removes remaining dependency * Doc edits per @dlqqq * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Revert "Copy edits for Jupyternaut messages" This reverts commit f24bb76. * Uses langchain.pydantic_v1 for compatibility * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Removes pydantic as a dependency, now that we use it via langchain * Adds developer docs, removes remaining dependency * Doc edits per @dlqqq * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Fixes #390. Allows Pydantic v1 or v2 to be used with Jupyter AI. Internally, Jupyter AI continues to use Pydantic v1, but using the
langchain.pydantic_v1
package, we can import thepydantic.v1
package if the user has Pydantic v2 installed.Updates the user docs to refer to the Pydantic compatibility guide in LangChain.