4006 Commits

Author SHA1 Message Date
Stefano Fiorucci
019c238dd0
test: stop drawing pipelines in e2e tests (#9164) 2025-04-04 10:50:05 +02:00
Sebastian Husch Lee
fa38662a65
fix: Fix content tag name to match one we use in Pipeline (#9163)
* Fix content tag name to match one we use in Pipeline

* Add reno
2025-04-03 11:47:42 +02:00
Amna Mubashar
dd6ff10d3b
feat: allow OpenAI client config in AzureOpenAI embedders (#9136)
* Allow OpenAI client config
2025-04-02 16:50:48 +02:00
Stefano Fiorucci
3a6e98565e
ci: pin blis for python 3.9 (#9158) 2025-04-02 15:32:11 +02:00
Haystack Bot
c67833aa58
Update unstable version to 2.13.0-rc0 (#9157)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-04-01 18:23:58 +02:00
Michele Pangrazzi
c35b73f38d
Consolidate the use of select_streaming_callback utility in OpenAI and Azure ChatGenerators (#9156)
* Always use select_streaming_callback on ChatGenerators ; Update types ; Remove unneeded type: ignore

* Add release note

* Remove other unneeded type: ignore
v2.13.0-rc0
2025-04-01 16:13:45 +00:00
David S. Batista
108fc3b4a2
test: adding Pipeline component name checks - cannot have . (dot characters) (#9155)
* adding component name checks + tests

* fixes
2025-04-01 16:45:04 +02:00
Julian Risch
c7bc5b54de
feat: integrate SuperComponent from haystack-experimental (#9134)
* add SuperComponent with utils and tests

* fix tests, circular imports

* use __all__

* reno and walrus operator

* add InvalidMappingValueError, InvalidMappingTypeError

* add run_async

* add usage example
2025-04-01 14:52:19 +02:00
Sebastian Husch Lee
fce80715e0
feat: Update agent exit condition check (#9151)
* Update agent to properly check all llm messages instead of just first one

* reno

* fix release note

* PR comments

* Fix unit test

* PR comments

* Updated warning message
2025-04-01 14:51:53 +02:00
Sebastian Husch Lee
d15f1b9043
feat: Add outputs_to_string to Tool and ComponentTool (#9152)
* Add outputs_to_string to Tool and ComponentTool

* Doc string and fix tests

* Add reno

* Fix mypy
2025-04-01 14:04:50 +02:00
Sebastian Husch Lee
bde2d77df0
feat: Move storing of messages into State in Agent (#9150)
* Update messages to be stored in State so users can control how they are stored through a handler in the schema

* Fix test

* Add test

* Add reno

* Fix docstring
2025-04-01 11:29:44 +02:00
Julian Risch
f687d49fec
feat: Add option to split by number of tokens to RecursiveDocumentSplitter (#9143)
* add token split_unit

* fix overlap with fallback

* reno

* mark as integration tests

* use type ignore instead of assert

* Update releasenotes/notes/recursive-splitter-token-df56428887ac45bd.yaml

Co-authored-by: David S. Batista <dsbatista@gmail.com>

---------

Co-authored-by: David S. Batista <dsbatista@gmail.com>
2025-04-01 09:48:59 +02:00
Stefano Fiorucci
b12af1e6a9
chore: use deserialize_chatgenerator_inplace utility function in Agent (#9149) 2025-03-31 16:00:59 +00:00
Stefano Fiorucci
adc3dfc5d2
refactor: LLM evaluators - introduce chat_generator init param; deprecate api, api_key and api_params (#9122)
* start

* progress

* tests for deserialize_chatgenerator_inplace

* progress on llmevaluator + tests

* update context relevance evaluator

* update faithfulness evaluator + tests

* release note

* rm unused import

* rm indentation
2025-03-31 15:35:03 +02:00
Julian Risch
fc33382b48
feat: Agent checks that its chat_generator supports tools (#9144)
* check that chat_generator run accepts tools

* reno
2025-03-31 14:47:38 +02:00
Julian Risch
c8918e43ba
feat: support multiple exit conditions in Agent and rename init param (#9132)
* rename to exit_conditions and accept list of str

* reno

* Update haystack/components/agents/agent.py

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

---------

Co-authored-by: Stefano Fiorucci <stefanofiorucci@gmail.com>
2025-03-31 09:02:25 +00:00
Julian Risch
e483ec6f56
feat: integrate Agent from haystack-experimental (#9112)
* add Agent

* add Agent

* update imports

* add state tests

* reno

* remove State, its utils, and tests

* add pydoc yml for agents

* fix module path in serialization test

* fix mypy error and use ChatGenerator protocol

* remove unused import

* address review feedback

* remove unused _load_component
2025-03-28 14:23:39 +01:00
Stefano Fiorucci
637dcb4599
fix: DALLEImageGenerator - ensure max_retries is correctly set when 0 (#9131)
* fix: DALLEImageGenerator - ensure max_retries correctly set when 0

* other small fixes

* wording
2025-03-28 14:21:07 +01:00
scara
18367203a8
fix: manage max_retries=0 in AzureOpenAIGenerator, AzureOpenAIChatGenerator, AzureOpenAITextEmbedder, AzureOpenAIDocumentEmbedder (#9128)
* fix: manage max_retries=0 in AzureOpenAIGenerator and AzureOpenAIChatGenerator

* fix: manage max_retries=0 in AzureOpenAITextEmbedder and AzureOpenAIDocumentEmbedder
2025-03-28 13:11:09 +01:00
Stefano Fiorucci
01957b106a
refactor: use token inSentenceTransformersDiversityRanker (#9126)
* chore: use token in SASEvaluator and SentenceTransformersDiversityRanker

* directly pass token to CrossEncoder

* restrict scope to SentenceTransformersDiversityRanker
2025-03-28 12:14:11 +01:00
Julian Risch
657d09d7f1
feat: integrate updates of Tool, ToolInvoker, State, create_tool_from_function, ComponentTool from haystack-experimental (#9113)
* update Tool,ToolInvoker,ComponentTool,create_tool_from_function

* add State and its utils

* add tests for State and its utils

* update tests for Tool etc.

* reno

* fix circular imports

* update experimental imports in tests

* fix unit tests

* fix ChatGenerator unit tests

* mypy

* add State to init and pydoc

* explain State in more detail in release note

* add test from #8913

* re-add _check_duplicate_tool_names and refactor imports

* rename inputs and outputs
2025-03-28 10:49:23 +01:00
David S. Batista
726b7ef0c4
fix: removing unused varible in (#9125) 2025-03-27 17:22:38 +00:00
Stefano Fiorucci
cf97ba2a68
ci: review required jobs (#9124)
* ci: review required jobs

* retrigger

* rm trigger
2025-03-27 18:12:27 +01:00
Stefano Fiorucci
06512a8696
chore: skip typing_extensions license check (#9120)
* chore: skip typing_extensions license check

* unrelated: remove unused imports to fix linting
2025-03-27 11:59:58 +00:00
Stefano Fiorucci
7135945e01
test: temporarily skip test_to_mermaid_image integration test (#9121) 2025-03-27 11:46:20 +00:00
Mohammed Abdul Razak Wahab
54743964fd
Add compatibility checks for Callable types (#9033)
* Add compatibility checks for Callable types

* add release notes

* Update test_type_utils.py

Fix license header

* Update type_utils.py

Fix license header

---------

Co-authored-by: Michele Pangrazzi <xmikex83@gmail.com>
2025-03-27 11:54:10 +01:00
Stefano Fiorucci
60089d0cbd
chore: remove unused check_generation_params utility function (#9119) 2025-03-27 10:32:55 +00:00
David S. Batista
67de0369c7
fix: converting methods to staticmethod and fixing docstrings in DocumentRecallEvaluator 2025-03-26 16:43:09 +00:00
Stefano Fiorucci
0db91d61f7
chore: ignore mypy issue due to sentence transformers 4.0.1 (#9118) 2025-03-26 17:01:44 +01:00
Stefano Fiorucci
e4cf460bf6
refactor!: use Chat Generator in LLM evaluators (#9116)
* use chatgenerator instead of generator

* rename generator to _chat_generator

* rm print

* Update releasenotes/notes/llm-evaluators-chat-generator-bf930fa6db019714.yaml

Co-authored-by: David S. Batista <dsbatista@gmail.com>

---------

Co-authored-by: David S. Batista <dsbatista@gmail.com>
2025-03-26 15:38:56 +01:00
Vladimir Blagojevic
13941d8bd9
feat: LinkContentFetcher - replace requests with httpx, add async and http/2 (#9034)
* LinkContentFetcher - replace requests with httpx, add async and http/2

* Update haystack/components/fetchers/link_content.py

Co-authored-by: Julian Risch <julian.risch@deepset.ai>

* Update haystack/components/fetchers/link_content.py

Co-authored-by: Julian Risch <julian.risch@deepset.ai>

* PR feedback

* Merge sync and async

---------

Co-authored-by: Julian Risch <julian.risch@deepset.ai>
2025-03-26 14:55:08 +01:00
Julian Risch
e64db61973
feat: include hyperlink addresses in DOCXToDocument output (#9109)
* add DOCXLinkFormat

* handle page breaks

* add sample docx files

* make no link extraction the default

* reno

* docstring and comment
2025-03-25 13:33:18 +00:00
Stefano Fiorucci
f9cce8bf30
test: skip/remove some Pipeline.draw integration tests (#9108) 2025-03-25 13:13:42 +01:00
Stefano Fiorucci
42c9350da1
test: OpenAIChatGenerator - relax async test (#9111) 2025-03-25 12:50:57 +01:00
Amna Mubashar
1005a5ec92
enhancement: add detailed error message for failed component run (#9105)
* Enhance the error message

* Add release note

* Update test_pipeline.py
2025-03-25 12:25:42 +01:00
Stefano Fiorucci
593ca87645
ci: run mypy across the codebase (#9103)
* ci: run mypy across the codebase

* trigger

* rm trigger

* actually rm trigger

---------

Co-authored-by: David S. Batista <dsbatista@gmail.com>
2025-03-25 12:14:40 +01:00
Stefano Fiorucci
4773d576bc
fix: improve component.output_types decorator type hinting to support run_async methods (#9102)
* improve output_types type hinting

* better name

* docstrings
2025-03-24 19:34:56 +01:00
Stefano Fiorucci
6db8f0a40d
refactor: LLMMetadataExtractor - adopt ChatGenerator protocol: deprecate generator_api, generator_api_params and LLMProvider (#9099)
* draft

* improvements + tests

* release note

* mypy fixes

* improve relnote

* serialize chat_generator only

* small simplification

* clarify that also LLMProvider is deprecated

* revert from_dict

* test_from_dict_openai_using_chat_generator
2025-03-24 17:38:09 +00:00
David S. Batista
dae8c7baba
docs: fixing docstrings (#9092) 2025-03-23 09:27:36 +00:00
Stefano Fiorucci
1c1030efc6
chore: make Haystack warnings consistent (#9083)
* chore: make Haystack warnings consistent

* more structured logging

* small fixes
2025-03-21 18:18:55 +01:00
dependabot[bot]
3e435439d9
build(deps): bump fossas/fossa-action from 1.5.0 to 1.6.0 (#9089)
Bumps [fossas/fossa-action](https://github.com/fossas/fossa-action) from 1.5.0 to 1.6.0.
- [Release notes](https://github.com/fossas/fossa-action/releases)
- [Commits](https://github.com/fossas/fossa-action/compare/v1.5.0...v1.6.0)

---
updated-dependencies:
- dependency-name: fossas/fossa-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-21 18:02:57 +01:00
Stefano Fiorucci
aa82adf9a2
refactor!: ChatMessage serialization-deserialization updates (#9069)
* chatmessage serde updates

* improvements and relnotes

* improve relnotes

* simplification

* warning proposal
2025-03-21 11:59:26 +01:00
Stefano Fiorucci
67ab3788ea
test: OpenAIChatGenerator - fix flaky test (#9075)
Co-authored-by: Amna Mubashar <amnahkhan.ak@gmail.com>
2025-03-20 14:29:07 +00:00
Sebastian Husch Lee
f3fc6894fd
Update docstring and prevent name collisions (#9078)
* Update docstring and prevent name collisions

* tracer in async pipeline not tracking same inputs as sync pipeline
2025-03-20 13:59:31 +01:00
Amna Mubashar
833109900c
fix: improve error message for incorrect component types (#9066)
* Update error statement


* Add a new test

---------

Co-authored-by: Sebastian Husch Lee <sjrl@users.noreply.github.com>
2025-03-20 13:23:57 +01:00
Stefano Fiorucci
db50579bbf
feat: ChatGenerator protocol (#9074)
* feat: ChatGenerator protocol

* move protocol to better location
2025-03-20 11:58:09 +01:00
Stefano Fiorucci
2d974ab4ad
chore: remove unused logger from several modules (#9073) 2025-03-20 09:04:56 +01:00
David S. Batista
be2d1fb303
feat: adding AutoMergingRetriever and HierarchicalDocumentSplitter (#9067)
* adding Auto-Merging-Retriever

* adding release notes

* updating tests

* adding renamed file

* Update haystack/components/preprocessors/hierarchical_document_splitter.py

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

* Update haystack/components/retrievers/auto_merging_retriever.py

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

* fixing tests and imports

* adding pydoc

* adding to type checking

---------

Co-authored-by: Stefano Fiorucci <stefanofiorucci@gmail.com>
2025-03-19 18:25:23 +00:00
tstadel
9a046ed431
fix: don't break on IndexError in logging (#9068)
* fix: don't break on IndexError in logging

* add reno

* Update releasenotes/notes/fix-logging-index-error-c58691db633542c5.yaml

---------

Co-authored-by: David S. Batista <dsbatista@gmail.com>
2025-03-19 17:46:35 +01:00
mathislucka
9fbfa9676f
feat: time extension for ChatPromptBuilder (#9001)
* feat: time extension for ChatPromptBuilder

* chore: release notes

* Fix comment

---------

Co-authored-by: Sebastian Husch Lee <sjrl423@gmail.com>
2025-03-19 15:38:55 +01:00