From 5ffc38ac72de8dd0c36acd86f31e8ec5c70de2b4 Mon Sep 17 00:00:00 2001 From: Siraj R Aizlewood <siraj@aurelio.ai> Date: Wed, 15 May 2024 00:17:02 +0400 Subject: [PATCH] Update cohere.py Need to specify texts is the first arg for cohere v^5.00. --- semantic_router/encoders/cohere.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/semantic_router/encoders/cohere.py b/semantic_router/encoders/cohere.py index b49769eb..6f90e61e 100644 --- a/semantic_router/encoders/cohere.py +++ b/semantic_router/encoders/cohere.py @@ -42,7 +42,7 @@ class CohereEncoder(BaseEncoder): raise ValueError("Cohere client is not initialized.") try: embeds = self.client.embed( - docs, input_type=self.input_type, model=self.name + texts=docs, input_type=self.input_type, model=self.name ) return embeds.embeddings except Exception as e: -- GitLab