Skip to content

docs: restructure Hugging Face embeddings page and remove broken Infe…#3347

Merged
Mason Daugherty (mdrxy) merged 2 commits intolangchain-ai:mainfrom
Proxpekt:patch-1
Mar 31, 2026
Merged

docs: restructure Hugging Face embeddings page and remove broken Infe…#3347
Mason Daugherty (mdrxy) merged 2 commits intolangchain-ai:mainfrom
Proxpekt:patch-1

Conversation

@Proxpekt
Copy link
Copy Markdown
Contributor

@Proxpekt Aayush Saxena (Proxpekt) commented Mar 27, 2026

…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

  • GitHub issue:
  • Feature PR:
  • Linear issue:
  • Slack thread:

Checklist

  • I have read the contributing guidelines, including the language policy
  • I have tested my changes locally using docs dev
  • All code examples have been tested and work correctly
  • I have used root relative paths for internal links
  • I have updated navigation in src/docs.json if needed

(Internal team members only / optional): Create a preview deployment as necessary using the Create Preview Branch workflow

Additional notes

…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.
@github-actions github-actions Bot added langchain For docs changes to LangChain oss python For content related to the Python version of LangChain projects external User is not a member of langchain-ai labels Mar 27, 2026
@mdrxy Mason Daugherty (mdrxy) merged commit c2715fc into langchain-ai:main Mar 31, 2026
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

external User is not a member of langchain-ai langchain For docs changes to LangChain oss python For content related to the Python version of LangChain projects

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants