mistral-haystack 2.1.1__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 (29) hide show
  1. {mistral_haystack-2.1.1 → mistral_haystack-3.0.0}/CHANGELOG.md +7 -0
  2. {mistral_haystack-2.1.1 → mistral_haystack-3.0.0}/PKG-INFO +3 -3
  3. {mistral_haystack-2.1.1 → mistral_haystack-3.0.0}/pyproject.toml +2 -2
  4. {mistral_haystack-2.1.1 → mistral_haystack-3.0.0}/src/haystack_integrations/components/converters/mistral/ocr_document_converter.py +2 -15
  5. {mistral_haystack-2.1.1 → mistral_haystack-3.0.0}/tests/test_ocr_document_converter.py +3 -29
  6. {mistral_haystack-2.1.1 → mistral_haystack-3.0.0}/.gitignore +0 -0
  7. {mistral_haystack-2.1.1 → mistral_haystack-3.0.0}/LICENSE.txt +0 -0
  8. {mistral_haystack-2.1.1 → mistral_haystack-3.0.0}/README.md +0 -0
  9. {mistral_haystack-2.1.1 → mistral_haystack-3.0.0}/examples/chat_generator_with_structured_output.py +0 -0
  10. {mistral_haystack-2.1.1 → mistral_haystack-3.0.0}/examples/indexing_ocr_pipeline.py +0 -0
  11. {mistral_haystack-2.1.1 → mistral_haystack-3.0.0}/examples/indexing_pipeline.py +0 -0
  12. {mistral_haystack-2.1.1 → mistral_haystack-3.0.0}/examples/streaming_chat_with_rag.py +0 -0
  13. {mistral_haystack-2.1.1 → mistral_haystack-3.0.0}/pydoc/config_docusaurus.yml +0 -0
  14. {mistral_haystack-2.1.1 → mistral_haystack-3.0.0}/src/haystack_integrations/components/converters/mistral/__init__.py +0 -0
  15. {mistral_haystack-2.1.1 → mistral_haystack-3.0.0}/src/haystack_integrations/components/converters/py.typed +0 -0
  16. {mistral_haystack-2.1.1 → mistral_haystack-3.0.0}/src/haystack_integrations/components/embedders/mistral/__init__.py +0 -0
  17. {mistral_haystack-2.1.1 → mistral_haystack-3.0.0}/src/haystack_integrations/components/embedders/mistral/document_embedder.py +0 -0
  18. {mistral_haystack-2.1.1 → mistral_haystack-3.0.0}/src/haystack_integrations/components/embedders/mistral/text_embedder.py +0 -0
  19. {mistral_haystack-2.1.1 → mistral_haystack-3.0.0}/src/haystack_integrations/components/embedders/py.typed +0 -0
  20. {mistral_haystack-2.1.1 → mistral_haystack-3.0.0}/src/haystack_integrations/components/generators/mistral/__init__.py +0 -0
  21. {mistral_haystack-2.1.1 → mistral_haystack-3.0.0}/src/haystack_integrations/components/generators/mistral/chat/__init__.py +0 -0
  22. {mistral_haystack-2.1.1 → mistral_haystack-3.0.0}/src/haystack_integrations/components/generators/mistral/chat/chat_generator.py +0 -0
  23. {mistral_haystack-2.1.1 → mistral_haystack-3.0.0}/src/haystack_integrations/components/generators/py.typed +0 -0
  24. {mistral_haystack-2.1.1 → mistral_haystack-3.0.0}/tests/__init__.py +0 -0
  25. {mistral_haystack-2.1.1 → mistral_haystack-3.0.0}/tests/conftest.py +0 -0
  26. {mistral_haystack-2.1.1 → mistral_haystack-3.0.0}/tests/test_mistral_chat_generator.py +0 -0
  27. {mistral_haystack-2.1.1 → mistral_haystack-3.0.0}/tests/test_mistral_chat_generator_async.py +0 -0
  28. {mistral_haystack-2.1.1 → mistral_haystack-3.0.0}/tests/test_mistral_document_embedder.py +0 -0
  29. {mistral_haystack-2.1.1 → mistral_haystack-3.0.0}/tests/test_mistral_text_embedder.py +0 -0
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [integrations/mistral-v2.1.1] - 2026-10-07
4
+
5
+ ### 🧹 Chores
6
+
7
+ - Update Mistral SUPPORTED_MODELS lists (#4066)
8
+
9
+
3
10
  ## [integrations/mistral-v2.1.0] - 2026-09-25
4
11
 
5
12
  ### 🧹 Chores
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: mistral-haystack
3
- Version: 2.1.1
3
+ Version: 3.0.0
4
4
  Project-URL: Documentation, https://github.com/deepset-ai/haystack-core-integrations/tree/main/integrations/mistral#readme
5
5
  Project-URL: Issues, https://github.com/deepset-ai/haystack-core-integrations/issues
6
6
  Project-URL: Source, https://github.com/deepset-ai/haystack-core-integrations/tree/main/integrations/mistral
@@ -10,14 +10,14 @@ License-File: LICENSE.txt
10
10
  Classifier: Development Status :: 4 - Beta
11
11
  Classifier: License :: OSI Approved :: Apache Software License
12
12
  Classifier: Programming Language :: Python
13
- Classifier: Programming Language :: Python :: 3.10
14
13
  Classifier: Programming Language :: Python :: 3.11
15
14
  Classifier: Programming Language :: Python :: 3.12
16
15
  Classifier: Programming Language :: Python :: 3.13
17
16
  Classifier: Programming Language :: Python :: 3.14
17
+ Classifier: Programming Language :: Python :: 3.15
18
18
  Classifier: Programming Language :: Python :: Implementation :: CPython
19
19
  Classifier: Programming Language :: Python :: Implementation :: PyPy
20
- Requires-Python: >=3.10
20
+ Requires-Python: >=3.11
21
21
  Requires-Dist: haystack-ai>=3.0.0
22
22
  Requires-Dist: mistralai!=2.4.6,>=2.0.0
23
23
  Description-Content-Type: text/markdown
@@ -7,7 +7,7 @@ name = "mistral-haystack"
7
7
  dynamic = ["version"]
8
8
  description = ''
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
  ]
