Migrate to langchain >=0.1.0,<0.3 - #5
Open
ehsandaya1-blip wants to merge 1 commit into
Open
ehsandaya1-blip wants to merge 1 commit into
ehsandaya1-blip wants to merge 1 commit into
Conversation
- **langchain.chat_models.ChatOpenAI / langchain.llms.OpenAI / langchain.embeddings.OpenAIEmbeddings (+ Azure variants)** → `langchain_openai.{ChatOpenAI, OpenAI, OpenAIEmbeddings, AzureChatOpenAI, AzureOpenAI, AzureOpenAIEmbeddings}` (32 sites): OpenAI integrations moved to the langchain-openai partner package.
- **langchain.{vectorstores,document_loaders,utilities,tools,retrievers,chat_models,llms,embeddings,docstore,graphs,storage,agent_toolkits}.*** → `langchain_community.<same path>` (18 sites): Third-party integrations moved to langchain-community with identical module paths.
- **langchain.text_splitter** → `langchain_text_splitters` (8 sites): Text splitters moved to their own package (0.2).
Files touched: 28; files the mechanical pass matched but did not need to change: 2.
Deterministic rewrites from a machine-readable MigrationSpec for this upgrade, then a review pass on the semantic residue; every changed file was parsed and checked with pyflakes for new undefined names before this PR was prepared. No behaviour beyond the migration was touched: no reformatting, no import reordering, no unrelated code.
Happy to adjust anything — if the project deliberately pins the old major version, say so and I will close this.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This updates the project's use of
langchainfrom<0.1.0to>=0.1.0,<0.3, following the provider's migration guide (https://python.langchain.com/docs/versions/v0_2/).What changed
langchain_openai.{ChatOpenAI, OpenAI, OpenAIEmbeddings, AzureChatOpenAI, AzureOpenAI, AzureOpenAIEmbeddings}(32 sites): OpenAI integrations moved to the langchain-openai partner package.langchain_community.<same path>(18 sites): Third-party integrations moved to langchain-community with identical module paths.langchain_text_splitters(8 sites): Text splitters moved to their own package (0.2).Files touched: 28; files the mechanical pass matched but did not need to change: 2.
How this was produced
Deterministic rewrites from a machine-readable MigrationSpec for this upgrade, then a review pass on the semantic residue; every changed file was parsed and checked with pyflakes for new undefined names before this PR was prepared. No behaviour beyond the migration was touched: no reformatting, no import reordering, no unrelated code.
Happy to adjust anything — if the project deliberately pins the old major version, say so and I will close this.
Notes for reviewers
from langchain.schema.runnable import ..., Inputlines became two imports each: the exported names fromlangchain_core.runnablesplusfrom langchain_core.runnables.utils import Input(Inputis not re-exported from the package root).langchain.prompts,langchain.chains,langchain.tools,langchain.callbacks,langchain.load.serializableandfrom langchain import OpenAIstill resolve in 0.1/0.2 and were left alone.