Skip to content

Commit

Permalink
Merge pull request #881 from KoradaCharan/use-minilm-embeddings
Browse files Browse the repository at this point in the history
Updated Hugging Face embeddings to use all-MiniLM-L6-v2
  • Loading branch information
assafelovic authored Oct 4, 2024
2 parents 4f10f7b + 42f04e1 commit 06a58d8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion gpt_researcher/memory/embeddings.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,10 @@ def __init__(self, embedding_provider, headers=None, **kwargs):
case "huggingface":
from langchain.embeddings import HuggingFaceEmbeddings

_embeddings = HuggingFaceEmbeddings()
# Specifying the Hugging Face embedding model all-MiniLM-L6-v2
_embeddings = HuggingFaceEmbeddings(
model_name="sentence-transformers/all-MiniLM-L6-v2"
)

case _:
raise Exception("Embedding provider not found.")
Expand Down

0 comments on commit 06a58d8

Please sign in to comment.