Skip to content
Snippets Groups Projects
Unverified Commit 372c23fc authored by James Briggs's avatar James Briggs Committed by GitHub
Browse files

Merge pull request #7 from aurelio-labs/james/cohere-input-type

update input_type to always be query
parents ad200b0c f2d4019d
No related branches found
No related tags found
No related merge requests found
......@@ -20,9 +20,5 @@ class CohereEncoder(BaseEncoder):
def __call__(self, texts: list[str]) -> list[list[float]]:
if self.client is None:
raise ValueError("Cohere client is not initialized.")
if len(texts) == 1:
input_type = "search_query"
else:
input_type = "search_document"
embeds = self.client.embed(texts, input_type=input_type, model=self.name)
embeds = self.client.embed(texts, input_type="search_query", model=self.name)
return embeds.embeddings
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment