diff --git a/CHANGELOG.md b/CHANGELOG.md index a592a8a17..ddbe50be7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,10 +6,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Added + +### Fixed + +## [0.14.0] + ### Added - Added a new documentation section "How it works" to explain the inner workings of the package. It's a work in progress, but it should give you a good idea of what's happening under the hood. - Improved template loading, so if you load your custom templates once with `load_templates!("my/template/folder)`, it will remember your folder for all future re-loads. -- Added convenience function `create_template` to create templates on the fly without having to deal with `PT.UserMessage` etc. See `?create_template` for more information. +- Added convenience function `create_template` to create templates on the fly without having to deal with `PT.UserMessage` etc. If you specify the keyword argument `load_as = "MyName"`, the template will be immediately loaded to the template registry. See `?create_template` for more information and examples. ### Fixed diff --git a/Project.toml b/Project.toml index da0c0e797..f9666002d 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "PromptingTools" uuid = "670122d1-24a8-4d70-bfce-740807c42192" authors = ["J S @svilupp and contributors"] -version = "0.14.0-DEV" +version = "0.14.0" [deps] AbstractTrees = "1520ce14-60c1-5f80-bbc7-55ef81b5835c" diff --git a/docs/src/frequently_asked_questions.md b/docs/src/frequently_asked_questions.md index 923b3e915..824d26e5b 100644 --- a/docs/src/frequently_asked_questions.md +++ b/docs/src/frequently_asked_questions.md @@ -287,4 +287,68 @@ give_me_number("How many car seats are in Porsche 911T?") We ultimately received our custom type `SmallInt` with the number of car seats in the Porsche 911T (I hope it's correct!). -If you want to access the full conversation history (all the attempts and feedback), simply output the `response` object and explore `response.conversation`. \ No newline at end of file +If you want to access the full conversation history (all the attempts and feedback), simply output the `response` object and explore `response.conversation`. + +## How to quickly create a prompt template? + +Many times, you will want to create a prompt template that you can reuse with different inputs (eg, to create templates for AIHelpMe or LLMTextAnalysis). + +Previously, you would have to create a vector of `SystemMessage` and `UserMessage` objects and then save it to a disk and reload. +Now, you can use the `create_template` function to do it for you. It's designed for quick prototyping, so it skips the serialization step and loads it directly into the template store (ie, you can use it like any other templates - try `aitemplates()` search). + +The syntax is simple: `create_template(;user=, system=, load_as=