Commit 347781a
feat: Metadata as input for
* Revise MCPTool usage example for Streamable HTTP
Updated example usage in MCPTool documentation to reflect Streamable HTTP usage and mentioned deprecated SSE.
* Clarify connection types in MCPToolset documentation
Updated documentation to reflect changes in connection types for MCPToolset.
* fix: Align with hatch run fmt requirements
* add: MistralOCRDocumentConverter
* add: project files
* fix: example lib usage
* move: ocr document converter into child /mistral
* add: example usage with annotations
* add: hatch run fmt
* add: mistralai
* fix: python3.9 compatibility with using Union, List, Optional
* add: new comments and their position
* add: moved schemas from init into run to bypass problems with serializing
* add: docstring convention
* add: process mutliple documents
* add: robust api handling with catching mistral errors
* add: Union[str, Path, ByteStream] as input
* add: comment for new inputs
* add: pipeline example
* fix: example ocr component
* fix: mistral file upload and pydantic v2 models
* add: pipeline example
* add: hint on document annotation page limit
* add: mistralai as project dependency
* fix: hatch run fmt
* fix: hatch run docs
* add: exlcuse mistral from compliance workflow (its apache 2.0)
* add: 3 initialization tests
* add: 4 se test
* add: test w/ proper mocking
* add: real api test when env is set
* add: delete files by default from mistral if uploaded
* fix: mock file deletion
* fix: hatch run fmt
* Apply suggestion from @anakin87
Co-authored-by: Stefano Fiorucci <stefanofiorucci@gmail.com>
* Update integrations/mistral/src/haystack_integrations/components/converters/mistral/ocr_document_converter.py
Co-authored-by: Stefano Fiorucci <stefanofiorucci@gmail.com>
* fix: nested try excepts
* add: mention file upload
* Update integrations/mistral/tests/test_ocr_document_converter.py
Co-authored-by: Stefano Fiorucci <stefanofiorucci@gmail.com>
* Update integrations/mistral/tests/test_ocr_document_converter.py
Co-authored-by: Stefano Fiorucci <stefanofiorucci@gmail.com>
* add: less test code due to pytest.mark..parametrize
* add: less tests and const class type
* fix: format
* add: ocr document converter to docusaurus
* add: converter to mistral
* add: metadata handling in run method following other converters
* fix(mistral): hatch run fmt
* Update integrations/mistral/src/haystack_integrations/components/converters/mistral/ocr_document_converter.py
Co-authored-by: Stefano Fiorucci <stefanofiorucci@gmail.com>
---------
Co-authored-by: Stefano Fiorucci <stefanofiorucci@gmail.com>MistalOCRDocumentConverter (#2457)1 parent 70d0b7e commit 347781a
2 files changed
Lines changed: 100 additions & 6 deletions
File tree
- integrations/mistral
- src/haystack_integrations/components/converters/mistral
- tests
Lines changed: 26 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
8 | 11 | | |
9 | 12 | | |
10 | 13 | | |
| |||
173 | 176 | | |
174 | 177 | | |
175 | 178 | | |
| 179 | + | |
176 | 180 | | |
177 | 181 | | |
178 | 182 | | |
| |||
187 | 191 | | |
188 | 192 | | |
189 | 193 | | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
190 | 199 | | |
191 | 200 | | |
192 | 201 | | |
| |||
217 | 226 | | |
218 | 227 | | |
219 | 228 | | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
220 | 232 | | |
221 | 233 | | |
222 | 234 | | |
223 | 235 | | |
224 | 236 | | |
225 | | - | |
| 237 | + | |
226 | 238 | | |
227 | 239 | | |
| 240 | + | |
228 | 241 | | |
229 | 242 | | |
230 | 243 | | |
| |||
247 | 260 | | |
248 | 261 | | |
249 | 262 | | |
| 263 | + | |
250 | 264 | | |
251 | 265 | | |
252 | 266 | | |
| |||
256 | 270 | | |
257 | 271 | | |
258 | 272 | | |
| 273 | + | |
| 274 | + | |
259 | 275 | | |
260 | 276 | | |
261 | 277 | | |
| |||
286 | 302 | | |
287 | 303 | | |
288 | 304 | | |
289 | | - | |
| 305 | + | |
290 | 306 | | |
291 | 307 | | |
292 | 308 | | |
| |||
354 | 370 | | |
355 | 371 | | |
356 | 372 | | |
| 373 | + | |
357 | 374 | | |
358 | 375 | | |
359 | 376 | | |
360 | 377 | | |
361 | 378 | | |
362 | 379 | | |
363 | 380 | | |
| 381 | + | |
| 382 | + | |
364 | 383 | | |
365 | 384 | | |
366 | 385 | | |
| |||
402 | 421 | | |
403 | 422 | | |
404 | 423 | | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
405 | 427 | | |
406 | 428 | | |
407 | | - | |
| 429 | + | |
408 | 430 | | |
409 | 431 | | |
410 | 432 | | |
| |||
Lines changed: 74 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
419 | 419 | | |
420 | 420 | | |
421 | 421 | | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
422 | 494 | | |
423 | 495 | | |
424 | 496 | | |
425 | 497 | | |
426 | 498 | | |
427 | | - | |
| 499 | + | |
428 | 500 | | |
429 | 501 | | |
430 | 502 | | |
| |||
454 | 526 | | |
455 | 527 | | |
456 | 528 | | |
457 | | - | |
| 529 | + | |
458 | 530 | | |
459 | 531 | | |
460 | 532 | | |
| |||
0 commit comments