Skip to content

Commit

Permalink
fix: Cohere inconsistent embeddings and documents lengths (#284)
Browse files Browse the repository at this point in the history
* Don't double length of embeddings vs documents

* Fix issue

* Fix failing tests

* Fix pylint

* Pylint

* Undo test fixes

* Fix linter
  • Loading branch information
sjrl authored Feb 6, 2024
1 parent 32b6cc6 commit 2fc2676
Showing 1 changed file with 0 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ def get_response(
response = cohere_client.embed(batch, model=model_name, input_type=input_type, truncate=truncate)
for emb in response.embeddings:
all_embeddings.append(emb)
embeddings = [list(map(float, emb)) for emb in response.embeddings]
all_embeddings.extend(embeddings)
if response.meta is not None:
metadata = response.meta

Expand Down

0 comments on commit 2fc2676

Please sign in to comment.