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 to Version 0.3 #784

Merged
merged 3 commits into from
Oct 14, 2024
Merged

Conversation

Pouyanpi
Copy link
Collaborator

@Pouyanpi Pouyanpi commented Oct 1, 2024

This pull request makes the necessary changes to upgrade LangChain to version 0.3.

  1. Update Pydantic Import Paths:

    • Update import paths for pydantic.v1 to ensure compatibility with the latest version of Pydantic.
    • Suppress specific warnings related to protected namespaces in Pydantic models by adding filter to ignore them.
  2. Update LangChain Version Constraints:

    • Update version constraints for langchain, langchain-core, and langchain-community to allow versions up to <0.4.0.
  3. Refactor Import Paths for BaseLLM:

    • Update import paths for BaseLLM to langchain_core.language_models.llms across multiple files to align with the latest version of LangChain.
  • automated test passed
  • run e2e tests using various configs

- Updated import paths for 'BaseLLM' to 'langchain_core.language_models.llms'
  across multiple files.
- Ensured compatibility with the latest version of LangChain.
- Updated import paths for 'pydantic.v1' to ensure compatibility with the
  latest version of Pydantic.
- Suppressed specific warnings related to protected namespaces in Pydantic
  models by adding a filter to ignore these warnings.
- Updated version constraints for 'langchain', 'langchain-core', and
  'langchain-community' to allow versions up to <0.4.0.
@Pouyanpi Pouyanpi requested a review from drazvan October 1, 2024 09:33
@Pouyanpi
Copy link
Collaborator Author

Pouyanpi commented Oct 1, 2024

It resolves #782 and #767 .

@Pouyanpi Pouyanpi self-assigned this Oct 1, 2024
@Pouyanpi Pouyanpi marked this pull request as ready for review October 2, 2024 10:05
Copy link
Collaborator

@trebedea trebedea left a comment

Choose a reason for hiding this comment

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

LGTM 👍

# We set nvidia_ai_endpoints provider to None because it's only supported if `langchain_nvidia_ai_endpoints` is installed.
_providers: Dict[str, Type[BaseLanguageModel]] = {
_providers: Dict[str, Optional[Type[BaseLLM]]] = {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we need here the Optional?

@Pouyanpi Pouyanpi merged commit 3865845 into develop Oct 14, 2024
4 checks passed
@aortu22
Copy link

aortu22 commented Nov 4, 2024

When is this develop going to be release? I believe it is kind of urgent

@aortu22
Copy link

aortu22 commented Nov 4, 2024

When is this develop going to be release? I believe it is kind of urgent

Maybe a v 0.10.2 can be released as a patch to cover this issue

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.

4 participants