docs: fix outdated 'langchain import hub' to use langchain_classic - #5791
Open
SpiliosDmk (SpiliosDimakopoulos) wants to merge 1 commit into
Open
Conversation
Per the LangChain v1 migration guide, the hub module moved from the langchain package to langchain-classic. Two integration docs still show the old import, which raises ImportError: cannot import name 'hub' from 'langchain' under LangChain 1.0+. Affected files: - src/oss/python/integrations/retrievers/egnyte.mdx - src/oss/python/integrations/tools/ibm_watsonx_sql.mdx
Contributor
|
Thanks for opening a docs PR, SpiliosDmk (@SpiliosDimakopoulos)! When it's ready for review, please add the relevant reviewers:
|
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.
What
Fixes an outdated import in two integration docs that raises
ImportError: cannot import name 'hub' from 'langchain'underLangChain 1.0+.
Why
Per the LangChain v1 migration guide (src/oss/python/migrate/langchain-v1.mdx),
the
hubmodule moved from thelangchainpackage tolangchain-classicin v1. These two pages still show:
which fails on LangChain 1.0+. Changed to:
This follows the same pattern already applied to retriever imports in
PR #1196 (issue #1195), which fixed the same class of outdated import
for a different module.
Type of change
2-line, docs-only change with no functional impact outside the code samples.