From df56ca189efdce3eb3c3ad5fe12fabc6076936e8 Mon Sep 17 00:00:00 2001
From: Siraj R Aizlewood <siraj@aurelio.ai>
Date: Wed, 15 May 2024 01:10:33 +0400
Subject: [PATCH] Better exception msg.

---
 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 8b747e97..935195e6 100644
--- a/semantic_router/encoders/cohere.py
+++ b/semantic_router/encoders/cohere.py
@@ -57,6 +57,6 @@ class CohereEncoder(BaseEncoder):
                     "Handling of EmbedByTypeResponseEmbeddings is not implemented."
                 )
             else:
-                raise ValueError("Unexpected response type from Cohere API")
+                raise ValueError(f"Unexpected response type from Cohere API: type(embeds) = {type(embeds)}")
         except Exception as e:
             raise ValueError(f"Cohere API call failed. Error: {e}") from e
-- 
GitLab