Christian Clauss
bf6d306d68
ci: Simplify Python code with ruff rules SIM ( #5833 )
...
* ci: Simplify Python code with ruff rules SIM
* Revert #5828
* ruff --select=I --fix haystack/modeling/infer.py
---------
Co-authored-by: Massimiliano Pippi <mpippi@gmail.com>
2023-09-20 08:32:44 +02:00
Christian Clauss
91ab90a256
perf: Python performance improvements with ruff C4 and PERF fixes ( #5803 )
...
* Python performance improvements with ruff C4 and PERF
* pre-commit fixes
* Revert changes to examples/basic_qa_pipeline.py
* Revert changes to haystack/preview/testing/document_store.py
* revert releasenotes
* Upgrade to ruff v0.0.290
2023-09-16 16:26:07 +02:00
Vladimir Blagojevic
227bf6ca39
feat: Remove template variables from PromptNode invocation kwargs ( #5526 )
...
* Remove template params from kwargs before passing kwargs to invocation layer
* More unit tests
* Add release note
* Enable simple prompt node pipeline integration test use case
2023-08-08 16:40:23 +02:00
Julian Risch
4c8e0b9d4a
fix: PromptNode falls back to empty list of documents if none are provided but expected ( #5132 )
...
* add warning, default to empty docs list, tests
* pylint
2023-06-13 16:35:19 +02:00
ZanSara
6249e65bc8
feat: prompts caching from PromptHub ( #5048 )
...
* split up prompttemplate init
* caching
* docstring
* add platformdirs
* use user_data_dir
* fix tests
* add tests
* pylint
* mypy
2023-05-30 16:55:48 +02:00
ZanSara
7e5fa0dd94
fix: Move check for default PromptTemplate
s in PromptTemplate
itself ( #5018 )
...
* make prompttemplate load the defaults instead of promptnode
* add test
* fix tenacity decorator
* fix tests
* fix error handling
* mypy
---------
Co-authored-by: Silvano Cerza <3314350+silvanocerza@users.noreply.github.com>
2023-05-27 18:05:05 +02:00
ZanSara
949b1b63b3
PromptHub integration in PromptNode
( #4879 )
...
* initial integration
* upgrade of prompthub
* fix get_prompt_template
* feedback
* add prompthub-py to dependencies
* tests
* mypy
* stray changes
* review feedback
* missing init
* fix test
* move logic in prompttemplate
* linting
* bugfixes
* fix unit tests
* fix cache
* simplify prompttemplate init
* remove unused function
* removing wrong params
* try remove all instances of prompt names
* more tests
* fix agent tests
* more tests
* fix tests
* pylint
* comma
* black
* fix test
* docstring
* review feedback
* review feedback
* fix mocks
* mypy
* fix mocks
* fix reference to missing templates
* feedback
* remove direct references to default template var
* tests
* Update haystack/nodes/prompt/prompt_node.py
Co-authored-by: Silvano Cerza <3314350+silvanocerza@users.noreply.github.com>
---------
Co-authored-by: Silvano Cerza <3314350+silvanocerza@users.noreply.github.com>
2023-05-23 15:22:58 +02:00
bogdankostic
5b2ef2afd6
Revert "refactor!: Deprecate name
param in PromptTemplate
and introduce template_name
instead ( #4810 )" ( #4834 )
...
This reverts commit f660f41c0615e6b3064ef3e321f1e5a295fafc1b.
2023-05-08 11:31:04 +02:00
bogdankostic
f660f41c06
refactor!: Deprecate name
param in PromptTemplate
and introduce template_name
instead ( #4810 )
...
* Deprecate name parameter
* Adapt existing tests and uses of PromptTemplate
* Move parameter `name` to end
* Adapt existing tests
* lg update
---------
Co-authored-by: Darja Fokina <daria.f93@gmail.com>
2023-05-08 10:12:29 +02:00
Vladimir Blagojevic
41b6e33f64
Enhance the error logging in PromptTemplate variable resolution ( #4730 )
...
* Enhance the error logging in PromptTemplate variable resolution
* Revert change Daria made
* Silvano PR feedback
2023-04-26 18:09:20 +02:00
tstadel
9cbe9e0949
fix: recursion of death while loading PromptTemplate from yaml ( #4691 )
...
* fix recursion of death when deserializing prompttemplate
* add test
* set api_key
* fix test
* add generic test
* work in feedback on tests
---------
Co-authored-by: bogdankostic <bogdankostic@web.de>
2023-04-26 13:56:51 +02:00
Silvano Cerza
1cc4c9c651
refactor: Refactor prompt node ( #4580 )
...
* Refactor prompt structure
* Refactor prompt tests structure
* Fix pylint
* Move TestPromptTemplateSyntax to test_prompt_template.py
2023-04-03 11:49:49 +02:00