Taragolis opened a new issue, #38349:
URL: https://github.com/apache/airflow/issues/38349

   ### Body
   
   Cohere v5.0.0 just released and seems like it might not work out of the box 
with [Cohere Provider 
](https://airflow.apache.org/docs/apache-airflow-providers-cohere/stable/index.html)
   
   ```console
   airflow/providers/cohere/hooks/cohere.py:58: error: Unexpected keyword 
argument
   "max_retries" for "Client"  [call-arg]
               return cohere.Client(
                      ^
   /usr/local/lib/python3.8/site-packages/cohere/client.py:60: note: "Client" 
defined here
   airflow/providers/cohere/hooks/cohere.py:58: error: Unexpected keyword 
argument
   "api_url" for "Client"  [call-arg]
               return cohere.Client(
                      ^
   /usr/local/lib/python3.8/site-packages/cohere/client.py:60: note: "Client" 
defined here
   airflow/providers/cohere/hooks/cohere.py:56: error: Signature of "get_conn"
   incompatible with supertype "BaseHook"  [override]
           def get_conn(self) -> cohere.Client:
           ^
   airflow/providers/cohere/hooks/cohere.py:56: note:      Superclass:
   airflow/providers/cohere/hooks/cohere.py:56: note:          def 
get_conn(self) -> Any
   airflow/providers/cohere/hooks/cohere.py:56: note:      Subclass:
   airflow/providers/cohere/hooks/cohere.py:56: note:          Client
   airflow/providers/cohere/hooks/cohere.py:67: error: Incompatible return value
   type (got "Union[List[List[float]], EmbedByTypeResponseEmbeddings]", expected
   "List[List[float]]")  [return-value]
               return embeddings
                      ^~~~~~~~~~
   airflow/providers/cohere/hooks/cohere.py:80: error: Too many positional
   arguments for "generate" of "BaseCohere"  [misc]
                   self.get_conn.generate("Test", max_tokens=10)
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   ```
   
   We need eventually add support for v5, [Migration 
Guide](https://github.com/cohere-ai/cohere-python/blob/main/4.0.0-5.0.0-migration-guide.md)
   
   ### Committer
   
   - [X] I acknowledge that I am a maintainer/committer of the Apache Airflow 
project.


-- 
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]

Reply via email to