watsonx-haystack 1.3.0__tar.gz → 1.4.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 (25) hide show
  1. {watsonx_haystack-1.3.0 → watsonx_haystack-1.4.0}/CHANGELOG.md +15 -0
  2. {watsonx_haystack-1.3.0 → watsonx_haystack-1.4.0}/PKG-INFO +1 -1
  3. {watsonx_haystack-1.3.0 → watsonx_haystack-1.4.0}/src/haystack_integrations/components/generators/watsonx/chat/chat_generator.py +26 -1
  4. {watsonx_haystack-1.3.0 → watsonx_haystack-1.4.0}/src/haystack_integrations/components/generators/watsonx/generator.py +26 -1
  5. {watsonx_haystack-1.3.0 → watsonx_haystack-1.4.0}/tests/test_chat_generator.py +7 -0
  6. {watsonx_haystack-1.3.0 → watsonx_haystack-1.4.0}/tests/test_generator.py +7 -0
  7. {watsonx_haystack-1.3.0 → watsonx_haystack-1.4.0}/.gitignore +0 -0
  8. {watsonx_haystack-1.3.0 → watsonx_haystack-1.4.0}/LICENSE.txt +0 -0
  9. {watsonx_haystack-1.3.0 → watsonx_haystack-1.4.0}/README.md +0 -0
  10. {watsonx_haystack-1.3.0 → watsonx_haystack-1.4.0}/examples/chat_generator_example.py +0 -0
  11. {watsonx_haystack-1.3.0 → watsonx_haystack-1.4.0}/examples/embedders_example.py +0 -0
  12. {watsonx_haystack-1.3.0 → watsonx_haystack-1.4.0}/examples/generator_example.py +0 -0
  13. {watsonx_haystack-1.3.0 → watsonx_haystack-1.4.0}/pydoc/config_docusaurus.yml +0 -0
  14. {watsonx_haystack-1.3.0 → watsonx_haystack-1.4.0}/pyproject.toml +0 -0
  15. {watsonx_haystack-1.3.0 → watsonx_haystack-1.4.0}/src/haystack_integrations/components/embedders/py.typed +0 -0
  16. {watsonx_haystack-1.3.0 → watsonx_haystack-1.4.0}/src/haystack_integrations/components/embedders/watsonx/__init__.py +0 -0
  17. {watsonx_haystack-1.3.0 → watsonx_haystack-1.4.0}/src/haystack_integrations/components/embedders/watsonx/document_embedder.py +0 -0
  18. {watsonx_haystack-1.3.0 → watsonx_haystack-1.4.0}/src/haystack_integrations/components/embedders/watsonx/text_embedder.py +0 -0
  19. {watsonx_haystack-1.3.0 → watsonx_haystack-1.4.0}/src/haystack_integrations/components/generators/py.typed +0 -0
  20. {watsonx_haystack-1.3.0 → watsonx_haystack-1.4.0}/src/haystack_integrations/components/generators/watsonx/__init__.py +0 -0
  21. {watsonx_haystack-1.3.0 → watsonx_haystack-1.4.0}/src/haystack_integrations/components/generators/watsonx/chat/__init__.py +0 -0
  22. {watsonx_haystack-1.3.0 → watsonx_haystack-1.4.0}/tests/__init__.py +0 -0
  23. {watsonx_haystack-1.3.0 → watsonx_haystack-1.4.0}/tests/test_document_embedder.py +0 -0
  24. {watsonx_haystack-1.3.0 → watsonx_haystack-1.4.0}/tests/test_files/apple.jpg +0 -0
  25. {watsonx_haystack-1.3.0 → watsonx_haystack-1.4.0}/tests/test_text_embedder.py +0 -0
@@ -1,5 +1,20 @@
1
1
  # Changelog
2
2
 
