-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
Showing
4 changed files
with
434 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
releasenotes/notes/extend-promptbuilder-0322790d82248039.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
enhancements: | ||
- | | ||
`PromptBuilder` now supports changing its template at runtime (e.g. for Prompt Engineering). This allows you to define a default template and then change it based on your needs at runtime. | ||
deprecations: | ||
- | | ||
`DynamicPromptBuilder` has been deprecated as `PromptBuilder` fully covers its functionality. Use `PromptBuilder` instead. |
Oops, something went wrong.