huggingface-api-haystack 2.1.0__tar.gz → 3.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. {huggingface_api_haystack-2.1.0 → huggingface_api_haystack-3.0.0}/CHANGELOG.md +7 -0
  2. {huggingface_api_haystack-2.1.0 → huggingface_api_haystack-3.0.0}/PKG-INFO +3 -3
  3. {huggingface_api_haystack-2.1.0 → huggingface_api_haystack-3.0.0}/pyproject.toml +2 -2
  4. {huggingface_api_haystack-2.1.0 → huggingface_api_haystack-3.0.0}/src/haystack_integrations/components/generators/huggingface_api/chat/chat_generator.py +3 -3
  5. {huggingface_api_haystack-2.1.0 → huggingface_api_haystack-3.0.0}/src/haystack_integrations/components/rankers/huggingface_api/ranker.py +1 -1
  6. {huggingface_api_haystack-2.1.0 → huggingface_api_haystack-3.0.0}/tests/test_chat_generator.py +2 -2
  7. {huggingface_api_haystack-2.1.0 → huggingface_api_haystack-3.0.0}/.gitignore +0 -0
  8. {huggingface_api_haystack-2.1.0 → huggingface_api_haystack-3.0.0}/LICENSE.txt +0 -0
  9. {huggingface_api_haystack-2.1.0 → huggingface_api_haystack-3.0.0}/README.md +0 -0
  10. {huggingface_api_haystack-2.1.0 → huggingface_api_haystack-3.0.0}/docker-compose.yml +0 -0
  11. {huggingface_api_haystack-2.1.0 → huggingface_api_haystack-3.0.0}/pydoc/config_docusaurus.yml +0 -0
  12. {huggingface_api_haystack-2.1.0 → huggingface_api_haystack-3.0.0}/src/haystack_integrations/common/huggingface_api/__init__.py +0 -0
  13. {huggingface_api_haystack-2.1.0 → huggingface_api_haystack-3.0.0}/src/haystack_integrations/common/huggingface_api/utils.py +0 -0
  14. {huggingface_api_haystack-2.1.0 → huggingface_api_haystack-3.0.0}/src/haystack_integrations/common/py.typed +0 -0
  15. {huggingface_api_haystack-2.1.0 → huggingface_api_haystack-3.0.0}/src/haystack_integrations/components/embedders/huggingface_api/__init__.py +0 -0
  16. {huggingface_api_haystack-2.1.0 → huggingface_api_haystack-3.0.0}/src/haystack_integrations/components/embedders/huggingface_api/document_embedder.py +0 -0
  17. {huggingface_api_haystack-2.1.0 → huggingface_api_haystack-3.0.0}/src/haystack_integrations/components/embedders/huggingface_api/sparse_document_embedder.py +0 -0
  18. {huggingface_api_haystack-2.1.0 → huggingface_api_haystack-3.0.0}/src/haystack_integrations/components/embedders/huggingface_api/sparse_embedding_utils.py +0 -0
  19. {huggingface_api_haystack-2.1.0 → huggingface_api_haystack-3.0.0}/src/haystack_integrations/components/embedders/huggingface_api/sparse_text_embedder.py +0 -0
  20. {huggingface_api_haystack-2.1.0 → huggingface_api_haystack-3.0.0}/src/haystack_integrations/components/embedders/huggingface_api/text_embedder.py +0 -0
  21. {huggingface_api_haystack-2.1.0 → huggingface_api_haystack-3.0.0}/src/haystack_integrations/components/embedders/py.typed +0 -0
  22. {huggingface_api_haystack-2.1.0 → huggingface_api_haystack-3.0.0}/src/haystack_integrations/components/generators/huggingface_api/__init__.py +0 -0
  23. {huggingface_api_haystack-2.1.0 → huggingface_api_haystack-3.0.0}/src/haystack_integrations/components/generators/huggingface_api/chat/__init__.py +0 -0
  24. {huggingface_api_haystack-2.1.0 → huggingface_api_haystack-3.0.0}/src/haystack_integrations/components/generators/py.typed +0 -0
  25. {huggingface_api_haystack-2.1.0 → huggingface_api_haystack-3.0.0}/src/haystack_integrations/components/rankers/huggingface_api/__init__.py +0 -0
  26. {huggingface_api_haystack-2.1.0 → huggingface_api_haystack-3.0.0}/src/haystack_integrations/components/rankers/py.typed +0 -0
  27. {huggingface_api_haystack-2.1.0 → huggingface_api_haystack-3.0.0}/tests/__init__.py +0 -0
  28. {huggingface_api_haystack-2.1.0 → huggingface_api_haystack-3.0.0}/tests/conftest.py +0 -0
  29. {huggingface_api_haystack-2.1.0 → huggingface_api_haystack-3.0.0}/tests/test_document_embedder.py +0 -0
  30. {huggingface_api_haystack-2.1.0 → huggingface_api_haystack-3.0.0}/tests/test_files/apple.jpg +0 -0
  31. {huggingface_api_haystack-2.1.0 → huggingface_api_haystack-3.0.0}/tests/test_ranker.py +0 -0
  32. {huggingface_api_haystack-2.1.0 → huggingface_api_haystack-3.0.0}/tests/test_sparse_document_embedder.py +0 -0
  33. {huggingface_api_haystack-2.1.0 → huggingface_api_haystack-3.0.0}/tests/test_sparse_text_embedder.py +0 -0
  34. {huggingface_api_haystack-2.1.0 → huggingface_api_haystack-3.0.0}/tests/test_text_embedder.py +0 -0
  35. {huggingface_api_haystack-2.1.0 → huggingface_api_haystack-3.0.0}/tests/test_utils.py +0 -0
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [integrations/huggingface_api-v2.1.0] - 2026-10-06
4
+
5
+ ### 🚜 Refactor
6
+
7
+ - [**breaking**] HF API - Stop warming up tools in Chat Generator (#4056)
8
+
9
+
3
10
  ## [integrations/huggingface_api-v2.0.0] - 2026-10-01
4
11
 
5
12
  ### 🚀 Features
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: huggingface-api-haystack
3
- Version: 2.1.0
3
+ Version: 3.0.0
4
4
  Summary: Haystack integration for Hugging Face API
5
5
  Project-URL: Documentation, https://github.com/deepset-ai/haystack-core-integrations/tree/main/integrations/huggingface_api#readme
6
6
  Project-URL: Issues, https://github.com/deepset-ai/haystack-core-integrations/issues
@@ -11,14 +11,14 @@ License-File: LICENSE.txt
11
11
  Classifier: Development Status :: 4 - Beta
12
12
  Classifier: License :: OSI Approved :: Apache Software License
13
13
  Classifier: Programming Language :: Python
14
- Classifier: Programming Language :: Python :: 3.10
15
14
  Classifier: Programming Language :: Python :: 3.11
16
15
  Classifier: Programming Language :: Python :: 3.12
17
16
  Classifier: Programming Language :: Python :: 3.13
18
17
  Classifier: Programming Language :: Python :: 3.14
18
+ Classifier: Programming Language :: Python :: 3.15
19
19
  Classifier: Programming Language :: Python :: Implementation :: CPython
20
20
  Classifier: Programming Language :: Python :: Implementation :: PyPy
21
- Requires-Python: >=3.10
21
+ Requires-Python: >=3.11
22
22
  Requires-Dist: haystack-ai>=3.0.0
23
23
  Requires-Dist: httpx>=0.27.0
24
24
  Requires-Dist: huggingface-hub[inference]>=1.0.0
@@ -7,7 +7,7 @@ name = "huggingface-api-haystack"
7
7
  dynamic = ["version"]
8
8
  description = "Haystack integration for Hugging Face API"
9
9
  readme = "README.md"
10
- requires-python = ">=3.10"
10
+ requires-python = ">=3.11"
11
11
  license = "Apache-2.0"
12
12
  keywords = []
13
13
  authors = [{ name = "deepset GmbH", email = "info@deepset.ai" }]
@@ -15,11 +15,11 @@ classifiers = [
15
15
  "License :: OSI Approved :: Apache Software License",
16
16
  "Development Status :: 4 - Beta",
17
17
  "Programming Language :: Python",
18
- "Programming Language :: Python :: 3.10",
19
18
  "Programming Language :: Python :: 3.11",
20
19
  "Programming Language :: Python :: 3.12",
21
20
  "Programming Language :: Python :: 3.13",
22
21
  "Programming Language :: Python :: 3.14",
22
+ "Programming Language :: Python :: 3.15",
23
23
  "Programming Language :: Python :: Implementation :: CPython",
24
24
  "Programming Language :: Python :: Implementation :: PyPy",
25
25
  ]
@@ -5,7 +5,7 @@
5
5
  import inspect
6
6
  import json
7
7
  from collections.abc import AsyncIterable, Iterable
8
- from datetime import datetime, timezone
8
+ from datetime import UTC, datetime
9
9
  from typing import Any, Union
10
10
 
11
11
  from haystack import component, default_from_dict, default_to_dict, logging
@@ -221,7 +221,7 @@ def _convert_chat_completion_stream_output_to_streaming_chunk(
221
221
  usage = {"prompt_tokens": chunk.usage.prompt_tokens, "completion_tokens": chunk.usage.completion_tokens}
222
222
  return StreamingChunk(
223
223
  content="",
224
- meta={"model": chunk.model, "received_at": datetime.now(timezone.utc).isoformat(), "usage": usage},
224
+ meta={"model": chunk.model, "received_at": datetime.now(UTC).isoformat(), "usage": usage},
225
225
  component_info=component_info,
226
226
  )
227
227
 
@@ -238,7 +238,7 @@ def _convert_chat_completion_stream_output_to_streaming_chunk(
238
238
  content=choice.delta.content or "",
239
239
  meta={
240
240
  "model": chunk.model,
241
- "received_at": datetime.now(timezone.utc).isoformat(),
241
+ "received_at": datetime.now(UTC).isoformat(),
242
242
  "finish_reason": choice.finish_reason,
243
243
  },
244
244
  component_info=component_info,
@@ -21,7 +21,7 @@ with LazyImport("Run 'pip install \"huggingface-api-haystack[grpc]\"' for grpc s
21
21
  from grpc_requests.aio import AsyncClient
22
22
 
23
23
 
24
- class TruncationDirection(str, Enum):
24
+ class TruncationDirection(str, Enum): # noqa: UP042 # StrEnum would change str() of this public enum
25
25
  """
26
26
  Defines the direction to truncate text when input length exceeds the model's limit.
27
27
 
@@ -3,7 +3,7 @@
3
3
  # SPDX-License-Identifier: Apache-2.0
4
4
 
5
5
  import os
6
- from datetime import datetime, timezone
6
+ from datetime import UTC, datetime
7
7
  from typing import Any
8
8
  from unittest.mock import AsyncMock, MagicMock, Mock, patch
9
9
 
@@ -935,7 +935,7 @@ class TestSyncIntegration:
935
935
 
936
936
  response_meta = response["replies"][0].meta
937
937
  assert "completion_start_time" in response_meta
938
- assert datetime.fromisoformat(response_meta["completion_start_time"]) <= datetime.now(timezone.utc)
938
+ assert datetime.fromisoformat(response_meta["completion_start_time"]) <= datetime.now(UTC)
939
939
  assert "usage" in response_meta
940
940
  assert "prompt_tokens" in response_meta["usage"]
941
941
  assert response_meta["usage"]["prompt_tokens"] >= 0