You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Clone repo, run hatch shell, and then hatch run test:types. See below for output Error message
Installing collected packages: types-tabulate, types-six, types-simplejson, types-requests, types-PyYAML, types-pycurl, types-Deprecated, types-decorator, types-dateparser
Successfully installed types-Deprecated-1.2.15.20241117 types-PyYAML-6.0.12.20241230 types-dateparser-1.2.0.20240420 types-decorator-5.1.8.20250121 types-pycurl-7.45.4.20241216 types-requests-2.32.0.20241016 types-simplejson-3.19.0.20241221 types-six-1.17.0.20241205 types-tabulate-0.9.0.20241207
haystack/components/generators/hugging_face_api.py:215: error: Argument 1 to "_build_non_streaming_response" of "HuggingFaceAPIGenerator" has incompatible type "TextGenerationOutput | Iterable[TextGenerationStreamOutput]"; expected "TextGenerationOutput" [arg-type]
haystack/components/generators/hugging_face_api.py:224: error: Incompatible types in assignment (expression has type "TextGenerationStreamOutputToken", variable has type "TextGenerationOutputToken") [assignment]
haystack/components/generators/chat/hugging_face_local.py:146: error: Incompatible types in assignment (expression has type "str | None", variable has type "Literal['text-generation', 'text2text-generation'] | None") [assignment]
haystack/components/generators/chat/hugging_face_api.py:260: error: Argument 3 to "_run_non_streaming" of "HuggingFaceAPIChatGenerator" has incompatible type "list[dict[str, Collection[str]]] | None"; expected "list[ChatCompletionInputTool] | None" [arg-type]
haystack/components/generators/chat/hugging_face_api.py:294: error: Argument 1 to "StreamingChunk" has incompatible type "str | None"; expected "str" [arg-type]
haystack/components/generators/chat/hugging_face_api.py:299: error: Dict entry 0 has incompatible type "str": "str | None"; expected "str": "str" [dict-item]
haystack/components/generators/chat/hugging_face_api.py:300: error: Dict entry 1 has incompatible type "str": "str | None"; expected "str": "str" [dict-item]
haystack/components/generators/chat/hugging_face_api.py:301: error: Dict entry 2 has incompatible type "str": "int"; expected "str": "str" [dict-item]
haystack/components/generators/chat/hugging_face_api.py:302: error: Dict entry 3 has incompatible type "str": "dict[str, int]"; expected "str": "str" [dict-item]
haystack/components/generators/chat/hugging_face_api.py:303: error: Dict entry 4 has incompatible type "str": "str | None"; expected "str": "str" [dict-item]
haystack/components/generators/chat/hugging_face_api.py:347: error: Incompatible types in assignment (expression has type "dict[str, int]", target has type "int | str | None") [assignment]
Expected behavior
We should either pin whatever dependency is causing this issue or fix the errors.
Additional context
This was working fine before I cleared my UV cache. Now that everything was downloaded fresh, it seems like an update to a package is causing these errors. To Reproduce git clone https://github.com/deepset-ai/haystack hatch shell hatch run test:types
Describe the bug
Clone repo, run
hatch shell
, and thenhatch run test:types
. See below for outputError message
Expected behavior
We should either pin whatever dependency is causing this issue or fix the errors.
Additional context
This was working fine before I cleared my UV cache. Now that everything was downloaded fresh, it seems like an update to a package is causing these errors.
To Reproduce
git clone https://github.com/deepset-ai/haystack
hatch shell
hatch run test:types
FAQ Check
System:
The text was updated successfully, but these errors were encountered: