langchain-ai / langchain

🦜🔗 Build context-aware reasoning applications
https://python.langchain.com
MIT License
95.19k stars 15.44k forks source link

DOC: Incorrect Code Sample for Hugging Face Embeddings #28231

Closed comsma closed 2 hours ago

comsma commented 2 days ago

URL

https://python.langchain.com/docs/integrations/text_embedding/

Checklist

Issue with current documentation:

Currently the code snippet for the hugging face model is

from langchain_huggingface import HuggingFaceEmbeddings

embeddings = HuggingFaceEmbeddings(model="sentence-transformers/all-mpnet-base-v2")

The model param should be model_name instead as per the langchain_huggingface docs

Idea or request for content:

No response