* Start expanding StreamingChunk
* First pass at expanding Streaming Chunk
* Working version!
* Some tweaks and also make ToolInvoker stream a chunk with a finish reason
* Properly update test
* Change to tool_name, remove kw_only since its python 3.10 only and update HuggingFaceAPIChatGenerator to start following new StreamingChunk
* Add reno
* Some cleanup
* Fix unit tests
* Fix mypy and integration test
* Fix pylint
* Start refactoring huggingface local api
* Refactor openai generator and chat generator to reuse util methods
* Did some reorg
* Reusue utility method in HuggingFaceAPI
* Get rid of unneeded default values in tests
* Update conversion of streaming chunks to chat message to not rely on openai dataclass anymore
* Fix tests and loosen check in StreamingChunk post_init
* Fixes
* Fix license header
* Add start and index to HFAPIGenerator
* Fix mypy
* Clean up
* Update haystack/components/generators/utils.py
Co-authored-by: Julian Risch <julian.risch@deepset.ai>
* Update haystack/components/generators/utils.py
Co-authored-by: Julian Risch <julian.risch@deepset.ai>
* Change StreamingChunk.start to only a bool
* PR comments
* Fix unit test
* PR comment
* Fix test
---------
Co-authored-by: Julian Risch <julian.risch@deepset.ai>
* Refactor HFAPI Chat Generator
* Add component info to generators
* Fix type hint
* Add reno
* Fix unit tests
* Remove incorrect dev comment
* Move _convert_streaming_chunks_to_chat_message to utils file
* 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
* 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
* Starting to refactor type util tests to be more systematic
* refactoring
* Expand tests
* Update to type utils
* Add missing subclass check
* Expand and refactor tests, introduce type_validation Literal
* More test refactoring
* Test refactoring, adding type validation variable to pipeline base
* Update relaxed version of type checking to pass all newly added tests
* trim whitespace
* Add tests
* cleanup
* Updates docstrings
* Add reno
* docs
* Fix mypy and add docstrings
* Changes based on advice from Tobi
* Remove unused imports
* Doc strings
* Add connection type validation to to_dict and from_dict
* Update tests
* Fix test
* Also save connection_type_validation at global pipeline level
* Fix tests
* Remove connection type validation from the connect level, only keep at pipeline level
* Formatting
* Fix tests
* formatting
* Revert "test: skip HF API live integration tests (#8889)"
This reverts commit 56a3a9bd61b7391ae91e3d8179b3b33918ef4932.
* Replace zephyr-7b-beta model with SmolLM2-1.7B-Instruct
* Use zephyr-7b-beta model but extend instructions
---------
Co-authored-by: David S. Batista <dsbatista@gmail.com>
* fix: use is not to compare to sentinel value
* chore: release notes
* Update releasenotes/notes/fix-component-checks-with-ambiguous-truth-values-949c447b3702e427.yaml
Co-authored-by: David S. Batista <dsbatista@gmail.com>
* fix: another sentinel value
* test: also test base class
* add pandas as test dependency
* format
* Trigger CI
* mark test with xfail strict=False
---------
Co-authored-by: Sebastian Husch Lee <sjrl@users.noreply.github.com>
Co-authored-by: David S. Batista <dsbatista@gmail.com>
Co-authored-by: anakin87 <stefanofiorucci@gmail.com>
* draft
* del HF token in tests
* adaptations
* progress
* fix type
* import sorting
* more control on deserialization
* release note
* improvements
* support name field
* fix chatpromptbuilder test
* Update chat_message.py
---------
Co-authored-by: Daria Fokina <daria.fokina@deepset.ai>
* Pin structlog to 24.2.0 due to unit test failures
* Remove object init parameter in huggingface_hub unit tests
* Use less restrictive structlog pin
* Add release note
* Update huggingface_hub classes used after library upgrade
* Fix chat tests
* Update lazy import guard and other references to huggingface_hub>=0.23.0
* In huggingface_hub 0.23.0 TextGenerationOutput property details is now optional
* More fixes
* Add reno note