Commit Graph

57 Commits

Author SHA1 Message Date
manjunath bhaskar f1f19e39d2 fix: DocumentJoiner top_k=0 is treated as unset instead of returning … (#12217)
Co-authored-by: David S. Batista <dsbatista@gmail.com>
2026-08-05 14:40:45 +00:00
Stefano Fiorucci 2618dae126 docs: fix failing python code snippets (#12002)
Co-authored-by: David S. Batista <dsbatista@gmail.com>
2026-07-14 12:57:00 +02:00
Sebastian Husch Lee a7bf71e0cc Merge branch 'main' of github.com:deepset-ai/haystack into merge-main-into-v3 2026-06-23 15:25:50 +02:00
dav nguyxn 0d0c48ef67 fix: AnswerJoiner no longer crashes when sorting answers with a None score (#11701) 2026-06-23 14:13:10 +02:00
Sebastian Husch Lee f962e67347 chore: Merge main into v3 (#11715)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Anubhav Anand <76263415+i-anubhav-anand@users.noreply.github.com>
Co-authored-by: Julian Risch <julian.risch@deepset.ai>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: Srivatsa Kamballa <skamb10@uic.edu>
Co-authored-by: David S. Batista <dsbatista@gmail.com>
Co-authored-by: gyx09212214-prog <gyx09212214@gmail.com>
Co-authored-by: gyx09212214-prog <243787584+gyx09212214-prog@users.noreply.github.com>
Co-authored-by: Haystack Bot <73523382+HaystackBot@users.noreply.github.com>
Co-authored-by: anakin87 <44616784+anakin87@users.noreply.github.com>
Co-authored-by: milljer <milljer@users.noreply.github.com>
Co-authored-by: bogdankostic <48713846+bogdankostic@users.noreply.github.com>
Co-authored-by: julian-risch <4181769+julian-risch@users.noreply.github.com>
Co-authored-by: davidsbatista <7937824+davidsbatista@users.noreply.github.com>
Co-authored-by: AxelRay <raynaldo.axel@gmail.com>
Co-authored-by: Ayush <158567328+Ayushhgit@users.noreply.github.com>
Co-authored-by: bogdankostic <bogdankostic@web.de>
Co-authored-by: Ashith Fernandes <fernandesashith24@gmail.com>
Co-authored-by: Kunal <kkunal_be23@thapar.edu>
Co-authored-by: Aditya Raut <rautaditya2606@gmail.com>
2026-06-22 18:04:43 +02:00
Anubhav Anand 2b21aa6fe3 fix: raise a clear error for zero-sum weights in DocumentJoiner (#11629)
Co-authored-by: bogdankostic <bogdankostic@web.de>
2026-06-19 11:50:10 +02:00
Stefano Fiorucci 6411c8cef9 chore!: remove sentence transformers components (#11646) 2026-06-16 12:23:49 +02:00
Sebastian Husch Lee 515980d50b chore: Merge main into v3 (#11558)
Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: NIK-TIGER-BILL <59732804+NIK-TIGER-BILL@users.noreply.github.com>
Co-authored-by: Pragnyan Ramtha <pragnyanramtha@gmail.com>
Co-authored-by: Julian Risch <julian.risch@deepset.ai>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Aarkin Karnik <56022539+Aarkin7@users.noreply.github.com>
Co-authored-by: Haystack Bot <73523382+HaystackBot@users.noreply.github.com>
Co-authored-by: Stefano Fiorucci <stefanofiorucci@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: davidsbatista <7937824+davidsbatista@users.noreply.github.com>
Co-authored-by: bogdankostic <48713846+bogdankostic@users.noreply.github.com>
Co-authored-by: bogdankostic <bogdankostic@web.de>
Co-authored-by: Sachin Yadav <118251564+sachinn854@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: anakin87 <44616784+anakin87@users.noreply.github.com>
Co-authored-by: Abdulhamid Onawole <93547612+HamidOna@users.noreply.github.com>
Co-authored-by: David S. Batista <dsbatista@gmail.com>
Co-authored-by: Aditya Raut <rautaditya2606@gmail.com>
Co-authored-by: Nhat Huy Vu <150295143+MechaCritter@users.noreply.github.com>
Co-authored-by: julian-risch <4181769+julian-risch@users.noreply.github.com>
Co-authored-by: kota <lakotawilsonproton@gmail.com>
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Co-authored-by: devteamaegis <devteam.aegis@gmail.com>
Co-authored-by: Ritwij Aryan Parmar <88580521+RitwijParmar@users.noreply.github.com>
Co-authored-by: Srivatsa Kamballa <skamb10@uic.edu>
Co-authored-by: vidigoat <vidit.patankar16@gmail.com>
Co-authored-by: Syed Shahmeer Ali <syedshahmeerali196@gmail.com>
Co-authored-by: Mohamed Arbi <mohammedarbinsibi@gmail.com>
Co-authored-by: Zamuldinov Nikita <59732804+NIK-TIGER-BILL@users.noreply.github.com>
Co-authored-by: Bilge Yücel <bilgeyucel96@gmail.com>
Co-authored-by: jdoughty04 <jonathandoughty04@gmail.com>
Co-authored-by: Govindh Kishore <govindhkishore7@gmail.com>
2026-06-09 10:53:22 +02:00
vidigoat 6a84cfdcf0 fix: DocumentJoiner DBSF mode crashes on documents with score=None (#11491)
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Co-authored-by: Sebastian Husch Lee <10526848+sjrl@users.noreply.github.com>
2026-06-03 11:58:09 +00:00
Sebastian Husch Lee 7dd1eedde3 chore: Merge main into v3 (#11456)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Pragnyan Ramtha <pragnyanramtha@gmail.com>
Co-authored-by: Julian Risch <julian.risch@deepset.ai>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Aarkin Karnik <56022539+Aarkin7@users.noreply.github.com>
Co-authored-by: Haystack Bot <73523382+HaystackBot@users.noreply.github.com>
Co-authored-by: Stefano Fiorucci <stefanofiorucci@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: davidsbatista <7937824+davidsbatista@users.noreply.github.com>
Co-authored-by: bogdankostic <48713846+bogdankostic@users.noreply.github.com>
Co-authored-by: bogdankostic <bogdankostic@web.de>
Co-authored-by: Sachin Yadav <118251564+sachinn854@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: anakin87 <44616784+anakin87@users.noreply.github.com>
Co-authored-by: Abdulhamid Onawole <93547612+HamidOna@users.noreply.github.com>
Co-authored-by: David S. Batista <dsbatista@gmail.com>
Co-authored-by: Aditya Raut <rautaditya2606@gmail.com>
Co-authored-by: Nhat Huy Vu <150295143+MechaCritter@users.noreply.github.com>
Co-authored-by: julian-risch <4181769+julian-risch@users.noreply.github.com>
2026-06-01 10:00:44 +02:00
Aarkin Karnik d96f4f20bc fix: DocumentJoiner concatenate keeps score=0.0 over worse duplicates (#11353) 2026-05-26 09:40:56 +02:00
Sebastian Husch Lee 744198ce52 feat: Add reciprocal rank fusion to MultiRetriever (#11220) 2026-04-30 13:33:05 +02:00
David S. Batista 5b818ff4ab docs: fixing code snippets syntax errors (#10955)
* fixing docs syntax errors

* fixing a few more docs syntax errors
2026-03-27 17:03:53 +01:00
David S. Batista 52cf1c1eaa docs: fixing docs syntax errors (#10944) 2026-03-27 09:39:47 +00:00
Julian Risch 6c7348023b chore: enable ANN ruff ruleset for type annotation enforcement (#10856)
* chore: enable ANN ruff ruleset, exclude components and testing dirs

- Add ANN (flake8-annotations) to ruff select in pyproject.toml
- Globally ignore ANN401 (Any) for legitimate dynamic types
- Exclude haystack/components/** and haystack/testing/** from ANN checks
  (mirrors existing mypy disallow_incomplete_defs=false overrides)
- Fix all 43 ANN violations in the remaining modules:
  - Add -> None to __post_init__ in breakpoints, file_content,
    image_content, sparse_embedding, streaming_chunk, tool, toolset, auth
  - Add -> str to __str__ in filter_policy, auth, hf (2x)
  - Add *args: Any, **kwargs: Any + return types to metaclass __call__
    in component.py and document.py, and __new__ in chat_message.py
  - Add -> None to async _runner() in async_pipeline.py
  - Type _check_callable_compatibility args and return bool
  - Add Callable return type to _dispatch_bm25
  - Type send_telemetry decorator params and return
  - Type __init_track__ and __setattr_warn__ wrapper functions
  - Type _parse_date, _parse_generic_args, async run()

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* chore: fix ANN violations in .github/utils and docs-website scripts

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* chore: fix mypy errors introduced by ANN annotations

- async_pipeline.py: _runner() returns Mapping[str, Any], not None
- dataclasses.py: extend type: ignore to cover arg-type in addition to call-arg

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* alphabetical order of ruff rules

* fix: add ANN type annotations to haystack/components and remove per-file-ignore

Fix all ANN (flake8-annotations) violations in haystack/components/ so
the per-file-ignore for that directory can be removed entirely.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* chore: remove haystack.components.* from mypy disallow_incomplete_defs override

All ANN type annotations have been added to haystack/components/, so the
mypy override is no longer needed for that module.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-18 11:28:33 +00:00
Julian Risch 1794405984 docs: Add docstrings and type annotations (#10824)
* add type annotations to run,warm_up, __str__

* none and any type annotations

* type annotations

* __init__ return type annotation

* list[Document] instead of Any return type annotations

* fmt

* typing

* add run_async return type annotation for LinkContentFetcher

* run_async return type annotations

* fixing docstrings

---------

Co-authored-by: David S. Batista <dsbatista@gmail.com>
2026-03-16 18:16:05 +01:00
Aftab fa0281b430 fix: replace in-place dataclass mutations with dataclasses.replace() (#10702)
* fix: replace in-place dataclass mutations with dataclasses.replace()

Resolves the in-place mutation warnings introduced by the
_warn_on_inplace_mutation guard in PR #10650.

Running `hatch run test:unit | grep "Mutating attribute"` surfaced
mutations across five components. Each is replaced with
`dataclasses.replace(instance, field=new_value)` so that dataclass
instances are never mutated after creation.

Changed files:
- components/builders/chat_prompt_builder.py: replace _content mutation
  on rendered ChatMessage copy with dataclasses.replace()
- core/pipeline/pipeline.py: replace two-field mutation on PipelineSnapshot
  (agent_snapshot + break_point) with a single dataclasses.replace() call
- components/converters/image/file_to_image.py: replace ByteStream.mime_type
  mutation with dataclasses.replace()
- components/extractors/llm_metadata_extractor.py: replace Document.content
  mutation with dataclasses.replace() (already imported `replace`)
- components/fetchers/link_content.py: replace ByteStream.mime_type
  mutations in both sync and async run() methods
- components/joiners/document_joiner.py: replace Document.score mutations in
  _score_norm, _reciprocal_rank_fusion, and _distribution_based_rank_fusion
  with non-mutating list comprehensions using dataclasses.replace()

Also updates test_document_joiner.py::test_list_with_one_empty_list to
compare by document ID rather than object identity, since the test
previously relied on the mutation side-effect to make the assertion pass.

Fixes #10659

* fix: wrap long line in chat_prompt_builder and add release notes

- Break line 272 in chat_prompt_builder.py to satisfy E501 (max 120 chars)
- Add reno release note for the dataclass mutation fix

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix: replace all remaining in-place dataclass mutations with dataclasses.replace()

Address reviewer feedback:
- Remove unnecessary deepcopy in chat_prompt_builder (dataclasses.replace
  creates a new instance, so deepcopy is redundant)
- Fix in-place mutation of Document.score in HuggingFaceTEIRanker,
  MetaFieldRanker, SentenceTransformersSimilarityRanker, and
  TransformersSimilarityRanker
- Fix in-place mutation of ExtractedAnswer.query in ExtractiveReader
- Fix in-place mutation of Document.embedding in InMemoryDocumentStore
- Fix in-place mutation in test helpers (file router, document splitter
  mocks, pipeline tests, tracing tests, document equality test)
- Update release notes to list all affected components and dataclasses

* Keep in-place modification of dataclasses for tests that require it

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: bogdankostic <bogdankostic@web.de>
2026-03-06 16:40:38 +01:00
Stefano Fiorucci 819ed7244b chore: drop pylint (#10640)
* draft

* progress

* more fixes

* improvs

* strict

* rm pylint

* rm pylint comments

* fix and simplify

* standardize

* more

* alpha order

* final touch

* remove template

* rm ellipsis comments
2026-02-24 07:46:20 +00:00
Stefano Fiorucci b02a6391aa docs: remove unnecessary OutputAdapter usage in docs (#10644) 2026-02-23 15:44:06 +01:00
Stefano Fiorucci d6f8e4689a chore: add missing auto warm_up + other small changes (#10612)
* chore: remove unnecessary warm_up calls; mark EmbeddingBasedDocumentSplitter slow

* relnote
2026-02-17 17:39:04 +01:00
Sebastian Husch Lee 41c6404f8c feat: Enable components to automatically accept multiple connections if their input type is list (#10441)
* Add notes for places that would need to be updated

* First draft for supporting auto layz variadic

* Fix and add some dev comments

* Add pipeline_run test using the automatic joining behavior

* Finish todo

* Fix mypy error

* Add new test

* Add reno

* update reno

* Update releasenotes/notes/add-auto-joiners-for-lists-types-b07771e6d8add3da.yaml

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

* Apply suggestion from @sjrl

* Apply suggestion from @sjrl

* Expand dev comment

* Add more unit tests and a bit of refactoring

---------

Co-authored-by: Stefano Fiorucci <stefanofiorucci@gmail.com>
2026-01-29 11:29:19 +01:00
Stefano Fiorucci 7c6323b960 refactor: support PEP604 typing syntax (X|Y and X|None) (#10255)
* adopt X|Y syntax: draft

* cast Union

* fix pylint + state testing

* use X|Y

* rm unused imports

* trigger e2e tests

* fix + simplification

* add compatibility tests

* rm e2e tests trigger

* fix

* add relnote

* simplify/fix pep604 union parsing

* fix comments

* test _is_optional_type

* introduce _build_pep604_union_type; make _is_union_type private

* try removing problematic test
2025-12-19 15:47:51 +01:00
Vladimir Blagojevic 3ebe9b2df2 chore: Update default OpenAI model to gpt-5-mini (#10144)
* Update default OpenAI model to gpt-5-mini

* Update tests

* Fix tool invoker tests

* Update integration tests

* Update fragile test

* More robust tests

* Harden test

* More test improvements

* Better prompting, to trigger tools

* Simplify

* Simplify more

* Simplify even more, less maintenance in the future

* Mark two integration tests flaky

* Fixing fine details

* Add release note for OpenAI default model update to gpt-5-mini

* Add upgrade section to OpenAI default model release note
2025-12-01 13:55:53 +01:00
Abdelrahman Kaseb 5f3c37d287 chore: adopt PEP 585 type hints (#9678)
* chore(lint): enforce and apply PEP 585 type hinting

* Run fmt fixes

* Fix all typing imports using some regex

* Fix all typing written in string in tests

* undo changes in the e2e tests

* make e2e test use list instead of List

* type fixes

* remove type:ignore

* pylint

* Remove typing from Usage example comments

* Remove typing from most of comments

* try to fix e2e tests on comm PRs

* fix

* Add tests typing.List in to adjust test compatiplity
- test/components/agents/test_state_class.py
- test/components/converters/test_output_adapter.py
- test/components/joiners/test_list_joiner.py

* simplify pyproject

* improve relnote

---------

Co-authored-by: anakin87 <stefanofiorucci@gmail.com>
2025-08-07 10:23:14 +02:00
Stefano Fiorucci 7570f6b769 fix: re-export symbols in __init__.py files (#9521)
* chore: re-export symbols in __init__.py files

* release note
2025-06-16 16:29:08 +02:00
Bilge Yücel d977b262b6 replace all gpt-3.5-turbo with gpt-4o-mini (#9165) 2025-04-04 12:07:55 +02:00
David S. Batista 726b7ef0c4 fix: removing unused varible in (#9125) 2025-03-27 17:22:38 +00:00
Stefano Fiorucci 2d974ab4ad chore: remove unused logger from several modules (#9073) 2025-03-20 09:04:56 +01:00
David S. Batista c06a5434fc docs: updating docstring BranchJoiner 2025-03-17 17:34:55 +01:00
Sebastian Husch Lee c4fafd9b04 docs: Update docstrings of BranchJoiner (#8988)
* Update docstrings

* Add a bit more explanatory text

* Add reno

* Update haystack/components/joiners/branch.py

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

* Update haystack/components/joiners/branch.py

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

* Update haystack/components/joiners/branch.py

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

* Update haystack/components/joiners/branch.py

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

* Fix formatting

---------

Co-authored-by: Daria Fokina <daria.fokina@deepset.ai>
2025-03-06 13:08:07 +01:00
Stefano Fiorucci f3c44be904 refactor!: remove dataframe field from Document and ExtractedTableAnswer; make pandas optional (#8906)
* remove dataframe

* release note

* small fix

* group imports

* Update pyproject.toml

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

* Update pyproject.toml

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

* address feedback

---------

Co-authored-by: Julian Risch <julian.risch@deepset.ai>
2025-03-04 11:06:07 +00:00
Stefano Fiorucci 9546e69374 perf: Optimize import times (#8878)
* initial experiments

* progress

* draft

* fix header

* fix linting

* lot more lazy inits

* fixes to main init

* linting

* small refinements

* header fix

* release note

* improve consistency

* test: make sure no extra modules are being imported due to `__init__` definitions

* extend release note with an example

* refactoring import test

* updating release notes

* casting .keys() to list

* reverting to list

* Update haystack/__init__.py

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

* fixing ident problem

* better comments

---------

Co-authored-by: David S. Batista <dsbatista@gmail.com>
Co-authored-by: Julian Risch <julian.risch@deepset.ai>
2025-02-21 09:55:20 +01:00
Sebastian Husch Lee 62d0d5d3d5 Update default output type of list joiner to be correct (#8881) 2025-02-20 10:54:50 +01:00
Sebastian Husch Lee 2f383bce25 feat: Update list joiner (#8851)
* Update ListJoiner to have default type List

* Add reno

* Add more tests

* Remove unused import

* Fix mypy

* Update docstrings

* Update haystack/components/joiners/list_joiner.py

Co-authored-by: Amna Mubashar <amnahkhan.ak@gmail.com>

---------

Co-authored-by: Amna Mubashar <amnahkhan.ak@gmail.com>
2025-02-14 09:47:19 +01:00
Amna Mubashar b0809b75f5 feat: Add a ListJoiner component (#8810)
* Add a ListJoiner

* Add tests and release notes
2025-02-05 23:19:14 +01:00
David S. Batista 3da5bac8c4 refactor: converting some DocumentJoiner methods to staticmethod (#8606)
* converting some methods to static, since they change/depend on state of the object

* adding release notes

* removing tab
2024-12-06 10:28:41 +01:00
David S. Batista e349a7f2fc docs: complete docstring for DocumentJoiner code example (#8593)
* initial import

* changing a method to static

* reverting staticmethod
2024-12-05 14:04:34 +00:00
Anes Benmerzoug f5683bc8fa fix: document joiner division by zero with distribution based rank fusion (#8520)
* Parametrize document joiner tests with empty lists

* Skip loop in _distribution_based_rank_fusion if document list is empty

* Parametrize test_empty_list with join_mode

* Prevent division by zero in _merge and _reciprocal_rank_fusion

* Add release notes

---------

Co-authored-by: Silvano Cerza <silvanocerza@gmail.com>
2024-11-14 11:41:28 +00:00
Sebastian Husch Lee 294a67e426 feat: Adding StringJoiner (#8357)
* Adding StringJoiner

* Release notes

* Remove typing

* Remove unused import

* Try to fix header

* Fix one test

* Add to docs, move test to behavioral pipeline test

* Undo changes

* Fix test

* Update haystack/components/joiners/string_joiner.py

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

* Update haystack/components/joiners/string_joiner.py

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

* Provide usage example

* Apply suggestions from code review

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

---------

Co-authored-by: Stefano Fiorucci <stefanofiorucci@gmail.com>
Co-authored-by: Silvano Cerza <3314350+silvanocerza@users.noreply.github.com>
2024-10-30 15:03:41 +00:00
Silvano Cerza 0df379e6a2 feat: Deprecate @component decorator is_greedy argument (#8400)
* Deprecate @component decorator is_greedy argument

* Fix some typos and docstrings

* Add _is_lazy_variadic test
2024-09-25 11:28:30 +02:00
David S. Batista 97126eb544 fix: changing default model to gpt-4o-mini on OpenAI API calls (#8360)
* chaning default model to gpt-4o-mini

* adding release notes

* fixing some missed tests

* fixing some more missed tests

* fixing one last missed test

* fixing linting issues

* making pylint happy about an end2end test

* chaning if test to walruss operator

* fixing azure embedder from ada to text-embedding-ada-002
2024-09-17 10:36:42 +02:00
Vladimir Blagojevic 25d3520f5a feat: Add AnswerJoiner new component (#8122)
* Initial AnswerJoiner

* Initial tests

* Add release note

* Resove mypy warning

* Add custom join function

* Serialize custom join function

* Handle all Answer types, add integration test, improve pydoc

* Make fixes

* Add to API docs

* Add more tests

* Update haystack/components/joiners/answer_joiner.py

Co-authored-by: Amna Mubashar <amnahkhan.ak@gmail.com>

* Update docstrings and release notes

* update docstrings

---------

Co-authored-by: Sebastian Husch Lee <sjrl423@gmail.com>
Co-authored-by: Sebastian Husch Lee <sjrl@users.noreply.github.com>
Co-authored-by: Amna Mubashar <amnahkhan.ak@gmail.com>
Co-authored-by: Darja Fokina <daria.fokina@deepset.ai>
2024-08-01 12:51:17 +02:00
Agnieszka Marzec da81d10060 Docs: Update DocumentJoiner docstrings (#8109)
* update docstrings

* Update haystack/components/joiners/document_joiner.py

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

* Update haystack/components/joiners/document_joiner.py

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

* Update haystack/components/joiners/document_joiner.py

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

* Update haystack/components/joiners/document_joiner.py

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

* Update haystack/components/joiners/document_joiner.py

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

* fix typo

* fix typo

---------

Co-authored-by: Daria Fokina <daria.fokina@deepset.ai>
2024-07-29 14:39:44 +02:00
Anushree Bannadabhavi 1f05e633a9 refactor: refactor DocumentJoiner to follow enum pattern for join_mode parameter (#8010)
* refactor document joiner to follow enum pattern for join mode

* Added to_dict and from_dict
2024-07-12 11:29:44 +02:00
Nicola Procopio cafcf51cb0 Fixed ZeroDivisionError in JoinDocuments (#7972)
* added new strategy DBRF

* fix hook

* fix typos

* added test for DBRF

* fix format

* new release note

* reformatted with black

* Update haystack/components/joiners/document_joiner.py

Co-authored-by: Madeesh Kannan <shadeMe@users.noreply.github.com>

* updated comments

* added type-hint and return type

* fix

* revert for lint problems

* fix

* fix

* fix

* fix

* another tentative

* dict out file

* only output

* fix output

* revert

* removed unused imports

* fix typing

* fixed ZeroDivisionError

* added test

* add release note

* removed try - except

* renamed test

* Update test/components/joiners/test_document_joiner.py

Co-authored-by: Madeesh Kannan <shadeMe@users.noreply.github.com>

* Update haystack/components/joiners/document_joiner.py

Co-authored-by: Madeesh Kannan <shadeMe@users.noreply.github.com>

* fix format error

* removed releasenotes/notes/release-note-9b2bc03a8a398078.yaml

* added comment

---------

Co-authored-by: Madeesh Kannan <shadeMe@users.noreply.github.com>
Co-authored-by: anakin87 <stefanofiorucci@gmail.com>
2024-07-04 10:07:26 +02:00
Nicola Procopio 03d9057e64 Add Distribution based rank fusion mode (#7915)
* added new strategy DBRF

* fix hook

* fix typos

* added test for DBRF

* fix format

* new release note

* reformatted with black

* Update haystack/components/joiners/document_joiner.py

Co-authored-by: Madeesh Kannan <shadeMe@users.noreply.github.com>

* updated comments

* added type-hint and return type

* fix

* revert for lint problems

* fix

* fix

* fix

* fix

* another tentative

* dict out file

* only output

* fix output

* revert

* removed unused imports

* fix typing

---------

Co-authored-by: Madeesh Kannan <shadeMe@users.noreply.github.com>
Co-authored-by: anakin87 <stefanofiorucci@gmail.com>
2024-07-03 13:55:17 +02:00
Massimiliano Pippi 3a03fce71c ci: Add code formatting checks (#7882)
* ruff settings

enable ruff format and re-format outdated files

feat: `EvaluationRunResult` add parameter to specify columns to keep in the comparative `Dataframe`  (#7879)

* adding param to explictily state which cols to keep

* adding param to explictily state which cols to keep

* adding param to explictily state which cols to keep

* updating tests

* adding release notes

* Update haystack/evaluation/eval_run_result.py

Co-authored-by: Madeesh Kannan <shadeMe@users.noreply.github.com>

* Update releasenotes/notes/add-keep-columns-to-EvalRunResult-comparative-be3e15ce45de3e0b.yaml

Co-authored-by: Madeesh Kannan <shadeMe@users.noreply.github.com>

* updating docstring

---------

Co-authored-by: Madeesh Kannan <shadeMe@users.noreply.github.com>

add format-check

fail on format and linting failures

fix string formatting

reformat long lines

fix tests

fix typing

linter

pull from main

* reformat

* lint -> check

* lint -> check
2024-06-18 15:52:46 +00:00
Massimiliano Pippi 8d80ff86d9 Add BranchJoiner and deprecate Multiplexer (#7765) 2024-05-30 15:34:52 +02:00
Varun Krishnan badb05b3ab feat: allow DocumentJoiner to accept top_k parameter in run method (#7709)
* feat: allow DocumentJoiner to accept top_k parameter in run method

* Added release note for DocumentJoiner top_k fix
2024-05-23 16:03:26 +02:00
Massimiliano Pippi 10c675d534 chore: add license header to all modules (#7675)
* add license header to modules
* check license header at linting time
2024-05-09 13:40:36 +00:00