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

FEAT: Upgrade langchain (0.3.x) and associated packages including langchain-astradb #4229

Merged
merged 8 commits into from
Oct 22, 2024

Conversation

erichare
Copy link
Collaborator

This upgrades our langchain dependency to 0.3.x, adds ~= requirements to associated packages, and allows the use of the latest langchain-astradb as a result.

@erichare erichare marked this pull request as ready for review October 21, 2024 15:47
@dosubot dosubot bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Oct 21, 2024
@erichare erichare self-assigned this Oct 21, 2024
@erichare erichare linked an issue Oct 21, 2024 that may be closed by this pull request
@edwinjosechittilappilly
Copy link
Collaborator

edwinjosechittilappilly commented Oct 22, 2024

Did you encounter any issues with Pydantic when installing and running the backend of Langflow after the upgrade to 0.3.x? @erichare

@erichare
Copy link
Collaborator Author

erichare commented Oct 22, 2024

Did you encounter any issues with Pydantic when installing and running the backend of Langflow after the upgrade to 0.3.x? @erichare

I admit i haven't extensively tested it, would love some help from others, but i was able to build and start the backend service without problems. I was also able to run my existing flows i had saved. I do see deprecation warnings about pydantic:

Starting Langflow v1.0.19...
/Users/erichare/GitHub/langflow/src/backend/base/langflow/utils/validate.py:224: LangChainDeprecationWarning: As of langchain-core 0.3.0, LangChain uses pydantic v2 internally. The langchain.pydantic_v1 module was a compatibility shim for pydantic v1, and should no longer be used. Please update the code to import from Pydantic directly.

But it doesn't appear to block the startup. question is whether we would like to go through and remove references to pydantic_v1, or defer that for later?

@edwinjosechittilappilly
Copy link
Collaborator

Did you encounter any issues with Pydantic when installing and running the backend of Langflow after the upgrade to 0.3.x? @erichare

I admit i haven't extensively tested it, would love some help from others, but i was able to build and start the backend service without problems. I was also able to run my existing flows i had saved. I do see deprecation warnings about pydantic:

Starting Langflow v1.0.19...
/Users/erichare/GitHub/langflow/src/backend/base/langflow/utils/validate.py:224: LangChainDeprecationWarning: As of langchain-core 0.3.0, LangChain uses pydantic v2 internally. The langchain.pydantic_v1 module was a compatibility shim for pydantic v1, and should no longer be used. Please update the code to import from Pydantic directly.

But it doesn't appear to block the startup. question is whether we would like to go through and remove references to pydantic_v1, or defer that for later?

Thats cool. Earlier when I tried the upgrade I faced some Pydantic upgrade error.
Let me review it and shall let you know soon.

@edwinjosechittilappilly
Copy link
Collaborator

Tested. Looks good to me.
The SecretStr error I observed earlier seems to be managed. Perhaps, as a follow-up pull request, we can add a chore to upgrade Pydantic from version 2.0 to 3.0 in some functionalities.

@edwinjosechittilappilly
Copy link
Collaborator

@erichare can you resolve the conflicts in uv.lock?

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Oct 22, 2024
Copy link
Collaborator

@edwinjosechittilappilly edwinjosechittilappilly left a comment

Choose a reason for hiding this comment

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

LGTM

@erichare erichare enabled auto-merge (squash) October 22, 2024 18:24
@erichare erichare merged commit 6180a6d into langflow-ai:main Oct 22, 2024
28 checks passed
@erichare erichare deleted the feat/langchain-dep-upgrades branch October 22, 2024 18:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm This PR has been approved by a maintainer size:S This PR changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

crewai dependency disallows upgrade to langchain~=0.3.x
4 participants