haystack
haystack copied to clipboard
feat: allow `Generators` to run with a system prompt defined at run time
Related Issues
- fixes #issue-number
Proposed Changes:
How did you test it?
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
Pull Request Test Coverage Report for Build 11443425066
Details
- 0 of 0 changed or added relevant lines in 0 files are covered.
- 3 unchanged lines in 1 file lost coverage.
- Overall coverage decreased (-0.005%) to 90.344%
| Files with Coverage Reduction | New Missed Lines | % |
|---|---|---|
| components/generators/openai.py | 3 | 95.56% |
| <!-- | Total: | 3 |
| Totals | |
|---|---|
| Change from base Build 11435566584: | -0.005% |
| Covered Lines: | 7504 |
| Relevant Lines: | 8306 |
💛 - Coveralls
Changed the code support the 3 uses cases without loss of information:
- no system prompt
- using a system prompt defined at init
- using a system prompt defined at run time
@davidsbatista looks good!