@@ -7,13 +7,13 @@ import re
7
7
  from pathlib import Path
8
8
  from typing import Any, ClassVar
9
9
 
10
- from haystack import Document, component, default_from_dict, default_to_dict, logging
10
+ from haystack import Document, component, default_to_dict, logging
11
11
  from haystack.components.converters.utils import (
12
12
  get_bytestream_from_source,
13
13
  normalize_metadata,
14
14
  )
15
15
  from haystack.dataclasses import ByteStream
16
- from haystack.utils import Secret, deserialize_secrets_inplace
16
+ from haystack.utils import Secret
17
17
  from mistralai.client import Mistral
18
18
  from mistralai.client.models import (
19
19
  DocumentURLChunk,
@@ -186,19 +186,6 @@ class MistralOCRDocumentConverter:
186
186
  cleanup_uploaded_files=self.cleanup_uploaded_files,
187
187
  )
188
188
 
189
- @classmethod
190
- def from_dict(cls, data: dict[str, Any]) -> "MistralOCRDocumentConverter":
191
- """
192
- Deserializes the component from a dictionary.
193
-
194
- :param data:
195
- Dictionary to deserialize from.
196
- :returns:
197
- Deserialized component.
198
- """
199
- deserialize_secrets_inplace(data["init_parameters"], keys=["api_key"])
200
- return default_from_dict(cls, data)
201
-
202
189
  @component.output_types(documents=list[Document], raw_mistral_response=list[dict[str, Any]])
203
190
  def run(
204
191
  self,
@@ -6,6 +6,7 @@ from unittest.mock import MagicMock, patch
6
6
 
7
7
  import pytest
8
8
  from haystack import Document
9
+ from haystack.core.serialization import component_from_dict
9
10
  from haystack.dataclasses import ByteStream
10
11
  from haystack.utils import Secret
11
12
  from mistralai.client.models import DocumentURLChunk, FileChunk, ImageURLChunk
@@ -111,34 +112,6 @@ class TestSerialization:
111
112
  },
112
113
  }
113
114
 
114
- def test_from_dict(self, monkeypatch):
115
- monkeypatch.setenv("MISTRAL_API_KEY", "test-api-key")
116
- converter_dict = {
117
- "type": self.CLASS_TYPE,
118
- "init_parameters": {
119
- "api_key": {
120
- "env_vars": ["MISTRAL_API_KEY"],
121
- "strict": True,
122
- "type": "env_var",
123
- },
124
- "model": "mistral-ocr-2505",
125
- "include_image_base64": False,
126
- "pages": None,
127
- "image_limit": None,
128
- "image_min_size": None,
129
- "cleanup_uploaded_files": True,
130
- },
131
- }
132
-
133
- converter = MistralOCRDocumentConverter.from_dict(converter_dict)
134
-
135
- assert converter.model == "mistral-ocr-2505"
136
- assert converter.include_image_base64 is False
137
- assert converter.pages is None
138
- assert converter.image_limit is None
139
- assert converter.image_min_size is None
140
- assert converter.cleanup_uploaded_files is True
141
-
142
115
  def test_from_dict_with_custom_parameters(self, monkeypatch):
143
116
  monkeypatch.setenv("MISTRAL_API_KEY", "test-api-key")
144
117
  converter_dict = {
@@ -158,7 +131,7 @@ class TestSerialization:
158
131
  },
159
132
  }
160
133
 
161
- converter = MistralOCRDocumentConverter.from_dict(converter_dict)
134
+ converter = component_from_dict(MistralOCRDocumentConverter, converter_dict, name="converter")
162
135
 
163
136
  assert converter.model == "mistral-ocr-custom"
164
137
  assert converter.include_image_base64 is True
@@ -166,6 +139,7 @@ class TestSerialization:
166
139
  assert converter.image_limit == 10
167
140
  assert converter.image_min_size == 100
168
141
  assert converter.cleanup_uploaded_files is False
142
+ assert converter.api_key == Secret.from_env_var("MISTRAL_API_KEY")
169
143
 
170
144
 
171
145
  class TestComponentLifecycle: