Fixing the bug when using Huggingface Models (#1877)

Co-authored-by: parshvadaftari <parshva@192.168.1.5>
This commit is contained in:
Parshva Daftari
2024-09-25 20:04:40 +05:30
committed by GitHub
parent 44ee48e924
commit 0491854298
2 changed files with 10 additions and 12 deletions

View File

@@ -28,4 +28,4 @@ class HuggingFaceEmbedding(EmbeddingBase):
Returns:
list: The embedding vector.
"""
return self.model.encode(text)
return self.model.encode(text, convert_to_numpy = True).tolist()