Skip to content

Commit

Permalink
Correction to text embedding call #48
Browse files Browse the repository at this point in the history
(we don't override dimensionality, but the empty parameter should be passed differently)
  • Loading branch information
MrCsabaToth committed Oct 18, 2024
1 parent 5ee7c4a commit 53b61b6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion functions/fn_impl/embed.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def embed(req: https_fn.Request) -> https_fn.Response:
task = "RETRIEVAL_DOCUMENT"
multi_lingual_embedding_model = TextEmbeddingModel.from_pretrained("text-embedding-004")
inputs = [TextEmbeddingInput(text, task)]
text_embeddings = multi_lingual_embedding_model.get_embeddings(inputs, {})
text_embeddings = multi_lingual_embedding_model.get_embeddings(inputs, **{})
embeddings.extend(text_embeddings)

embedding_values = [embedding.values for embedding in embeddings]
Expand Down

0 comments on commit 53b61b6

Please sign in to comment.