* Tools warmup initial
* Fix lint
* Improve pydocs for warm_up
* Further improve pydocs for warm_up
* No need to warm_up tools in Agent as they are warmed up by ToolInvoker
* Simplify Toolset __add__ logic
* Simplify _ToolsetWrapper
* Add unit tests
* ToolInvoker warm_up
* Improve Tool pydoc
* Resurrect serde_utils.py
* Update tests
* Call ToolInvoker warm_up in agent warm_up
* Lint
* Move warm_up tests to ToolInvoker
* Update tests
* Remove tests
* Pydoc nit
* PR feedback
* ToolInvoker's warm_up is idempotent
* Add reno note
* Update releasenotes/notes/tools-warm-up-support-e16cc043fed3653f.yaml
Co-authored-by: Sebastian Husch Lee <10526848+sjrl@users.noreply.github.com>
* Make ComponentTool warm_up idempotent
* Update warm_up_tools to use ToolsType
* Linting
* Add warm up test for mixed list of Tool/Toolset instances
---------
Co-authored-by: Sebastian Husch Lee <10526848+sjrl@users.noreply.github.com>
* Add ability to pass breakpoint and snapshot to agent at runtime
* Update releasenotes/notes/pass-agent-breakpoint-and-snapshot-5ac32800899d0bab.yaml
Co-authored-by: David S. Batista <dsbatista@gmail.com>
---------
Co-authored-by: David S. Batista <dsbatista@gmail.com>
* feat: select tools at runtime
* pass tools to ToolInvoker too for consistency
* refactoring
* add reno
* apply feedback and add tools to run_async
* add tests
* fix mypy
* chore: enable tool selection when running from snapshot as well
* fix pylint
* apply feedback
* Update haystack/components/agents/agent.py
Co-authored-by: Sebastian Husch Lee <10526848+sjrl@users.noreply.github.com>
* Update releasenotes/notes/add-tools-to-agent-run-params-3aa9c75ee548c38d.yaml
Co-authored-by: Sebastian Husch Lee <10526848+sjrl@users.noreply.github.com>
* add raises
* add more tests
---------
Co-authored-by: Sebastian Husch Lee <10526848+sjrl@users.noreply.github.com>
* Added backend class for SparseEncoder and also SentenceTransformersSparseTextEmbedder
* Added SentenceTransformersSparseDocumentEmbedder
* Created a separate _SentenceTransformersSparseEmbeddingBackendFactory and added tests
* Remove unused parameter
* Wrapped output into SparseEmbedding dataclass + fix tests
* Return correct SparseEmbedding, imports and tests
* fix fmt
* Style changes and fixes
* Added a test for embed function
* Added integration test and fixed some other tests
* Add lint fixes
* Fixed positional arguments
* fix types, simplify and more
* fix
* token fixes
* pydocs, small model in test, cache improvement
* try 3.9 for docs
* better to pin click
* release note
* small fix
---------
Co-authored-by: anakin87 <stefanofiorucci@gmail.com>
* test: better retry configurations for HF API Embedders integration tests
* shorter delay, test only on Ubunt
* try different settings
* fail fast via timeout
* feat(fetcher): support custom requests in LinkContentFetcher
* feat(fetcher): support custom request headers in LinkContentFetcher + tests
* undo changes in file
* feat: add domain filtering with subdomain exclusion to SerperDevWebSearch
- Introduced `exclude_subdomains` parameter to control whether to include subdomains in search results.
- Implemented `_is_domain_allowed` method to enforce domain filtering based on the new parameter.
- Updated tests to verify functionality of domain filtering and subdomain exclusion.
* Fix error in test
* Remove redundant test for `to_dict` method in `TestSerperDevSearchAPI` class
* Fix linting
---------
Co-authored-by: Amna Mubashar <amnahkhan.ak@gmail.com>
* Fix inconsistent top_k validation in SentenceTransformersDiversityRanker
- change elif to if in run() method to ensure top_k validation always
runs regardless of whatever top_k comes from init or runtime
- Both scenarios now consistently raise ValueError with descriptive
message format: 'top_k must be between 1 and X, but got Y'
- Fixes inconsistency where init top_k gave confusing MMR error while
runtime top_k gave clear validation error
* improvements
---------
Co-authored-by: Stefano Fiorucci <stefanofiorucci@gmail.com>
* Make source_id_meta_field also work with a list of values
* Fix
* Add reno
* Update docstring
* Add unit test
* Update test
* Adding more tests and simplifying logic
* Simplify
* modify Documents Classifiers and Extractors to not make in-place changes
* Add e2e test for NER
* Add unit test for NER
* fixes + refinements
---------
Co-authored-by: anakin87 <stefanofiorucci@gmail.com>
* fix: prevent in-place mutation of documents after embeddings by using deepcopy
* Add tests
* use from dataclasses import replace instead of deepcopy
* Address PR comments
* feat: add ReasoningContent to ChatMessage
* more tests
* release note
* Update haystack/dataclasses/chat_message.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>
* 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>
* feat(huggingface-api): #9671 add image support to HuggingFaceAPIChatGenerator
* docs: add release notes for image support in HuggingFaceAPIChatGenerator
* Fixed comments on PR: implementation, testing, default value for validation
* refinements
---------
Co-authored-by: anakin87 <stefanofiorucci@gmail.com>
* wip: fixing tests
* wip: fixing tests
* wip: fixing tests
* wip: fixing tests
* fixing circular imports
* decoupling resume and initial run() for agent
* adding release notes
* re-raising BreakPointException from pipeline.run()
* fixing imports
* refactor: Refactor suggestions for Pipeline breakpoints (#9614)
* Refactoring
* Start adding debug_path into Breakpoint class
* Fully move debug_path into Breakpoint dataclass
* Simplifications in pipeline run logic
* More simplification
* lint
* More simplification
* Updates
* Rename resume_state to pipeline_snapshot
* PR comments
* Missed renaming of state in a few more places
* feat: Add dataclasses to represent a `PipelineSnapshot` and refactored to use it (#9619)
* Refactor to use dataclasses for PipelineSnapshot and AgentSnapshot
* Fix integration tests
* Mypy
* Fix mypy
* Fix lint
* Refactor AgentSnapshot to only contain needed info
* Fix mypy
* More refactoring
* removing unused import
---------
Co-authored-by: David S. Batista <dsbatista@gmail.com>
* feat: saving include_outputs_from intermediate results to `PipelineState` object (#9629)
* saving intermediate components results in include_outputs_from into the PipelineSnaptshot
* cleaning up
* fixing tests
* fixing tests
* extending tests
* Update haystack/dataclasses/breakpoints.py
Co-authored-by: Sebastian Husch Lee <10526848+sjrl@users.noreply.github.com>
* Update haystack/dataclasses/breakpoints.py
Co-authored-by: Sebastian Husch Lee <10526848+sjrl@users.noreply.github.com>
* linting
* moving intermediate results to pipeline state and adding pipeline outputs to state
* moving ordered_component_names and include_outputs_from to PipelineSnapshot
* moving original_input_data to PipelineSnapshot
* simplifying saving the intermediate results
* Update haystack/dataclasses/breakpoints.py
Co-authored-by: Sebastian Husch Lee <10526848+sjrl@users.noreply.github.com>
* Update haystack/dataclasses/breakpoints.py
Co-authored-by: Sebastian Husch Lee <10526848+sjrl@users.noreply.github.com>
* Update haystack/dataclasses/breakpoints.py
Co-authored-by: Sebastian Husch Lee <10526848+sjrl@users.noreply.github.com>
* Update haystack/dataclasses/breakpoints.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>
* linting
* cleaning up
* avoiding creating PipelineSnapshot for every component run
* removing unecessary code
* Update checks in Agent to not unecessarily create AgentSnapshot when not needed.
* Update haystack/components/agents/agent.py
Co-authored-by: Sebastian Husch Lee <10526848+sjrl@users.noreply.github.com>
* Update haystack/components/agents/agent.py
Co-authored-by: Sebastian Husch Lee <10526848+sjrl@users.noreply.github.com>
* cleaning up tests
* linting
---------
Co-authored-by: Sebastian Husch Lee <10526848+sjrl@users.noreply.github.com>
Co-authored-by: Sebastian Husch Lee <sjrl423@gmail.com>
* feat: added to init
* feat: added return_embedding in to_dict
* feat: added return_embedding to filter_documents
* feat: added return_embedding to bm25_retrieval
* refactor: embedding_retrieval to use return_embedding attribute rather than parameter passed
* docs: added releasenote
* fix: pop from doc_fields instead of changing return_documents attr to none
* fix: made return_embedding an optional field and removed deprecation warning
* fix: give return_embedding a higher priority than self.return_embedding
* feat: changed default behaviour of return_embedding to True
* chore: update tests after InMemory Document store update
* Update releasenotes/notes/update-in-memory-document-store-17f555695caf9d52.yaml
Co-authored-by: Sebastian Husch Lee <10526848+sjrl@users.noreply.github.com>
* chore: update docs
* chore: enhanced clarity and redability of expression
* test: return_embedding is set to false during initialization
* test: overriding return_embedding inside
* fix: changed the use of self.filter_documents to actual implementation inside `embedding_retrieval`
Signed-off-by: rafaeljohn9 <rafaeljohb@gmail.com>
---------
Signed-off-by: rafaeljohn9 <rafaeljohb@gmail.com>
Co-authored-by: Sebastian Husch Lee <10526848+sjrl@users.noreply.github.com>