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

migrate to langchain-core 0.3 (langchain_core.pydantic_v1 removal) #101

Merged
merged 33 commits into from
Sep 18, 2024

Conversation

baskaryan
Copy link
Contributor

No description provided.

@mattf mattf changed the title start v0.3 migration migrate to langchain-core 0.3 (langchain_core.pydantic_v1 removal) Sep 17, 2024
@mattf mattf changed the base branch from main to dev-v0.3 September 17, 2024 10:39
@mattf mattf self-assigned this Sep 18, 2024
@mattf
Copy link
Collaborator

mattf commented Sep 18, 2024

@baskaryan ptal

Comment on lines +55 to +57
model_config = ConfigDict(
arbitrary_types_allowed=True,
)
Copy link
Contributor

Choose a reason for hiding this comment

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

We can also add protected_namespaces=() to remove warnings if we want to keep existing field names

Suggested change
model_config = ConfigDict(
arbitrary_types_allowed=True,
)
model_config = ConfigDict(
arbitrary_types_allowed=True,
protected_namespaces=(),
)

We did this on all instances of RunnableSerializable in langchain-core.

Copy link
Collaborator

Choose a reason for hiding this comment

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

i considered that and figured this since is internal code (not user visible), it was fine to leave the namespace protection in place.

unfortunately, i didn't see a way to exclude a specific field, which would be the best solution imho.

@@ -26,7 +26,7 @@ pytest-mock = "^3.10.0"
syrupy = "^4.0.2"
pytest-watcher = "^0.3.4"
pytest-asyncio = "^0.21.1"
langchain-core = { git = "https://github.com/langchain-ai/langchain.git", subdirectory = "libs/core", tag = "langchain-core==0.2.40" }
Copy link
Contributor

Choose a reason for hiding this comment

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

wondering if we still want to install from source for test dependencies (e.g., remove specification of tag)

Copy link
Collaborator

Choose a reason for hiding this comment

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

i agree, i'll make the change.

@mattf mattf merged commit ed8dfd0 into dev-v0.3 Sep 18, 2024
12 checks passed
@mattf mattf deleted the bagatur/start_v0.3 branch September 18, 2024 21:05
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.

3 participants