Skip to content

Conversation

@Taragolis
Copy link
Contributor

cohere 5.0.0 just released, and seems breaks mypy and most possible it is also brings some breaking changes

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)
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in newsfragments.

@Taragolis
Copy link
Contributor Author

@Taragolis Taragolis merged commit 3400dfe into apache:main Mar 20, 2024
@Taragolis Taragolis deleted the limit-cohere-5 branch March 20, 2024 22:12
@ephraimbuddy ephraimbuddy added the changelog:skip Changes that should be skipped from the changelog (CI, tests, etc..) label Mar 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:providers changelog:skip Changes that should be skipped from the changelog (CI, tests, etc..) provider:cohere

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants