David S. Batista
425ce9b98f
test: updating HuggingFaceAPIChatGenerator tests
2025-01-14 16:47:29 +01:00
Stefano Fiorucci
3f15f38c51
refactor: move Tool
to a separate package; refactor serde ( #8690 )
...
* move tool to separate package; refactor serde
* release note
* rm unused import
2025-01-09 12:30:13 +01:00
Stefano Fiorucci
2bc58d2987
feat: support for tools in HuggingFaceAPIChatGenerator
( #8661 )
...
* message conversion function
* hfapi w tools
* right test file + hf_hub version
* release note
* feedback
2024-12-19 15:04:37 +01:00
Stefano Fiorucci
ea3602643a
feat!: new ChatMessage
( #8640 )
...
* 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>
2024-12-17 17:02:04 +01:00
Vladimir Blagojevic
09b95746a2
feat: HuggingFaceAPIChatGenerator add token usage
data ( #8375 )
...
* Ensure HuggingFaceAPIChatGenerator has token usage data
* Add reno note
* Fix release note
2024-09-23 15:40:50 +02:00
Stefano Fiorucci
e17d0c4192
chore: deprecate to_openai_format
and create similar utility functions ( #8146 )
...
* deprecate and add new specific functions
* reno
2024-08-02 16:47:17 +02:00
Vladimir Blagojevic
a59de1d7b3
chore: Combined main unblock ( #8045 )
...
* 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
2024-07-19 10:39:10 +02:00
Vladimir Blagojevic
535a281eec
feat: Add option to use HF_TOKEN
as env var for authentication across all HF components ( #7942 )
...
* Read both HF_API_TOKEN and HF_TOKEN env vars in all HF related components
* Add reno note
* Test fixes
* More test updates
* More test updates
2024-06-27 10:31:58 +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
Stefano Fiorucci
7c9532b200
fix broken serialization of HFAPI components ( #7661 )
2024-05-08 17:14:37 +02:00
Vladimir Blagojevic
5f813373eb
chore: Update huggingface_hub classes used after library upgrade ( #7631 )
...
* 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
2024-05-03 10:14:54 +02:00
Stefano Fiorucci
081757c6b9
test: replace mistral-7b with zephyr-7b-beta in tests ( #7576 )
...
* replace mistral-7b with gemma-2b-it in tests
* rm wrong comment
* change model
2024-04-23 13:56:07 +02:00
Stefano Fiorucci
39be515ba6
skip HF integrations tests if running from fork ( #7517 )
2024-04-09 17:47:13 +02:00
Stefano Fiorucci
0dbb98c0a0
feat: HuggingFaceAPIChatGenerator
( #7480 )
...
* draft
* docstrings and more tests
* deprecation; reno
* pydoc config
* better error messages
* wip
* add test
* better docstrings
* deprecation; reno
* pylint
* typo
* rm unneeded else
* rm unneeded else
* fixes from feedback
* docstring showing the enum
* improve docstring
* make params mandatory
* Apply suggestions from code review
Co-authored-by: Madeesh Kannan <shadeMe@users.noreply.github.com>
* document enum
* Update haystack/utils/hf.py
Co-authored-by: Madeesh Kannan <shadeMe@users.noreply.github.com>
* mandatory params
* fix test
* fix test
---------
Co-authored-by: Madeesh Kannan <shadeMe@users.noreply.github.com>
2024-04-05 18:48:34 +02:00