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
Ulises M
b1353f4f0f
fix: append runtime meta to ChatMessage's extracted meta in AnswerBuilder ( #8544 )
...
* append runtime meta to extracted meta
* add pylint ignore flag to .run()
* explicitly convert reply to string
2024-11-20 20:07:04 +01:00
David S. Batista
97126eb544
fix: changing default model to gpt-4o-mini
on OpenAI API calls ( #8360 )
...
* chaning default model to gpt-4o-mini
* adding release notes
* fixing some missed tests
* fixing some more missed tests
* fixing one last missed test
* fixing linting issues
* making pylint happy about an end2end test
* chaning if test to walruss operator
* fixing azure embedder from ada to text-embedding-ada-002
2024-09-17 10:36:42 +02:00
Silvano Cerza
da49e782e2
chore: Make arrow
an optional dependency ( #8345 )
...
* Make arrow an optional dependency
* Fix imports
2024-09-09 16:09:51 +02:00
Mo Sriha
75955922b9
feat: Add current date in UTC to PromptBuilder ( #8233 )
...
* initial commit
* add unit tests
* add release notes
* update function name
2024-09-09 09:47:03 +02: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
Madeesh Kannan
b2aef217da
chore: Remove deprecated DynamicPromptBuilder
and DynamicChatPromptBuilder
components ( #8085 )
2024-07-26 10:00:59 +02:00
Ulises M
e92a0e4beb
feat: Allow Connection of ChatGenerator to AnswerBuilder ( #7897 )
...
* initial implementation
* add support for meta and add ChatMessage tests
* explictly cast types for mypy and update reno
* leave inputs unchanged avoiding side effects
---------
Co-authored-by: Julian Risch <julian.risch@deepset.ai>
2024-07-05 08:21:53 +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
tstadel
83d3970405
feat: extend PromptBuilder and deprecate DynamicPromptBuilder ( #7655 )
...
* feat: add default template to DynamicPromptBuilder
* fix mypy
* fix mypy
* extend PromptBuilder and deprecate DynamicPromptBuilder
* make backward-compatible: optional -> required
* make backward-compatible: _template_string
* make backward-compatible: missing_required_vars error
* add test for no template case
* better docstrings
* some chors
* some chors
* add reno
* revert test_dynamic_prompt_builder.py
* better docstring
* make backward-compatible: reorder init args
* fix tests
* add raises docstring
* make default template required and rework docstrings
* docs chores
* keep to_dict in place for easier review
* remove unnecessary logger
* update docstring
2024-05-23 16:03:39 +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
Bohan Qu
40360e44ff
feat: add required flag for prompt builder inputs ( #7553 )
2024-04-29 14:21:53 +02:00
Vladimir Blagojevic
ce8e114769
feat: DynamicChatPromptBuilder add templating to all user/system messages ( #7423 )
2024-03-27 15:34:50 +01:00
Massimiliano Pippi
25a1a97be0
restore to_dict method ( #7261 )
2024-02-29 14:30:06 +01:00
Massimiliano Pippi
cf1e28431a
fix docstrings for the builder package ( #7248 )
...
* fix docstrings for the builder package
* remove dead test
* Apply suggestions from code review
Co-authored-by: Madeesh Kannan <shadeMe@users.noreply.github.com>
* review feedback
* pylint
---------
Co-authored-by: Madeesh Kannan <shadeMe@users.noreply.github.com>
2024-02-28 18:22:29 +01:00
Silvano Cerza
0191b1e6e4
feat: Change Component's I/O dunder type ( #6916 )
...
* Add Pipeline.get_component_name() method
* Add utility class to ease discoverability of Component I/O
* Move InputOutput in component package
* Rename InputOutput to _InputOutput
* Raise if inputs or outputs field already exist
* Fix tests
* Add release notes
* Move InputSocket and OutputSocket in types package
* Move _InputOutput in socket package
* Rename _InputOutput class to Sockets
* Simplify Sockets class
* Dictch I/O dunder fields in favour of inputs and outputs fields
* Update Sockets docstrings
* Update release notes
* Fix mypy
* Remove unnecessary assignment
* Remove unused logging
* Change SocketsType to SocketsIOType to avoid confusion
* Change sockets type and name
* Change Sockets.__repr__ to return component instance
* Fix linting
* Fix sockets tests
* Revert to dunder fields for Component IO
* Use singular in IO dunder fields
* Delete release notes
* Update haystack/core/component/types.py
Co-authored-by: Massimiliano Pippi <mpippi@gmail.com>
---------
Co-authored-by: Massimiliano Pippi <mpippi@gmail.com>
2024-02-05 17:46:45 +01:00
Silvano Cerza
f5e61338ba
chore: Remove all mentions of Canals ( #6844 )
...
* Remove unnecessary Connection class
* Remove all mentions of canals
* Add release notes
2024-01-29 17:26:11 +01:00
Vladimir Blagojevic
1336456b4f
Update prompt builders examples ( #6681 )
2024-01-04 16:54:26 +01:00
Vladimir Blagojevic
ef2f6bd681
feat: Split DynamicPromptBuilder
and DynamicChatPromptBuilder
( #6557 )
...
* Split DynamicPromptBuilder
* Add release note
* Julian PR feedback
* dynamicchatbuilder lg upd
* dynamicpromptbuilder lg upd
---------
Co-authored-by: Daria Fokina <daria.fokina@deepset.ai>
2023-12-26 15:27:43 +01:00
sahusiddharth
3d17e6ff76
changed metadata to meta ( #6605 )
2023-12-21 12:39:58 +01:00
Silvano Cerza
18dbce25fc
refacotr: Refactor answer dataclasses ( #6523 )
...
* Refactor answer dataclasses
* Add release notes
* Fix tests
* Fix end to end tests
* Enhance ExtractiveReader
2023-12-11 18:50:49 +01:00
Massimiliano Pippi
7c05f37a53
remove unit marker ( #6450 )
2023-11-29 19:24:25 +01:00
Silvano Cerza
e6637f5ec2
Fix all tests
2023-11-24 14:48:43 +01:00
Massimiliano Pippi
8adb8bbab8
Remove preview folder in test/
...
---------
Co-authored-by: Silvano Cerza <silvanocerza@gmail.com>
2023-11-24 11:52:55 +01:00