docs: restructure Hugging Face embeddings page and remove broken Infe…#3347
Merged
Mason Daugherty (mdrxy) merged 2 commits intolangchain-ai:mainfrom Mar 31, 2026
Merged
docs: restructure Hugging Face embeddings page and remove broken Infe…#3347Mason Daugherty (mdrxy) merged 2 commits intolangchain-ai:mainfrom
Mason Daugherty (mdrxy) merged 2 commits intolangchain-ai:mainfrom
Conversation
…rence API class This PR overhauls the Hugging Face embeddings documentation page to fix structural inaccuracies and remove dead code. Key changes: - Removed HuggingFaceInferenceAPIEmbeddings: This class relies on the api-inference.huggingface.co endpoint, which Hugging Face has permanently shut down. Following the previous docs resulted in a KeyError: 0. It has been completely removed to prevent user confusion. - Corrected Local vs. Serverless definitions: The previous docs incorrectly stated that HuggingFaceEndpointEmbeddings ran locally. The page is now split into two clear, accurate sections: "Local Embeddings" (using sentence_transformers) and "Serverless API" (using Inference Endpoints). - Fixed API Token Initialization: Added the necessary os.environ["HUGGINGFACEHUB_API_TOKEN"] block to the endpoint example so the code actually executes successfully when users copy and paste it.
Mason Daugherty (mdrxy)
approved these changes
Mar 31, 2026
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.
…rence API class
This PR overhauls the Hugging Face embeddings documentation page to fix structural inaccuracies and remove dead code.
Key changes:
Removed HuggingFaceInferenceAPIEmbeddings: This class relies on the api-inference.huggingface.co endpoint, which Hugging Face has permanently shut down. Following the previous docs resulted in a KeyError: 0. It has been completely removed to prevent user confusion.
Corrected Local vs. Serverless definitions: The previous docs incorrectly stated that HuggingFaceEndpointEmbeddings ran locally. The page is now split into two clear, accurate sections: "Local Embeddings" (using sentence_transformers) and "Serverless API" (using Inference Endpoints).
Fixed API Token Initialization: Added the necessary os.environ["HUGGINGFACEHUB_API_TOKEN"] block to the endpoint example so the code actually executes successfully when users copy and paste it.
Overview
Type of change
Type: [Replace with: New documentation page / Update existing documentation / Fix typo/bug/link/formatting / Remove outdated content / Other]
Related issues/PRs
Checklist
docs devsrc/docs.jsonif needed(Internal team members only / optional): Create a preview deployment as necessary using the Create Preview Branch workflow
Additional notes