3
+ ## [integrations/watsonx-v1.3.0] - 2026-03-12
4
+
5
+ ### 🚀 Features
6
+
7
+ - `WatsonXChatGenerator` - support Tools and use the `StreamingChunk` fields (#2902)
8
+
9
+ ### 📚 Documentation
10
+
11
+ - Simplify pydoc configs (#2855)
12
+
13
+ ### 🧹 Chores
14
+
15
+ - Remove unused allow-direct-references (#2866)
16
+
17
+
3
18
  ## [integrations/watsonx-v1.2.0] - 2026-01-21
4
19
 
5
20
  ### 🐛 Bug Fixes
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: watsonx-haystack
3
- Version: 1.3.0
3
+ Version: 1.4.0
4
4
  Summary: Watsonx integration for Haystack
5
5
  Project-URL: Documentation, https://github.com/deepset-ai/haystack-core-integrations/tree/main/integrations/watsonx#readme
6
6
  Project-URL: Issues, https://github.com/deepset-ai/haystack-core-integrations/issues
@@ -5,7 +5,7 @@
5
5
  import json
6
6
  from dataclasses import replace
7
7
  from datetime import datetime, timezone
8
- from typing import Any, Literal, get_args
8
+ from typing import Any, ClassVar, Literal, get_args
9
9
 
10
10
  from haystack import component, default_from_dict, default_to_dict, logging
11
11
  from haystack.components.generators.utils import _convert_streaming_chunks_to_chat_message
@@ -113,6 +113,31 @@ class WatsonxChatGenerator:
113
113
  ```
114
114
  """
115
115
 
116
+ SUPPORTED_MODELS: ClassVar[list[str]] = [
117
+ "ibm/granite-3-1-8b-base",
118
+ "ibm/granite-3-8b-instruct",
119
+ "ibm/granite-4-h-small",
120
+ "ibm/granite-8b-code-instruct",
121
+ "ibm/granite-guardian-3-8b",
122
+ "meta-llama/llama-3-1-70b-gptq",
123
+ "meta-llama/llama-3-1-8b",
124
+ "meta-llama/llama-3-2-11b-vision-instruct",
125
+ "meta-llama/llama-3-2-90b-vision-instruct",
126
+ "meta-llama/llama-3-3-70b-instruct",
127
+ "meta-llama/llama-3-405b-instruct",
128
+ "meta-llama/llama-4-maverick-17b-128e-instruct-fp8",
129
+ "meta-llama/llama-guard-3-11b-vision",
130
+ "mistral-large-2512",
131
+ "mistralai/mistral-medium-2505",
132
+ "mistralai/mistral-small-3-1-24b-instruct-2503",
133
+ "openai/gpt-oss-120b",
134
+ ]
135
+ """A non-exhaustive list of models supported by this component.
136
+
137
+ See https://www.ibm.com/docs/en/watsonx/saas?topic=solutions-supported-foundation-models for the
138
+ full list of models and up-to-date model IDs.
139
+ """
140
+
116
141
  def __init__(
117
142
  self,
118
143
  *,
@@ -2,7 +2,7 @@
2
2
  #
3
3
  # SPDX-License-Identifier: Apache-2.0
4
4
 
5
- from typing import Any, cast
5
+ from typing import Any, ClassVar, cast
6
6
 
7
7
  from haystack import component, logging
8
8
  from haystack.dataclasses import ChatMessage, StreamingCallbackT
@@ -67,6 +67,31 @@ class WatsonxGenerator(WatsonxChatGenerator):
67
67
  ```
68
68
  """
69
69
 
70
+ SUPPORTED_MODELS: ClassVar[list[str]] = [
71
+ "ibm/granite-3-1-8b-base",
72
+ "ibm/granite-3-8b-instruct",
73
+ "ibm/granite-4-h-small",
74
+ "ibm/granite-8b-code-instruct",
75
+ "ibm/granite-guardian-3-8b",
76
+ "meta-llama/llama-3-1-70b-gptq",
77
+ "meta-llama/llama-3-1-8b",
78
+ "meta-llama/llama-3-2-11b-vision-instruct",
79
+ "meta-llama/llama-3-2-90b-vision-instruct",
80
+ "meta-llama/llama-3-3-70b-instruct",
81
+ "meta-llama/llama-3-405b-instruct",
82
+ "meta-llama/llama-4-maverick-17b-128e-instruct-fp8",
83
+ "meta-llama/llama-guard-3-11b-vision",
84
+ "mistral-large-2512",
85
+ "mistralai/mistral-medium-2505",
86
+ "mistralai/mistral-small-3-1-24b-instruct-2503",
87
+ "openai/gpt-oss-120b",
88
+ ]
89
+ """A non-exhaustive list of models supported by this component.
90
+
91
+ See https://www.ibm.com/docs/en/watsonx/saas?topic=solutions-supported-foundation-models for the
92
+ full list of models and up-to-date model IDs.
93
+ """
94
+
70
95
  def __init__(
71
96
  self,
72
97
  *,
@@ -119,6 +119,13 @@ class TestWatsonxChatGenerator:
119
119
 
120
120
  yield {"model": mock_model, "model_instance": mock_model_instance, "select_callback": mock_select_callback}
121
121
 
122
+ def test_supported_models(self) -> None:
123
+ """SUPPORTED_MODELS is a non-empty list of strings."""
124
+ models = WatsonxChatGenerator.SUPPORTED_MODELS
125
+ assert isinstance(models, list)
126
+ assert len(models) > 0
127
+ assert all(isinstance(m, str) for m in models)
128
+
122
129
  def test_init_default(self, mock_watsonx):
123
130
  generator = WatsonxChatGenerator(project_id=Secret.from_token("fake-project-id"))
124
131
 
@@ -81,6 +81,13 @@ class TestWatsonxGenerator:
81
81
 
82
82
  yield {"model": mock_model, "model_instance": mock_model_instance}
83
83
 
84
+ def test_supported_models(self) -> None:
85
+ """SUPPORTED_MODELS is a non-empty list of strings."""
86
+ models = WatsonxGenerator.SUPPORTED_MODELS
87
+ assert isinstance(models, list)
88
+ assert len(models) > 0
89
+ assert all(isinstance(m, str) for m in models)
90
+
84
91
  def test_init_default(self, mock_watsonx):
85
92
  generator = WatsonxGenerator(project_id=Secret.from_token("fake-project-id"))
86
93