Skip to content

Commit

Permalink
fix: Convert cohere embedding to np.float32 (#24)
Browse files Browse the repository at this point in the history
  • Loading branch information
wxywb authored May 28, 2024
1 parent 46e8fbb commit d812c9a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion milvus_model/dense/cohere.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def _call_cohere_api(self, texts: List[str], input_type: str) -> List[np.array]:
truncate=self.truncate
).embeddings
if self.embedding_types is None:
results = [np.array(data) for data in embeddings]
results = [np.array(data, dtype=np.float32) for data in embeddings]
else:
results = getattr(embeddings, self.embedding_types[0], None)
if self.embedding_types[0] == "binary":
Expand Down

0 comments on commit d812c9a

Please sign in to comment.