4218 Commits

Author SHA1 Message Date
Stefano Fiorucci
868ea41698
feat: add SentenceTransformersDocumentImageEmbedder (#9635) 2025-07-22 13:10:33 +02:00
Sebastian Husch Lee
f801171191
feat: Add DocumentTypeRouter (#9634)
* Add DocumentTypeRouter

* PR comments

* Turn off isort for one line so pylint will pass
2025-07-22 11:08:24 +00:00
Amna Mubashar
b3971ff574
fix: update the deserialization for tool decorator (#9618)
* Fix linting

* Add tests

* Small fixes

* check for Tool instance

* Remove unnecessary update

* PR comments

---------

Co-authored-by: David S. Batista <dsbatista@gmail.com>
2025-07-22 12:35:29 +02:00
Srishti Gureja
e5810005ed
feat: add to_dict and from_dict to StreamingChunk (#9608)
* add to_dict and from_dict to StreamingChunk

* bugfix: set index field

* release notes + minor bugfix in tests

* ensure full serialization + update tests

* support de/serialization for all involved dataclasses

* remove unnecessary import

* code cleanup + only allow dicts in from_dict

* update release notes

* add more tests
2025-07-22 08:40:58 +00:00
Stefano Fiorucci
976cb868d6
chore: HuggingFaceAPIChatGenerator - check if ChatCompletionOutput.choices is None (#9633) 2025-07-22 10:33:54 +02:00
Stefano Fiorucci
4d75ff42b4
feat: add ImageContent class methods (#9632) 2025-07-22 09:46:47 +02:00
Kane Norman
9420492798
feat: allow mime_type to be guessed for ByteStream (#9573)
* feat(bytestream): add guess_mime_type parameter

* refactor(FileTypeRouter): refactor guess mimetype

* feat(bytestream): add guess_mime_type to util

* style(ruff): add trailing whitespace

* fix: fix type annotation

* test(file_type_router): add test for additional_mimetypes param

* fix(file_type_router): non-existent file behavior

* feat(file_type_router): add release notes

* fix(file_type_router): remove unused logger

* style: fix ruff formatting magic values

* test(bytestream): handle windows/unix mimetype differences

---------

Co-authored-by: Julian Risch <julian.risch@deepset.ai>
2025-07-22 07:43:22 +00:00
Stefano Fiorucci
b9fa70610f
feat: extend ChatPromptBuilder to support string templates (#9631) 2025-07-22 09:36:51 +02:00
Sebastian Husch Lee
7414ef6823
feat: Add image converters (#9628)
* Add image converters

* Fix tests

* Update haystack/components/converters/image/__init__.py

Co-authored-by: Stefano Fiorucci <stefanofiorucci@gmail.com>

---------

Co-authored-by: Stefano Fiorucci <stefanofiorucci@gmail.com>
2025-07-21 15:46:14 +00:00
Stefano Fiorucci
6a591bd027
feat: add ImageContent dataclass to include images in ChatMessage + OpenAI support (#9626) 2025-07-21 14:39:31 +02:00
Amna Mubashar
f5c0c1a9ca
Update README (#9621) 2025-07-18 11:03:45 +02:00
Krishna Somani
8ae24ca268
upgraded README.md (#9613)
* upgraded README.md

Added table of contents and made minor grammatical fixes with enhancing the readability of the file

* update README.md

Removal of capitalization

* Update README.md
2025-07-16 10:47:10 +02:00
Sebastian Husch Lee
7a63559faf
feat: Raise warning if the pipeline is unable to continue running due to a blocked component (#9569)
* First pass at alerting a user that the pipeline is blocked

* Change approach and add change to async pipeline

* Fix check in run_async

* Another fix

* Somehow also fixed the max_runs_per_component

* Align sync run and async run component

* Update output type of component outputs to Mapping to align with our protocol

* linting

* ruff

* Make it a core test

* Add reno

* Some refactoring

* Linting

* Fix mypy

* Converting to warning

* Small changes

* Update release note

* More cleanup

* PR comment

* PR comments
2025-07-15 14:02:39 +00:00
Sebastian Husch Lee
393a1bd293
feat: Update sentence window retriever to add source_id_meta_field, split_id_meta_field , and raise_on_missing_meta_fields (#9610)
* Update sentence window retriever

* Improvements and more tests

* Add new variable raise_on_failure

* Update reno
2025-07-14 13:18:05 +02:00
Sebastian Husch Lee
34f871d6e3
feat: Explicitly test support for builtin python 3.9+ types (#9606)
* Updating tests

* More tests

* More tests

* More tests

* More tests

* Get bare types to work with builtins

* Add reno

* PR comments

---------

Co-authored-by: David S. Batista <dsbatista@gmail.com>
2025-07-14 09:14:44 +00:00
Bilge Yücel
7660c80efa
docs: Fix the deepset platform logo (#9609) 2025-07-14 08:56:06 +02:00
Stefano Fiorucci
3fb2cef9e3
fix: test HFAPIChatGenerator with a different model (#9607) 2025-07-11 11:39:41 +02:00
Sebastian Husch Lee
87c08bbab7
Small change to prompt (#9601) 2025-07-09 12:02:21 +02:00
Julian Risch
4b515433d9
docs: fix < > tags in LLMEvaluator (#9600) 2025-07-08 13:12:09 +00:00
Julian Risch
85721c19dd
docs: fix curly brackets (#9599) 2025-07-08 12:51:47 +00:00
Julian Risch
29d3735c0f
docs: fix curly brackets in docstrings (#9598) 2025-07-08 14:28:34 +02:00
Michele Pangrazzi
d3c6c3e68e
chore: Workflow to sync docs with Docusaurus repo (#9597)
* Remove state according to https://github.com/deepset-ai/haystack/pull/9578

* Add workflow to sync API docs with Docusaurus repo
2025-07-08 11:48:44 +02:00
Julian Risch
d8a0735d8e
chore: delete proposals directory (#9596) 2025-07-08 10:49:40 +02:00
Stefano Fiorucci
2693f39e44
docs: discourage usage of HuggingFaceAPIGenerator with the HF Inference API (#9590)
* docs: discourage usage of HuggingFaceAPIGenerator with the HF Inference API

* small fixes

* Apply suggestions from code review

Co-authored-by: Daria Fokina <daria.fokina@deepset.ai>

* fix fmt

---------

Co-authored-by: Daria Fokina <daria.fokina@deepset.ai>
2025-07-04 14:27:30 +00:00
Stefano Fiorucci
646eedf26a
chore: reenable HF API Embedders tests + improve HFAPIChatGenerator docstrings (#9589)
* chore: reenable some HF API tests + improve docstrings

* revert deletion
2025-07-04 09:39:43 +02:00
Amna Mubashar
050c987946
chore: remove backward compatibility for State deserialization (#9585)
* remove backward compatability

* Fix linting
2025-07-03 13:20:34 +02:00
Sebastian Husch Lee
85258f0654
fix: Fix types and formatting pipeline test_run.py (#9575)
* Fix types in test_run.py

* Get test_run.py to pass fmt-check

* Add test_run to mypy checks

* Update test folder to pass ruff linting

* Fix merge

* Fix HF tests

* Fix hf test

* Try to fix tests

* Another attempt

* minor fix

* fix SentenceTransformersDiversityRanker

* skip integrations tests due to model unavailable on HF inference

---------

Co-authored-by: anakin87 <stefanofiorucci@gmail.com>
2025-07-03 09:49:09 +02:00
Sebastian Husch Lee
16fc41cd95
feat: Relax requirement for creating a ToolCallDelta dataclass (#9582)
* Relax our requirement for ToolCallDelta to better match ChoiceDeltaToolCall and ChoiceDeltaToolCallFunction from OpenAI

* Add reno

* Update tests
2025-07-03 08:50:29 +02:00
Amna Mubashar
9fd552f906
chore: remove deprecated async_executor param from ToolInvoker (#9571)
* Remove async executor

* Add release notes

* Linting

* update release notes
2025-07-02 14:02:51 +02:00
Amna Mubashar
adb2759d00
chore: remove deprecated State from haystack.dataclasses (#9578)
* Remove deprecated class

* Remove state from pydocs
2025-07-02 12:19:06 +02:00
Stefano Fiorucci
848115c65e
fix: fix print_streaming_chunk + add tests (#9579)
* fix: fix print_streaming_chunk + add tests

* rel note
2025-07-01 16:49:18 +02:00
Sebastian Husch Lee
3aaa201ed6
feat: Add tool_invoker_kwargs to Agent (#9574)
* Add new param to agent to pass any kwargs to tool invoker

* Add reno
2025-07-01 11:09:58 +02:00
Amna Mubashar
f11870b212
fix: adjust the async executor in ToolInvoker (#9562)
* Fix bug

* Add a new test

* PR comments

* Add another test

* Small fix

* Fix linting

* Update tests
2025-06-30 15:13:01 +02:00
Sebastian Husch Lee
97e72b9693
feat: Add to_dict and from_dict to ByteStream (#9568)
* Add to_dict and from_dict to ByteStream

* Add reno

* Add unit tests

* Fix and expand tests

* Fix typing

* PR comments
2025-06-30 11:57:22 +00:00
Sebastian Husch Lee
fc64884819
fix: Fix _convert_streaming_chunks_to_chat_message (#9566)
* Fix conversion

* Add reno

* Add unit test
2025-06-30 11:51:25 +02:00
mathislucka
c54a68ab63
fix: files should not be passed as single string (#9559)
* fix: files should not be passed as single string

* chore: we want word splitting in this case

* fix: place directive before command

* fix: find correct directive placement
2025-06-27 11:17:42 +02:00
Stefano Fiorucci
c18f81283c
chore: fix deepset_sync.py for pylint + general linting improvements (#9558)
* chore: fix deepset_sync.py for pylint

* check .github with ruff

* fix

* Update .github/utils/pyproject_to_requirements.py

Co-authored-by: Sebastian Husch Lee <10526848+sjrl@users.noreply.github.com>

---------

Co-authored-by: Sebastian Husch Lee <10526848+sjrl@users.noreply.github.com>
2025-06-27 07:54:22 +00:00
mathislucka
101e9cdc34
docs: sync code to deepset workspace (#9555)
* docs: sync code to deepset workspace

* fix: naming

* fix: actionlint
2025-06-27 07:51:59 +02:00
Stefano Fiorucci
bcaef53cbc
test: export HF_TOKEN env var in e2e environment (#9551)
* try to fix e2e tests for private NER models

* explanatory comment

* extend skipif condition
2025-06-25 15:00:28 +02:00
Haystack Bot
85e8493f4f
Update unstable version to 2.16.0-rc0 (#9554)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-06-25 14:57:16 +02:00
Amna Mubashar
1cd0a128d0
feat: enable parallel tool execution in ToolInvoker (#9530)
* Enable parallel tool execution in ToolInvoker

* Update handling of errors

* Small fixes

* Small fixes

* Adapt number of executors

* Add release notes

* Add parallel tool calling to sync run

* Deprecate async_executor

* Deprecate async_executor

* Add thread lock

* extract methods

* Update release notes

* Update release notes

* Updates

* Add new tests

* Add test for async

* PR comments
v2.16.0-rc0
2025-06-25 13:32:11 +02:00
Vladimir Blagojevic
91094e1038
feat: Add finish_reason field to StreamingChunk (#9536)
* Initial commit

* Update deprecation version

* Improve comment

* Minor simplification

* Add reno note

* Remove deprecation warning

* Remove fallback in haystack/components/generators/utils.py

* FinishReason alphabetical import

* Add tool_call_results finish reason, adapt codebase

* Define finish_reason to be Optional[FinishReason]

* Add StreamingChunk finish_reason in HF generators

* Update reno note

* Repair merge issue

* Update tests for finish_reason

* Resolve mypy issues

* Lint issue

* Enhance HF finish_reason translation

* Remove irrlevant test

* PR comments

---------

Co-authored-by: Sebastian Husch Lee <sjrl423@gmail.com>
2025-06-25 09:06:01 +00:00
Julian Risch
1d1c13a8bc
chore: add DocusaurusRenderer and use description, title, id (#9538) 2025-06-25 09:56:26 +02:00
Stefano Fiorucci
0d0a66b4f5
feat: add LLMMessagesRouter, a component to route Chat Messages using LLMs (#9540)
* llmmessagesrouter - draft

* serde methods

* refinements, tests and release note

* Apply suggestions from code review

Co-authored-by: Daria Fokina <daria.fokina@deepset.ai>

---------

Co-authored-by: Daria Fokina <daria.fokina@deepset.ai>
2025-06-24 14:54:20 +02:00
Michele Pangrazzi
3207a76d50
chore: Update pydoc-markdown.sh (#9547)
* Make config path a $1 param ; Add usage in comment ; Add echo log

* Update sync command
2025-06-24 14:01:51 +02:00
Amna Mubashar
9ed0b9b0bc
fix: Update the de/serialization with schema utils (#9526)
* Update the util methods

* Update tests

* fix tests

* schema fix

* Add json schema for tuples and sets

* Add proper conversion for sets and tuples

* Adjust typing

* PR comments

* Linting

* Optimize deserialization

* remove TODO

* PR comments

* PR comments

* Update tests and deserialization error

* Support legacy deserialization

* Update deprecating warning

* Update test
2025-06-24 13:10:12 +02:00
Stefano Fiorucci
d14f5dca0e
feat: add trust_remote_code parameter to SentenceTransformersSimilarityRanker (#9546) 2025-06-24 11:39:59 +02:00
Stefano Fiorucci
556dcc9e46
chore: update transformers test dependency (#9537) 2025-06-23 10:26:11 +02:00
Sebastian Husch Lee
ec371387f0
refactor: Update to StreamingChunk, better index setting and change tool_call to tool_calls (#9525)
* Fixes to setting StreamingChunk.index properly and refactoring tests for conversion

* Make _convert_chat_completion_chunk_to_streaming_chunk a member of OpenAIChatGenerator so we can overwrite it in integrations that inherit from it

* Fixes

* Modify streaming chunk to accept a list of tool call deltas.

* Fix tests

* Fix mypy and update original reno

* Undo change

* Update conversion to return a single streaming chunk

* update to print streaming chunk

* Fix types

* PR comments
2025-06-23 08:14:25 +00:00
Ahmad Zidan
f911459647
feat: add resource name for Haystack Component Datadog spans (#9337)
* feat: add resource name for Haystack Component Datadog spans

* fest: format resource name

Signed-off-by: Ahmad Zidan <ahmad.zidan@traveloka.com>

* feat: add release notes

Signed-off-by: Ahmad Zidan <ahmad.zidan@traveloka.com>

---------

Signed-off-by: Ahmad Zidan <ahmad.zidan@traveloka.com>
Co-authored-by: Sebastian Husch Lee <10526848+sjrl@users.noreply.github.com>
2025-06-18 09:15:15 +00:00