v0.3.0
PromptingTools v0.3.0
Changes:
Added
- Introduced a set of utilities for working with generate Julia code (Eg, extract code-fenced Julia code with
PromptingTools.extract_code_blocks
) or simply applyAICode
to the AI messages.AICode
tries to extract, parse and eval Julia code, if it fails both stdout and errors are captured. It is useful for generating Julia code and, in the future, creating self-healing code agents - Introduced ability to have multi-turn conversations. Set keyword argument
return_all=true
andai*
functions will return the whole conversation, not just the last message. To continue a previous conversation, you need to provide it to a keyword argumentconversation
- Introduced schema
NoSchema
that does not change message format, it merely replaces the placeholders with user-provided variables. It serves as the first pass of the schema pipeline and allow more code reuse across schemas - Support for project-based and global user preferences with Preferences.jl. See
?PREFERENCES
docstring for more information. It allows you to persist your configuration and model aliases across sessions and projects (eg, if you would like to default to Ollama models instead of OpenAI's) - Refactored
MODEL_REGISTRY
aroundModelSpec
struct, so you can record the name, schema(!) and token cost of new models in a single place. The biggest benefit is that yourai*
calls will now automatically lookup the right model schema, eg, no need to define schema explicitly for your Ollama models! See?ModelSpec
for more information and?register_model!
for an example of how to register a new model
Fixed
- Changed type of global
PROMPT_SCHEMA::AbstractPromptSchema
for an easier switch to local models as a default option
Breaking Changes
API_KEY
global variable has been renamed toOPENAI_API_KEY
to align with the name of the environment variable and preferences
Merged pull requests:
- Use [!TIP] markdown for pro tips (#14) (@caleb-allen)
- Up version minor (#15) (@svilupp)
- Setup CodeCov (#16) (@svilupp)
- update registration + ollama health check (#17) (@svilupp)
- Change PROMPT SCHEMA to an Abstract Type (#18) (@svilupp)
- Add Coding Utils (#19) (@svilupp)
- Return full conversation (#20) (@svilupp)
- extend serialization support to DataMessages (#21) (@svilupp)
- remove julia prompt from code blocks (#22) (@svilupp)
- Change AICode Safety Error to be a Parsing Error (#23) (@svilupp)
- Parse nested code blocks (#24) (@svilupp)
- Preferences.jl integration + new model registry (#25) (@svilupp)
- Tag version v0.3.0 (#26) (@svilupp)
- Update changelog (#27) (@svilupp)