diff --git a/semantic_router/encoders/cohere.py b/semantic_router/encoders/cohere.py index 0ed2ecc0c87e9e1aa28990faeeff4c437b088cc4..bea75ba20a3fd3f137b998e348d51c651ab01038 100644 --- a/semantic_router/encoders/cohere.py +++ b/semantic_router/encoders/cohere.py @@ -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