mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-01 11:02:37 +00:00
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:
@@ -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)
|
||||
"""
|
||||
|
||||
|
Reference in New Issue
Block a user