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

Upgrade to LangChain v0.3 and Pydantic v2 #1201

Merged
merged 2 commits into from
Jan 15, 2025

Conversation

dlqqq
Copy link
Member

@dlqqq dlqqq commented Jan 14, 2025

Description

remove importliner from project

initial upgrade to langchain~=0.3, pydantic~=2.0

default to `None` for all `Optional` fields explicitly

fix history impl for Pydantic v2, fixes chat

prefer `.model_dump_json()` over `.json()`

Addresses a Pydantic v2 deprecation warning, as `BaseModel.json()` is
now deprecated in favor of `BaseModel.model_dump_json()`.

replace `.dict()` with `.model_dump()`.

`BaseModel.dict()` is deprecated in favor of `BaseModel.model_dump()` in
Pydantic v2.

fix BaseProvider.server_settings

fix OpenRouterProvider

fix remaining unit tests

address all Pydantic v1 deprecation warnings

pre-commit

fix mypy
@dlqqq dlqqq added the enhancement New feature or request label Jan 14, 2025
@dlqqq dlqqq added this to the v3.0.0a1 milestone Jan 14, 2025
@dlqqq
Copy link
Member Author

dlqqq commented Jan 14, 2025

For some reason the Lint Python imports job was triggered, and is stalling CI. I'm going to kick this and see what happens.

@dlqqq dlqqq closed this Jan 14, 2025
@dlqqq dlqqq reopened this Jan 14, 2025
@dlqqq dlqqq merged commit 479a480 into jupyterlab:main Jan 15, 2025
15 checks passed
@dlqqq dlqqq deleted the v3-langchain-030 branch January 15, 2025 22:12
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.

1 participant