community[patch]: update the default hf bge embeddings (#22627)

**Description:** This updates the langchain_community > huggingface >
default bge embeddings ([the current default recommends this
change](https://huggingface.co/BAAI/bge-large-en))
**Issue:** None
**Dependencies:** None
**Twitter handle:** @jonzeolla

---------

Co-authored-by: Bagatur <baskaryan@gmail.com>
This commit is contained in:
JonZeolla
2024-09-02 18:10:21 -04:00
committed by GitHub
parent 150251fd49
commit 78ff51ce83
19 changed files with 81 additions and 45 deletions

View File

@@ -41,9 +41,10 @@ class ScaNN(VectorStore):
from langchain_community.embeddings import HuggingFaceEmbeddings
from langchain_community.vectorstores import ScaNN
model_name = "sentence-transformers/all-mpnet-base-v2"
db = ScaNN.from_texts(
['foo', 'bar', 'barz', 'qux'],
HuggingFaceEmbeddings())
HuggingFaceEmbeddings(model_name=model_name))
db.similarity_search('foo?', k=1)
"""