haystack
haystack copied to clipboard
fix: PromptNode run raises on empty inputs
Related Issues
- fixes raising the following error if running
prompt_node.run(query="", documents=documents)
Exception while running node 'PromptNode': Expected prompt parameters ['documents', 'query'] to be provided but got only ['documents']. Make sure to provide all template parameters. Enable debug logging to see the data that was passed when the pipeline failed.
Proposed Changes:
- include any variable into
invocation_context
thatis not None
How did you test it?
- added test
Notes for the reviewer
Checklist
- I have read the contributors guidelines and the code of conduct
- I have updated the related issue with new insights and changes
- I added unit tests and updated the docstrings
- I've used one of the conventional commit types for my PR title:
fix:
,feat:
,build:
,chore:
,ci:
,docs:
,style:
,refactor:
,perf:
,test:
. - I documented my code
- I ran pre-commit hooks and fixed any issue