Skip to content

Migrate to langchain >=0.1.0,<0.3 - #118

Open
ehsandaya1-blip wants to merge 1 commit into
101dotxyz:mainfrom
ehsandaya1-blip:relay/langchain-0.1.0
Open

ehsandaya1-blip wants to merge 1 commit into
101dotxyz:mainfrom
ehsandaya1-blip:relay/langchain-0.1.0

Conversation

@ehsandaya1-blip

Copy link
Copy Markdown

This updates the project's use of langchain from <0.1.0 to >=0.1.0,<0.3, following the provider's migration guide (https://python.langchain.com/docs/versions/v0_2/).

What changed

  • langchain.chat_models.ChatOpenAI / langchain.llms.OpenAI / langchain.embeddings.OpenAIEmbeddings (+ Azure variants) → langchain_openai.{ChatOpenAI, OpenAI, OpenAIEmbeddings, AzureChatOpenAI, AzureOpenAI, AzureOpenAIEmbeddings} (4 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> (3 sites): Third-party integrations moved to langchain-community with identical module paths.
  • langchain.schema., langchain.prompts., langchain.callbacks.base, langchain.output_parsers (base) → langchain_core.{messages,documents,prompts,callbacks,output_parsers,runnables} (2 sites): Base abstractions moved to langchain-core.

Files touched: 6.

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

  • langchain.agents / langchain.output_parsers / langchain.prompts / langchain.tools / from langchain import LLMChain still resolve in 0.1/0.2 and were left alone.

- **langchain.chat_models.ChatOpenAI / langchain.llms.OpenAI / langchain.embeddings.OpenAIEmbeddings (+ Azure variants)** → `langchain_openai.{ChatOpenAI, OpenAI, OpenAIEmbeddings, AzureChatOpenAI, AzureOpenAI, AzureOpenAIEmbeddings}` (4 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>` (3 sites): Third-party integrations moved to langchain-community with identical module paths.
- **langchain.schema.*, langchain.prompts.*, langchain.callbacks.base, langchain.output_parsers (base)** → `langchain_core.{messages,documents,prompts,callbacks,output_parsers,runnables}` (2 sites): Base abstractions moved to langchain-core.
Files touched: 6.
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.
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.

1 participant