* Add serialization to State
* Add release notes
* Deprecate State in dataclasses
* Fix tests
* Remove state_utils test
* Fix linting
* Fix formating
* Update tests and remove old state utils
* Update agents test
* Update deserilaization per review
* Linting
* Add tests for edge case (custom class types)
* Fix type serialization
* PR comments
* Move State to agents
* Fix tests
* Update utils init
* Improve seriliaztion/deser
* Update the release notes
* Minor fix in docstrings
* PR comments
* Add deprecation warnign for state utils
* Recreate the serialization methods to use schema
* Update key names
* Make serialization methods private
* initial import
* small fixes
* adding tests
* adding tests
* refactoring merge graphs
* updating tests
* docstrings
* adding release notes
* adding SuperComponent name to extended components
* adding colours and legend to different super components
* adding missed docstring parameter
* fixing tests and type checking
* Update haystack/core/pipeline/base.py
Co-authored-by: Sebastian Husch Lee <10526848+sjrl@users.noreply.github.com>
* forcing keyword arguments for draw() and show()
* adding wrapper function and a deprecation warning
* adding pylint disable - this will be removed soon
* wip
* adding a decorator function to test if another function is being called with positional arguments
* adding a decorator function to test if another function is being called with positional arguments
---------
Co-authored-by: Sebastian Husch Lee <10526848+sjrl@users.noreply.github.com>
- Add type annotations to the `_Component.__call__` function that
backs `@component`. This fixes "decorator ignored" warnings of
Pyright in "strict" type-checking mode.
- Type-check that a `@component` class conforms to the `Component`
protocol (i.e., that it has a `run()` method).
- Relax the `run()` return type required by the `Component` protocol
from `Dict[str, Any]` to `Mapping[str, Any]`. The former is
incompatible with `TypedDict`, which makes it impossible to
type a component's precise outputs. `Mapping` fixes this because
it is covariant, i.e. the value type may be more specific than
`Any`.
* Starting property schema refactor
* Adding more tests
* More tests
* Handle null type explicitly
* More updates of tests to accomodate Optional properly
* Fix more tests
* Remove unecessary check
* Some cleanup
* Update test
* Add reno
* Fix typing
* Add license header
* Use docstrings of dataclasses in parameter spec generation
* More tests of Haystack dataclass types
* Properly handle Sequence
* Fix license header
* Update OpenAI tests to add more complicated tool parameter signature
* Properly set required for dataclasses
* Add integration test for azure that includes additionalProperties
* Add more complicated integration test for HuggingFaceAPIChatGenerator
* Alternate approach using pydantic like we do in from_function.py
* Cleanup and fix other affected tests
* Fix mypy
* PR comments
* PR comment
* Remove test from HF API
* Update reno
* Update reno
* experimenting with py.typed
* try changing run method in protocol
* Trigger Build
* better docstring + release note
* remove type:ignore where possible
* Removed a few more type: ignores
---------
Co-authored-by: Sebastian Husch Lee <sjrl423@gmail.com>
* First pass at fix for deepcopying inputs and outputs
* Add reno
* Add recursion for dict objects
* Bump recursion depth
* More tests and some improvments
* Fix unit tests
* PR comments
* fix: make QUOTE_SPANS_RE regex ReDoS-safe
* Removing the capture of leading non-character on double quotes, allowing quote with new lines, adding tests
* cleaning
* fixing release notes
* changing import
* adding test for Regex Denial of Service (ReDoS)
* reducing the size/time of tests
* Update test/components/preprocessors/test_sentence_tokenizer.py
Co-authored-by: Stefano Fiorucci <stefanofiorucci@gmail.com>
* Update test/components/preprocessors/test_sentence_tokenizer.py
---------
Co-authored-by: Waivey <waivey@proton.me>
Co-authored-by: Stefano Fiorucci <stefanofiorucci@gmail.com>
* feat: add visualization methods to SuperComponent for pipeline representation
* refactor: update show and draw methods in SuperComponent to return None
* test: add unit tests
* add release note
* chore: update copyright year
* test: move unit tests to test_super_component
* Update releasenotes/notes/add-pipeline-viz-to-supercomponent-80165756cc777056.yaml
---------
Co-authored-by: David S. Batista <dsbatista@gmail.com>
* feat: Add sanitization for Meta field during serialization
* Revert "feat: Add sanitization for Meta field during serialization"
This reverts commit c529f7c25b69aed626bb2072c8bf171815b591cc.
* feat: add nested serialization in openai usage object
* add reno
* add nested serialization in OpenAiChatGenerator
* Update releasenotes/notes/nested-serialization-openai-usage-object-3817b07342999edf.yaml
Co-authored-by: Amna Mubashar <amnahkhan.ak@gmail.com>
* merge tests
* Adjust the test
---------
Co-authored-by: Amna Mubashar <amnahkhan.ak@gmail.com>
Co-authored-by: Sebastian Husch Lee <sjrl@users.noreply.github.com>
* AzureOCR: convert integration test to unit test and simplify
* clean up HuggingFaceAPITextEmbedder
* clean up LinkContentFetcher
* simplify HuggingFaceLocalGenerator
* clean up OpenAIGenerator
* OpenAIChatGenerator
* SentenceTransformersDiversityRanker
* TransformersSimilarityRanker
* ChatMessage: rm outdated tests
* fail fast false
* typo
* feat: Add support for multiple outputs in ConditionalRouter
* Update haystack/components/routers/conditional_router.py
Co-authored-by: Sebastian Husch Lee <sjrl@users.noreply.github.com>
* add additional route
---------
Co-authored-by: Sebastian Husch Lee <sjrl@users.noreply.github.com>
* Fix for handling wrapped ChatCompletion instances in streaming (used by tools like weave)
* Add release note
* Applied same fix to OpenAIGenerator ; Refactoring ; Update release note
* Fix integration test error after refactoring