amoghrajesh commented on code in PR #51396:
URL: https://github.com/apache/airflow/pull/51396#discussion_r2135086040
##########
providers/cohere/src/airflow/providers/cohere/hooks/cohere.py:
##########
@@ -100,8 +100,9 @@ def create_embeddings(
embedding_types=["float"],
request_options=self.request_options,
)
- embeddings = response.embeddings
- return embeddings
+ if response.embeddings.float_ is None:
+ raise ValueError("Embeddings response is missing float_ field")
+ return response.embeddings.float_
Review Comment:
For now its ok, just added a comment so that people arent confused:
https://github.com/apache/airflow/pull/51517
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]