14 Commits

Author SHA1 Message Date
Sebastian Husch Lee
85258f0654
fix: Fix types and formatting pipeline test_run.py (#9575)
* Fix types in test_run.py

* Get test_run.py to pass fmt-check

* Add test_run to mypy checks

* Update test folder to pass ruff linting

* Fix merge

* Fix HF tests

* Fix hf test

* Try to fix tests

* Another attempt

* minor fix

* fix SentenceTransformersDiversityRanker

* skip integrations tests due to model unavailable on HF inference

---------

Co-authored-by: anakin87 <stefanofiorucci@gmail.com>
2025-07-03 09:49:09 +02:00
David S. Batista
c82a3377f2
chore: cleaning up tests (#9443) 2025-05-26 15:12:19 +02:00
Stefano Fiorucci
aa82adf9a2
refactor!: ChatMessage serialization-deserialization updates (#9069)
* chatmessage serde updates

* improvements and relnotes

* improve relnotes

* simplification

* warning proposal
2025-03-21 11:59:26 +01:00
mathislucka
9fbfa9676f
feat: time extension for ChatPromptBuilder (#9001)
* feat: time extension for ChatPromptBuilder

* chore: release notes

* Fix comment

---------

Co-authored-by: Sebastian Husch Lee <sjrl423@gmail.com>
2025-03-19 15:38:55 +01:00
Sebastian Husch Lee
363ac504dc
feat: Add warning to ChatPromptBuilder and PromptBuilder if they have variables, but required_variables is not set (#9027)
* Add warning to ChatPromptBuilder and PromptBuilder if they have variables, but required variables is not set.

* Add reno
2025-03-12 15:35:19 +01:00
David S. Batista
7d51793727
chore: cleaning up unused imports in tests (#8887) 2025-02-20 16:56:16 +00: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
Stefano Fiorucci
c8685aa141
refactor: update components to access ChatMessage.text instead of content (#8589)
* introduce text property and deprecate content

* release note

* use chatmessage.text

* release note

* linting
2024-11-28 10:16:07 +00:00
Stefano Fiorucci
51c1390426
chore: use class methods to create ChatMessage (#8581)
* use class methods to build messages

* fix failing format
2024-11-28 09:35:24 +00:00
Sebastian Husch Lee
eace2a99e5
feat: Add Literal["*"] option to required_variables in ChatPrompBuilder and PromptBuilder (#8572)
* Add new option for required_variables in PromptBuilder and ChatPromptBuilder

* Add reno note

* Add tests
2024-11-22 16:27:50 +01:00
Vladimir Blagojevic
b2c19a8c7a
feat: ChatPromptBuilder copies entire ChatMessage rather than copying content field only (#8317)
* Initial implementation of ChatMessage copy and deepcopy

* Add reno release note

* Satisfy hawkeye

* Remove copy and deepcopy, no need to complicate things

* Add new reno note

* Add unit test
2024-09-02 18:06:38 +02:00
Marie-Luise Klaus
031b0bfbd8
fix: ChatPromptBuilder from_dict if template is None (#8165)
* fix ChatPromptBuilder from dict if template=None

* fix ChatPromptBuilder from dict if template=None

* leave template None

---------

Co-authored-by: Marie-Luise Klaus <marieluise.klaus@deepset.ai>
2024-08-06 14:48:04 +02:00
Carlos Fernández
57c1d47c7d
fix: ChatPromptBuilder Fails to JSON Serialize (#7849)
* implement serialization for chat messages and add tests

* implement serialization for ChatPromptBuilder and test it

* add reno

* solve mypy type error

* solve mypy type error

* remove flattening parameter in to_dict

* simplify to jus non-flat metadata

* try to fix linting issue

* solve format issues

* update test for ChatPromptBuilder

* remove unused import

---------

Co-authored-by: David S. Batista <dsbatista@gmail.com>
2024-06-20 13:20:52 +02:00
tstadel
98fd270428
feat: add ChatPromptBuilder, deprecate DynamicChatPromptBuilder (#7663) 2024-05-23 19:04:55 +02:00