fix: method name should be same with abstrct base class (#1592)

This commit is contained in:
Mathew Shen
2024-08-02 04:01:19 +08:00
committed by GitHub
parent e287fb9a89
commit 918823d805

View File

@@ -6,7 +6,7 @@ class HuggingFaceEmbedding(EmbeddingBase):
def __init__(self, model_name="multi-qa-MiniLM-L6-cos-v1"):
self.model = SentenceTransformer(model_name)
def get_embedding(self, text):
def embed(self, text):
"""
Get the embedding for the given text using Hugging Face.