Recent Releases of https://github.com/svilupp/promptingtools.jl
https://github.com/svilupp/promptingtools.jl - v0.81.0
PromptingTools v0.81.0
No breaking changes!
Updated
- Updated OpenAI.jl compat to v0.11.
Commits
Merged pull requests: - Update Project.toml compat (#305) (@Sixzero)
- Julia
Published by github-actions[bot] 10 months ago
https://github.com/svilupp/promptingtools.jl - v0.80.0
PromptingTools v0.80.0
Breaking Changes
- Changed the default chat model to GPT-5 mini (
MODEL_CHATglobal variable).
Added
- Added GPT-5 family models (gpt-5, gpt-5-mini, gpt-5-nano) with aliases (
gpt5,gpt5m,gpt5n). - Integrated Groq and Cerebras hosted GPT-OSS 120B and 20B models with aliases (
ggptoss120for Groq,cgptoss120for Cerebras). - Example demonstrating GPT-5-specific verbosity and reasoning effort controls (see
examples/gpt5_api_kwargs.jl). - Added Gemini 2.5 Flash Lite and Gemini 2.5 Flash models with aliases (
gem25flandgem25f, respectively).
Merged pull requests: - Add GPT-5 models and OSS integrations (#304) (@svilupp)
- Julia
Published by github-actions[bot] 10 months ago
https://github.com/svilupp/promptingtools.jl - v0.79.0
PromptingTools v0.79.0
No breaking changes.
Added
- Updated
ModelRegistrydocstrings to show all supported models and aliases (see??ModelRegistry). Thanks to @Kunzaatko for the PR!
Commits
Merged pull requests: - Model listing in the MODEL_REGISTRY documentation (#302) (@kunzaatko) - Tag new version v079 (#303) (@svilupp)
Closed issues:
- [DOCS] MODEL_REGISTRY keys are inacessible in public API (#299)
- Julia
Published by github-actions[bot] 11 months ago
https://github.com/svilupp/promptingtools.jl - v0.78.0
PromptingTools v0.78.0
No breaking changes!
Added
- Added support for Moonshot's Kimi K2 model (alias
k2, save api key toMOONSHOT_API_KEY). Added alsogk2alias for the version hosted by Groq Cloud. - Added support for xAI's Grok 4 model (alias
grok4, save api key toXAI_API_KEY).
Commits
Merged pull requests: - Add Grok 4 and Kimi2 model integrations (#301) (@devin-ai-integration[bot])
- Julia
Published by github-actions[bot] 11 months ago
https://github.com/svilupp/promptingtools.jl - v0.77.0
PromptingTools v0.77.0
No breaking changes!
Updated
- Increased GoogleGenAI compat to v0.5, fixing support for system prompts
Fixed
- Increased compat for StreamCallbacks.jl to fix a bug
Commits
Merged pull requests: - fix: Correct admonition format (#297) (@kunzaatko) - Update GoogleGenAI compat (#298) (@svilupp) - Tag new version (#300) (@svilupp)
Closed issues: - GoogleGenAI v0.4 support (#295)
- Julia
Published by github-actions[bot] 11 months ago
https://github.com/svilupp/promptingtools.jl - v0.76.0
PromptingTools v0.76.0
Breaking Changes:
claudealias now points to the latest Claude 4 Sonnet
Added
- Added support for Anthropic's new web search tool and code execution tool (alias
:web_searchand:code_execution, respectively). See?aitoolsfor more information.
Updated
- Updated
claudealias to point to the latest Claude 4.0 Sonnet model (same asclaudes).
Commits
Merged pull requests:
- Fix Vitepress nav config (#293) (@svilupp)
- Change model for claude alias + add more pre-built tools (#294) (@svilupp)
- Julia
Published by github-actions[bot] about 1 year ago
https://github.com/svilupp/promptingtools.jl - v0.75.0
PromptingTools v0.75.0
BREAKING CHANGES:
- Removed the
RAGToolsmodule. Please use the standalone RAGTools.jl package. See the migration guide in the docs & FAQ. - Default chat model changed to GPT 4.1 mini (previously it was GPT 4o mini, variable
PromptingTools.MODEL_CHAT).
Added
- Added Claude 4 models (
claude-sonnet-4-20250514,claude-opus-4-20250514) and set them as new defaults for aliasesclaudeoandclaudes(Added specs for the new Claude 4 text editor as a ToolRef:str_replace_based_edit_tool). - Added a Deepwiki.com badge for AI-powered repo documentation.
- Added Gemini 2.5 Flash Preview model from 20th May 2025 (alias
gem25f).
Updated
- Updated the OllamaManagedSchema to accept URLs with and without protocol to allow endpoints with
https://(previously onlyhttp://was supported). - Removed the
RAGToolsmodule.
Fixed
- Fixed
@ai_strmacro to keep a dynamic reference to your default model (PromptingTools.MODEL_CHAT). Prevents "baking in" the default model if PromptingTools is precompiled by another package.
Commits
Many first-time contributors - thank you!
Merged pull requests: - Add example of using Responses API (#286) (@svilupp) - Remove Experimental.RAGTools (#288) (@svilupp) - Fix default model insertion in ai_str macros (#290) (@omlins) - Add Claude 4 models (#291) (@svilupp) - Remove hard-coded http for ollama (#292) (@jochalek)
Closed issues: - Change default model at runtime in precompiled package (#289)
- Julia
Published by github-actions[bot] about 1 year ago
https://github.com/svilupp/promptingtools.jl - v0.74.3
PromptingTools v0.74.3
No breaking changes.
Added
- Added support for Gemini 2.5 Pro and Flash preview models (aliases
gem25pandgem25f, respectively).
Commits
Merged pull requests: - Added Gemini 2.5 Pro/Flash models (#285) (@svilupp)
- Julia
Published by github-actions[bot] about 1 year ago
https://github.com/svilupp/promptingtools.jl - v0.74.2
PromptingTools v0.74.2
No breaking changes.
Added
- Added support for OpenAI's O3 and O4-Mini reasoning models (aliases
o3ando4m, respectively).
### Fixed
- Fixed a bug in the precompilation. If a user set MODEL_CHAT to be a non-OpenAI model, aiclassify would throw an error as it could not validate the tokenizer for correct functionality. Bypassed by forcing a specific tokenizer vocabulary (irrelevant for precompilation purposes).
- Fixed failing CI due to not publishing docs for CustomRetryLayer.
Commits
Merged pull requests: - Fix precompilation bug (#282) (@svilupp) - Add OpenAI o3 and o4 models (#283) (@svilupp)
Closed issues: - Precompile PromptingTools.jl Failed after executing the command 'PT.setpreferences!("PROMPTSCHEMA" => "OllamaSchema", "MODEL_CHAT"=>"llama2")' (#281)
- Julia
Published by github-actions[bot] about 1 year ago
https://github.com/svilupp/promptingtools.jl - v0.74.1
PromptingTools v0.74.1
No breaking changes.
Added
- Added support for GPT-4.1 models (aliases
gpt41for GPT 4.1,gpt41mfor GPT 4.1 mini,gpt41nfor GPT 4.1 nano; see details here).
Commits
Merged pull requests: - Add GPT 4.1 models (#280) (@svilupp)
- Julia
Published by github-actions[bot] about 1 year ago
https://github.com/svilupp/promptingtools.jl - v0.74.0
PromptingTools v0.74.0
Breaking
Added
- Added support for extended output (up to 128K tokens) with Claude 3.7 models via the
:extended_outputbeta header.
### Fixed
- Added validation to ensure that thinking.budget_tokens does not exceed max_tokens when using Anthropic API.
Commits
Merged pull requests: - Adding in the official sonnet model name (#276) (@Sixzero) - Add extended output support for Claude 3.7 models (#278) (@Sixzero)
- Julia
Published by github-actions[bot] about 1 year ago
https://github.com/svilupp/promptingtools.jl - v0.73.0
PromptingTools v0.73.0
Breaking changes
Added
- Added a new
enable_retry!function to enable the retry layer for HTTP requests. Main use case is to prevent rate limiting errors from external AI services, but you can fully customize the retry behavior for any HTTP status codes, etc. See?enable_retry!for more information.
Updated
- Updated the
StreamCallbacksdependency to0.6to improve parsing of streaming responses with thinking from Anthropic.
Commits
Merged pull requests: - Add custom retry layer (#273) (@svilupp) - Update version (#275) (@svilupp)
- Julia
Published by github-actions[bot] over 1 year ago
https://github.com/svilupp/promptingtools.jl - v0.72.3
PromptingTools v0.72.3
Breaking Changes
Added
- Added OpenAI's GPT 4.5 research preview (alias gpt45) to the model registry.
Commits
Merged pull requests: - Add OpenAI's GPT 4.5 (#274) (@svilupp)
- Julia
Published by github-actions[bot] over 1 year ago
https://github.com/svilupp/promptingtools.jl - v0.72.2
PromptingTools v0.72.2
Breaking Changes
Added
- Added Claude 3.7 Sonnet model to the model registry (alias
claude37and updated defaultclaudealias to point to it).
Commits
Merged pull requests: - Add Claude 3.7 model support (#271) (@Sixzero)
- Julia
Published by github-actions[bot] over 1 year ago
https://github.com/svilupp/promptingtools.jl - v0.72.1
PromptingTools v0.72.1
Added
- Added Qwen models from OpenRouter API: Qwen Turbo, Plus and Max models with competitive pricing and 128K context window (aliases
orqwenturbo,orqwenplusandorqwenmax, respectively).
Commits
Merged pull requests: - feat: add Qwen models from OpenRouter API (#269) (@Sixzero) - Update alias for open router models for consistency (#270) (@svilupp)
- Julia
Published by github-actions[bot] over 1 year ago
https://github.com/svilupp/promptingtools.jl - v0.72.0
PromptingTools v0.72.0
Breaking Changes
Added
- Added new Gemini 2.0 Pro and Flash models to the model registry (aliases
gem20pandgem20f, respectively). Added Gemini 2.0 Flash Lite Preview model (aliasgem20fl) and Gemini 2.0 Flash Thinking Experimental model (aliasgem20ft). - Added BM25 normalization kwarg to
RAGTools.jlto enable 0-1 query-specific normalization of BM25 scores for easier filtering and comparison. See?RT.bm25and?RT.max_bm25_scorefor more information.
Commits
Merged pull requests: - Add new Google Gemini models (#266) (@svilupp) - Max BM25 score / BM25 normalization (#267) (@svilupp) - Update NEWS log (#268) (@svilupp)
- Julia
Published by github-actions[bot] over 1 year ago
https://github.com/svilupp/promptingtools.jl - v0.71.0
PromptingTools v0.71.0
Breaking changes
Added
- Added the new OpenAI's O3 Mini reasoning model to the model registry (alias
o3m). - Added the new DeepSeek R1 Distill Llama 70b model hosted on GroqCloud, which beats GPT 4o in many benchmarks while being upto 10x cheaper (alias
glmr- stands for Groq Llama Medium(70b) Reasoning). - Added experimental support for "thinking tokens" that can be found with DeepSeek API and the reasoning model R1 (alias
dsr). If the thought chain is provided, we save it in themsg.extras[:reasoning_content]field for advanced users.
Commits
Merged pull requests: - Add o3 mini (#264) (@svilupp) - RAGTools.jl migration warning (#265) (@svilupp)
- Julia
Published by github-actions[bot] over 1 year ago
https://github.com/svilupp/promptingtools.jl - v0.70.0
PromptingTools v0.70.0
Breaking Changes
Added
- Added new DeepSeek V3 model via Deepseek (alias
dschator simplyds, because they are in a category of their own), Fireworks.ai and Together.ai (fdsandtdsfor hosted Deepseek V3, respectively). Added Qwen 2.5 Coder 32B (aliasfqwen25cortqwen25cfor Fireworks.ai and Together.ai, respectively). - Added the reasoning Qwen QwQ 32B hosted on Together.ai.
- Added the new OpenAI's O1 model to the model registry (alias
o1). - Added DeepSeek Reasoner model alias (
dsreasonor simplydsr) from DeepSeek - Added MiniMax model support and alias (
minimax) for MiniMax-Text-01 model
Commits
Merged pull requests: - Add new models (#260) (@svilupp) - Adding Deepseek R1 model (#262) (@Sixzero) - Add MiniMax model support (#263) (@Sixzero)
- Julia
Published by github-actions[bot] over 1 year ago
https://github.com/svilupp/promptingtools.jl - v0.69.1
PromptingTools v0.69.1
Fixed
- Added assertion in
response_to_messagefor missing:tool_callskey in the response message. It's model failure but it wasn't obvious from the original error. - Fixed error for usage information in CamelCase from OpenAI servers (Gemini proxy now sends it in CamelCase).
Commits
Merged pull requests: - Add assertion for aiextract (#257) (@svilupp) - Fix usage keys for GoogleAI (#258) (@svilupp)
Closed issues: - Update Gemini Experimental model to 1206 (#253)
- Julia
Published by github-actions[bot] over 1 year ago
https://github.com/svilupp/promptingtools.jl - v0.69.0
PromptingTools v0.69.0
Added
- Added a new Gemini 2.0 Flash Experimental model (
gemini-2.0-flash-exp) and updated the aliasgem20fwith it.
Commits
Merged pull requests: - Add Gemini 2.0 Flash experimental (#256) (@svilupp)
- Julia
Published by github-actions[bot] over 1 year ago
https://github.com/svilupp/promptingtools.jl - v0.68.0
PromptingTools v0.68.0
Added
- Added a new
cache=:all_but_lastcache strategy for Anthropic models to enable caching of the entire conversation except for the last user message (useful for longer conversations that you want to re-use, but not continue). See the docstrings for more information on which cache strategy to use. Thank you to @Sixzero for this!
Commits
Merged pull requests: - Feature :allbutlast cache (#254) (@Sixzero) - Tag new version v0.68 (#255) (@svilupp)
- Julia
Published by github-actions[bot] over 1 year ago
https://github.com/svilupp/promptingtools.jl - v0.67.0
PromptingTools v0.67.0
Added
- Added a new Gemini Experimental model from December 2024 (
gemini-exp-1206) and updated thegemexpalias to point to it.
Commits
Merged pull requests: - Add Gemini experimental model 1206 and update alias (#252) (@devin-ai-integration[bot])
- Julia
Published by github-actions[bot] over 1 year ago
https://github.com/svilupp/promptingtools.jl - v0.66.0
PromptingTools v0.66.0
Added
- Added support for Groq's new Llama3.3 models. Updated
gllama370,gl70,glmaliases tollama-3.3-70b-versatileand addedgl70s,glmsaliases tollama-3.3-70b-specdec(faster with speculative decoding).
Fixed
- Fixed a bug in
extract_docstringwhere it would not correctly block "empty" docstrings on Julia 1.11.
Commits
Merged pull requests: - update CI for 1.11 (#249) (@svilupp) - Add Llama 3.3 (#250) (@svilupp)
- Julia
Published by github-actions[bot] over 1 year ago
https://github.com/svilupp/promptingtools.jl - v0.65.1
PromptingTools v0.65.1
Fixed
- Removed unnecessary printing to
stdoutduring precompilation inprecompile.jl. - Fixed a "bug-waiting-to-happen" in tool use.
to_json_typenow enforces users to provide concrete types, because abstract types can lead to errors during JSON3 deserialization. - Flowed through a bug fix in
StreamCallbackwhere the usage information was being included in the response even whenusage=nothing. Lower bound ofStreamCallbackswas bumped to0.5.1.
Commits
Merged pull requests: - Fix to-json-type (#248) (@svilupp)
Closed issues: - TTFX optimization of aigenerate("whats the meaning of life"; model) (#236) - StreamCallback issue if :usage is nothing in PT. (#247)
- Julia
Published by github-actions[bot] over 1 year ago
https://github.com/svilupp/promptingtools.jl - v0.65.0
PromptingTools v0.65.0
Breaking
- Changed the official ENV variable for MistralAI API from
MISTRALAI_API_KEYtoMISTRAL_API_KEYto be compatible with the Mistral docs.
Added
- Added a new Gemini Experimental model from November 2024 (
gemini-exp-1121with aliasgemexp). - Added a new
AnnotationMessagetype for keeping human-only information in the message changes. See?annotate!on how to use it. - Added a new
ConversationMemorytype (exported) to enable long multi-turn conversations with a truncated memory of the conversation history. Truncation works in "batches" to not prevent caching. See?ConversationMemoryandget_lastfor more information.
Updated
- Changed the ENV variable for MistralAI API from
MISTRALAI_API_KEYtoMISTRAL_API_KEYto be compatible with the Mistral docs.
Commits
Merged pull requests: - [Breaking] Renamed MISTRALAI to MISTRAL everywhere (#231) (@Sixzero) - update Google Gemini model (#237) (@svilupp) - feat: Add ConversationMemory and enhance AnnotationMessage (#238) (@devin-ai-integration[bot]) - Export ConversationMemory (#246) (@svilupp)
- Julia
Published by github-actions[bot] over 1 year ago
https://github.com/svilupp/promptingtools.jl - v0.64.0
PromptingTools v0.64.0
Added
- Added support for images in
aitoolsto enable passing screenshots viaimage_pathargument (extended to both OpenAI and Anthropic APIs, uses?UserMessageWithImagesinternally). - Added the latest Gemini Experimental model via OpenAI compatibility mode (
gemini-exp-1114with aliasgemexp).
Commits
Merged pull requests: - Add image support to aitools (#235) (@svilupp)
- Julia
Published by github-actions[bot] over 1 year ago
https://github.com/svilupp/promptingtools.jl - v0.63.0
PromptingTools v0.63.0
Added
- Added support for Google's Gemini API via OpenAI compatibility mode (
GoogleOpenAISchema). Use model aliasesgem15p(Gemini 1.5 Pro),gem15f(Gemini 1.5 Flash), andgem15f8(Gemini 1.5 Flash 8b). Set your ENV api keyGOOGLE_API_KEYto use it. - Thanks to @sixzero, added support for Google Flash via OpenRouter and Qwen 72b models.
Commits
Merged pull requests: - Gwen 72B and open-router Google Flash added. (#232) (@Sixzero) - Add GoogleOpenAISchema with comprehensive test logging (#234) (@devin-ai-integration[bot])
- Julia
Published by github-actions[bot] over 1 year ago
https://github.com/svilupp/promptingtools.jl - v0.62.1
PromptingTools v0.62.1
Fixed
- Fixed a bug in
tool_call_signaturewhere hidden fields were not hidden early enough and would fail if a Dict argument was provided. It used to do the processing after, but Dicts cannot be processed, so we're now masking the fields upfront.
Commits
Merged pull requests: - Fix tool dict (#230) (@svilupp)
- Julia
Published by github-actions[bot] over 1 year ago
https://github.com/svilupp/promptingtools.jl - v0.62.0
PromptingTools v0.62.0
Added
- Added a new Claude 3.5 Haiku model (
claude-3-5-haiku-latest) and updated the aliasclaudehwith it. - Added support for XAI's Grok 2 beta model (
grok-beta) and updated the aliasgrokwith it. Set your ENV api keyXAI_API_KEYto use it.
Commits
Merged pull requests: - Add support for Haiku 3.5 and Grok2 Beta (#229) (@svilupp)
- Julia
Published by github-actions[bot] over 1 year ago
https://github.com/svilupp/promptingtools.jl - v0.61.0
PromptingTools v0.61.0
Added
- Added a new
extrasfield toToolRefto enable additional parameters in the tool signature (eg,display_width_px,display_height_pxfor the:computertool). - Added a new kwarg
unused_as_kwargstoexecute_toolto enable passing unused args as kwargs (see?execute_toolfor more information). Helps with using kwarg-based functions.
Updated
- Updated the compat bounds for
StreamCallbacksto enable both v0.4 and v0.5 (Fixes Julia 1.9 compatibility). - Updated the return type of
tool_call_signaturetoDict{String, AbstractTool}to enable better interoperability with different tool types.
Commits
Merged pull requests: - Update Callbacks compat + ToolRef definition (#227) (@svilupp) - Update tool execution with kwargs (#228) (@svilupp)
- Julia
Published by github-actions[bot] over 1 year ago
https://github.com/svilupp/promptingtools.jl - v0.60.0
PromptingTools v0.60.0
Added
- Added new Claude 3.5 Sonnet model (
claude-3-5-sonnet-latest) and updated the aliasclaudeandclaudeswith it. - Added support for Ollama streaming with schema
OllamaSchema(see?StreamCallbackfor more information). SchemaOllamaManagedis NOT supported (it's legacy and will be removed in the future). - Moved the implementation of streaming callbacks to a new
StreamCallbackspackage. - Added new error types for tool execution to enable better error handling and reporting (see
?AbstractToolError). - Added support for Anthropic's new pre-trained tools via
ToolRef(see?ToolRef), to enable the feature, use the:computer_usebeta header (eg,aitools(..., betas = [:computer_use])).
Fixed
- Fixed a bug in
call_costwhere the cost was not calculated if any non-AIMessages were provided in the conversation.
Commits
Merged pull requests: - Update anthropic models (#223) (@svilupp) - Add streaming for OllamaSchema (#224) (@svilupp) - Fix call_cost (#225) (@svilupp) - Anthropic computer use (#226) (@svilupp)
- Julia
Published by github-actions[bot] over 1 year ago
https://github.com/svilupp/promptingtools.jl - v0.59.1
PromptingTools v0.59.1
Fixed
- Fixed a bug in multi-turn tool calls for OpenAI models where an empty tools array could have been, which causes an API error.
Commits
Merged pull requests: - Fix repeated tool calls (#221) (@svilupp)
- Julia
Published by github-actions[bot] over 1 year ago
https://github.com/svilupp/promptingtools.jl - v0.59.0
PromptingTools v0.59.0
Breaking Changes
- New field
nameintroduced inAbstractChatMessageandAIToolRequestmessages to enable role-based workflows. It initializes tonothing, so it is backward compatible.
Added
- Extends support for structured extraction with multiple "tools" definitions (see
?aiextract). - Added new primitives
Tool(to re-use tool definitions) and a functionaitoolsto support mixed structured and non-structured workflows, eg, agentic workflows (see?aitools). - Added a field
nametoAbstractChatMessageandAIToolRequestmessages to enable role-based workflows. - Added a support for partial argument execution with
execute_toolfunction (provide your own context to override the arg values). - Added support for SambaNova hosted models (set your ENV
SAMBANOVA_API_KEY). - Added many new models from Mistral, Groq, Sambanova, OpenAI.
Updated
- Renamed
function_call_signaturetotool_call_signatureto better reflect that it's used for tools, but kept a link to the old name for back-compatibility. - Improves structured extraction for Anthropic models (now you can use
tool_choicekeyword argument to specify which tool to use or re-use your parsed tools). - When log probs are requested, we will now also log the raw information in
AIMessage.extras[:log_prob]field (previously we logged only the full sum). This enables more nuanced log-probability calculations for individual tokens.
Commits
Merged pull requests: - Tool interface update (#218) (@svilupp) - Add a new models, clean up tools (#219) (@svilupp) - Update VERSION v059 (#220) (@svilupp)
- Julia
Published by github-actions[bot] over 1 year ago
https://github.com/svilupp/promptingtools.jl - v0.58.0
PromptingTools v0.58.0
Added
- Added support for Cerebras hosted models (set your ENV
CEREBRAS_API_KEY). Available model aliases:cl3(Llama3.1 8bn),cl70(Llama3.1 70bn). - Added a kwarg to
aiclassifyto provide a custom token ID mapping (token_ids_map) to work with custom tokenizers.
Updated
- Improved the implementation of
airetry!to concatenate feedback from all ancestor nodes ONLY IFfeedback_inplace=true(because otherwise LLM can see it in the message history).
Fixed
- Fixed a potential bug in
airetry!where theaicallobject was not properly validated to ensure it has beenrun!first.
Commits
Merged pull requests: - Add Cerebras API + node validation for airetry! (#217) (@svilupp)
- Julia
Published by github-actions[bot] over 1 year ago
https://github.com/svilupp/promptingtools.jl - v0.57.0
PromptingTools v0.57.0
Added
- Support for Azure OpenAI API. Requires two environment variables to be st:
AZURE_OPENAI_API_KEYandAZURE_OPENAI_HOST(i.e. https://.openai.azure.com). Thanks to @pabvald !
Commits
Merged pull requests: - Support for Azure OpenAI API (#212) (@pabvald) - Version up (#213) (@svilupp)
- Julia
Published by github-actions[bot] over 1 year ago
https://github.com/svilupp/promptingtools.jl - v0.56.1
Fixed
- Removed accidental INFO log in Anthropic's
aigenerate - Changed internal logging in streamcallback to use
@debugwhen printing raw data chunks.
- Julia
Published by svilupp over 1 year ago
https://github.com/svilupp/promptingtools.jl - v0.56.0
PromptingTools v0.56.0
Updated
- Enabled Streaming for OpenAI-compatible APIs (eg, DeepSeek Coder)
- If streaming to stdout, also print a newline at the end of streaming (to separate multiple outputs).
Fixed
- Relaxed the type-assertions in
StreamCallbackto allow for more flexibility.
Commits
Merged pull requests: - Tidy up streaming callbacks (#209) (@svilupp) - Enable Streaming for OpenAI-compatible models (#210) (@svilupp)
Closed issues: - Implement Prompt Caching Feature for Anthropic API Calls (#196)
- Julia
Published by github-actions[bot] over 1 year ago
https://github.com/svilupp/promptingtools.jl - v0.55.0
PromptingTools v0.55.0
Added
- Added support for OpenAI's JSON mode for
aiextract(just provide kwargjson_mode=true). Reference Structured Outputs. - Added support for OpenRouter's API (you must set ENV
OPENROUTER_API_KEY) to provide access to more models like Cohere Command R+ and OpenAI's o1 series. Reference OpenRouter. - Added new OpenRouter hosted models to the model registry (prefixed with
or):oro1(OpenAI's o1-preview),oro1m(OpenAI's o1-mini),orcop(Cohere's command-r-plus),orco(Cohere's command-r). Theorprefix is to avoid conflicts with existing models and OpenAI's aliases, then the goal is to provide 2 letters for each model and 1 letter for additional qualifier (eg, "p" for plus, "m" for mini) ->orcop(OpenRouter cohere's COmmand-r-Plus).
Updated
- Updated FAQ with instructions on how to access new OpenAI o1 models via OpenRouter.
- Updated FAQ with instructions on how to add custom APIs (with an example
examples/adding_custom_API.jl).
Fixed
- Fixed a bug in
aiclassifyfor the OpenAI GPT4o models that have a different tokenizer. Unknown model IDs will throw an error.
Commits
Merged pull requests: - OpenAI JSON mode extraction (#206) (@svilupp) - OpenRouter support, new OpenAI o1 models (#207) (@svilupp) - Update reserved keywords in PromptingTools.jl (#208) (@svilupp)
- Julia
Published by github-actions[bot] over 1 year ago
https://github.com/svilupp/promptingtools.jl - v0.54.0
PromptingTools v0.54.0
Updated
- Improved the performance of BM25/Keywords-based indices for >10M documents. Introduced new kwargs of
min_term_freqandmax_termsinRT.get_keywordsto reduce the size of the vocabulary. See?RT.get_keywordsfor more information.
Commits
Merged pull requests: - Updated DocumentTermMatrix implementation (#205) (@svilupp)
- Julia
Published by github-actions[bot] over 1 year ago
https://github.com/svilupp/promptingtools.jl - v0.53.0
PromptingTools v0.53.0
Added
- Added beta headers to enable long outputs (up to 8K tokens) with Anthropic's Sonnet 3.5 (see
?anthropic_extra_headers). - Added a kwarg to prefill (
aiprefill) AI responses with Anthropic's models to improve steerability (see?aigenerate).
Updated
- Documentation of
aigenerateto make it clear that ifstreamcallbackis provide WITHflavorset, there is no automatic configuration and the user must provide the correctapi_kwargs. - Grouped Anthropic's beta headers as a comma-separated string as per the latest API specification.
Commits
Merged pull requests: - Update Anthropic kwargs + docs (#204) (@svilupp)
- Julia
Published by github-actions[bot] over 1 year ago
https://github.com/svilupp/promptingtools.jl - v0.52.0
PromptingTools v0.52.0
Added
- Added a new EXPERIMENTAL
streamcallbackkwarg foraigeneratewith the OpenAI and Anthropic prompt schema to enable custom streaming implementations. Simplest usage is simply withstreamcallback=stdout, which will print each text chunk into the console. System is modular enabling custom callbacks and allowing you to inspect received chunks. See?StreamCallbackfor more information. It does not support tools yet.
Commits
Merged pull requests: - Add stream callbacks (#203) (@svilupp)
- Julia
Published by github-actions[bot] over 1 year ago
https://github.com/svilupp/promptingtools.jl - v0.51.0
PromptingTools v0.51.0
Added
Added more flexible structured extraction with aiextract -> now you can simply provide the field names and, optionally, their types without specifying the struct itself (in aiextract, provide the fields like returntype = [:fieldname => fieldtype]). Added a way to attach field-level descriptions to the generated JSON schemas to better structured extraction (see ?updateschema_descriptions! to see the syntax), which was not possible with struct-only extraction.
Commits
Merged pull requests:
- styling issues (#199) (@lazarusA)
- Add assertion for empty docs in get_embeddings (#200) (@iuliadmtru)
- Fix documentation for building RAG (#201) (@iuliadmtru)
- Update Structured Extraction (#202) (@svilupp)
- Julia
Published by github-actions[bot] over 1 year ago
https://github.com/svilupp/promptingtools.jl - v0.50.0
PromptingTools v0.50.0
Breaking Changes
AIMessageandDataMessagenow have a new fieldextrasto hold any API-specific metadata in a simple dictionary. Change is backward-compatible (defaults tonothing).
Added
- Added EXPERIMENTAL support for Anthropic's new prompt cache (see ?
aigenerateand look forcachekwarg). Note that COST estimate will be wrong (ignores the caching discount for now). - Added a new
extrasfield toAIMessageandDataMessageto hold any API-specific metadata in a simple dictionary (eg, used for reporting on the cache hit/miss).
Commits
Merged pull requests: - Add experimental prompt cache support for Anthropic (#198) (@svilupp)
- Julia
Published by github-actions[bot] almost 2 years ago
https://github.com/svilupp/promptingtools.jl - v0.49.0
PromptingTools v0.49.0
Merged pull requests: - Add ChatGPT 4o (#195) (@svilupp)
- Julia
Published by github-actions[bot] almost 2 years ago
https://github.com/svilupp/promptingtools.jl - v0.48.0
PromptingTools v0.48.0
Added
- Implements the new OpenAI structured output mode for
aiextract(just provide kwargstrict=true). Reference blog post.
Commits
Merged pull requests: - Add OpenAI structured outputs (#194) (@svilupp)
Closed issues: - Broken on Julia 1.11beta2 (#158) - Add support for OpenAI's Structured Outputs (#191)
- Julia
Published by github-actions[bot] almost 2 years ago
https://github.com/svilupp/promptingtools.jl - v0.47.0
PromptingTools v0.47.0
Merged pull requests: - Add DTM specialized methods (#193) (@svilupp)
Closed issues: - Unable to get started (#168)
- Julia
Published by github-actions[bot] almost 2 years ago
https://github.com/svilupp/promptingtools.jl - v0.46.0
PromptingTools v0.46.0
Merged pull requests: - Update docstrings for RAGTools (#188) (@svilupp) - New GPT4o (#190) (@svilupp)
- Julia
Published by github-actions[bot] almost 2 years ago
https://github.com/svilupp/promptingtools.jl - v0.45.0
PromptingTools v0.45.0
Breaking Change
getindex(::MultiIndex, ::MultiCandidateChunks)now returns sorted chunks by default (sorted=true) to guarantee that potentialcontext(=chunks) is sorted by descending similarity score across different sub-indices.
Updated
- Updated a
hcatimplementation inRAGTools.get_embeddingsto reduce memory allocations for large embedding batches (c. 3x fewer allocations, seehcat_truncate). - Updated
length_longest_common_subsequencesignature to work only for pairs ofAbstractStringto not fail silently when wrong arguments are provided.
Fixed
- Changed the default behavior of
getindex(::MultiIndex, ::MultiCandidateChunks)to always return sorted chunks for consistency with other similar functions and correctretrievebehavior. This was accidentally changed in v0.40 and is now reverted to the original behavior.
Commits
Merged pull requests: - Updates embedding concatenation (#186) (@svilupp) - Fix getindex (#187) (@svilupp)
- Julia
Published by github-actions[bot] almost 2 years ago
https://github.com/svilupp/promptingtools.jl - v0.44.0
PromptingTools v0.44.0
Added
- Added Mistral Large 2 and Mistral-Nemo to the model registry (alias
mistral-nemo).
Fixed
- Fixed a bug where
wrap_stringwould not correctly split very long Unicode words.
Commits
Merged pull requests:
- Add mistral large 2 (#184) (@svilupp)
- Fix wrap_string for long Unicode (#185) (@svilupp)
- Julia
Published by github-actions[bot] almost 2 years ago
https://github.com/svilupp/promptingtools.jl - v0.43.0
PromptingTools v0.43.0
Added
- Added Llama 3.1 registry records for Fireworks.ai (alias
fllama3,fllama370,fllama3405andfls,flm,fllfor small/medium/large similar to the other providers).
Commits
Merged pull requests: - Add Fireworks.ai llama3.1 (#183) (@svilupp)
- Julia
Published by github-actions[bot] almost 2 years ago
https://github.com/svilupp/promptingtools.jl - v0.42.0
PromptingTools v0.42.0
Added
- Registered new Meta Llama 3.1 models hosted on GroqCloud and Together.ai (eg, Groq-hosted
gllama370has been updated to point to the latest available model and 405b model now has aliasgllama3405). Because that's quite clunky, I've added abbreviations based on sizes small/medium/large (that is 8b, 70b, 405b) undergls/glm/gllfor Llama 3.1 hosted on GroqCloud (similarly, we now havetls/tlm/tllfor Llama3.1 on Together.ai). - Generic model aliases for Groq and Together.ai for Llama3 models have been updated to point to the latest available models (Llama 3.1).
- Added Gemma2 9b model hosted on GroqCloud to the model registry (alias
ggemma9).
Updated
- Minor optimizations to
SubDocumentTermMatrixto reduce memory allocations and improve performance.
Commits
Merged pull requests: - Register Llama 3.1 models + minor retrieval improvement (#182) (@svilupp)
- Julia
Published by github-actions[bot] almost 2 years ago
https://github.com/svilupp/promptingtools.jl - v0.41.0
PromptingTools v0.41.0
Added
- Introduced a "view" of
DocumentTermMatrix(=SubDocumentTermMatrix) to allow views of Keyword-based indices (ChunkKeywordsIndex). It's not a pure view (TF matrix is materialized to prevent performance degradation).
Fixed
- Fixed a bug in
find_closest(finder::BM25Similarity, ...)where the view ofDocumentTermMatrix(ie,view(DocumentTermMatrix(...), ...)) was undefined. - Fixed a bug where a view of a view of a
ChunkIndexwouldn't intersect the positions (it was returning only the latest requested positions).
Commits
Merged pull requests: - Add SubDocumentTermMatrix (#181) (@svilupp)
- Julia
Published by github-actions[bot] almost 2 years ago
https://github.com/svilupp/promptingtools.jl - v0.40.0
PromptingTools v0.40.0
Added
- Introduces
RAGTools.SubChunkIndexto allow projectingviewsof various indices. Useful for pre-filtering your data (faster and more precise retrieval). See?RT.SubChunkIndexfor more information and how to use it.
Updated
CandidateChunksandMultiCandidateChunksintersection methods updated to be an order of magnitude faster (useful for large sets like tag filters).
Fixed
- Fixed a bug in
find_closest(finder::BM25Similarity, ...)whereminimum_similaritykwarg was not implemented.
Commits
Merged pull requests: - Add SubChunkIndex (view of index) (#179) (@svilupp)
- Julia
Published by github-actions[bot] almost 2 years ago
https://github.com/svilupp/promptingtools.jl - v0.39.0
PromptingTools v0.39.0
Breaking Changes
- Changed the default model for
ai*chat functions (PT.MODEL_CHAT) fromgpt3ttogpt4om(GPT-4o-mini). See the LLM-Leaderboard results and the release blog post.
Added
- Added the new GPT-4o-mini to the model registry (alias
gpt4om). It's the smallest and fastest model based on GPT4 that is cheaper than GPT3.5Turbo.
Commits
Merged pull requests: - Add GPT-4o-mini + set as default (#180) (@svilupp)
- Julia
Published by github-actions[bot] almost 2 years ago
https://github.com/svilupp/promptingtools.jl - v0.38.0
PromptingTools v0.38.0
Added
- Added a new tagging filter
RT.AllTagFiltertoRT.find_tags, which requires all tags to be present in a chunk. - Added an option in
RT.get_keywordsto set the minimum length of the keywords. - Added a new method for
reciprocal_rank_fusionand utility for standardizing candidate chunk scores (score_to_unit_scale).
Commits
Merged pull requests: - Template update (#177) (@svilupp) - Add AllTagFilter (#178) (@svilupp)
- Julia
Published by github-actions[bot] almost 2 years ago
https://github.com/svilupp/promptingtools.jl - v0.37.1
PromptingTools v0.37.1
Fixed
- Fixed a bug in CohereReranker when it wouldn't handle correctly CandidateChunks
index_ids.
Commits
Merged pull requests: - Fix CohereReranker bug (#176) (@svilupp)
- Julia
Published by github-actions[bot] almost 2 years ago
https://github.com/svilupp/promptingtools.jl - v0.37.0
PromptingTools v0.37.0
Updated
- Increase compat bound for FlashRank to 0.4
Commits
Merged pull requests: - Increase compat for FlashRank (#175) (@svilupp)
- Julia
Published by github-actions[bot] almost 2 years ago
https://github.com/svilupp/promptingtools.jl - v0.36.0
PromptingTools v0.36.0
Added
- Added a prompt template for RAG query expansion for BM25 (
RAGQueryKeywordExpander)
Fixed
- Fixed a small bug in the truncation step of the RankGPT's
permutation_step!(bad indexing of string characters). - Fixed a bug where a certain combination of
rank_startandrank_endwould not result the last sliding window. - Fixed a bug where partially filled
RAGResultwould fail pretty-printing withpprint
Commits
Merged pull requests: - Update rankGPT implementation + add a template (#174) (@svilupp)
- Julia
Published by github-actions[bot] almost 2 years ago
https://github.com/svilupp/promptingtools.jl - v0.35.0
PromptingTools v0.35.0
Added
- Added a utility function to RAGTools
reciprocal_rank_fusion, as a principled way to merge multiple rankings. See?RAGTools.Experimental.reciprocal_rank_fusionfor more information.
Commits
Merged pull requests: - Add Reciprocal Rank Fusion (#173) (@svilupp)
- Julia
Published by github-actions[bot] almost 2 years ago
https://github.com/svilupp/promptingtools.jl - v0.34.0
PromptingTools v0.34.0
Added
RankGPTimplementation for RAGTools chunk re-ranking pipeline. See?RAGTools.Experimental.rank_gptfor more information and corresponding reranker type?RankGPTReranker.
Commits
Merged pull requests: - Add RankGPT (#172) (@svilupp)
- Julia
Published by github-actions[bot] almost 2 years ago
https://github.com/svilupp/promptingtools.jl - v0.33.2
PromptingTools v0.33.2
Fixed
- Add back accidentally dropped DBKS keys
Commits
Merged pull requests: - Add back API keys (#171) (@svilupp)
- Julia
Published by github-actions[bot] almost 2 years ago
https://github.com/svilupp/promptingtools.jl - v0.33.1
PromptingTools v0.33.1
Fixed
- Fixed loading RAGResult when one of the candidate fields was
nothing. - Utility type checks like
isusermessage,issystemmessage,isdatamessage,isaimessage,istracermessagedo not throw errors when given any arbitrary input types (previously they only worked forAbstractMessagetypes). It's aisacheck, so it should work for all input types. - Changed preference loading to use typed
globalinstead ofconst, to fix issues with API keys not being loaded properly on start. You can now also callPromptingTools.load_api_keys!()to re-load the API keys (and ENV variables) manually.
Commits
Merged pull requests:
- Rag Tools fix + relaxing const for API key loading (#170) (@svilupp)
- Julia
Published by github-actions[bot] almost 2 years ago
https://github.com/svilupp/promptingtools.jl - v0.33.0
PromptingTools v0.33.0
Added
- Added registry record for Anthropic Claude 3.5 Sonnet with ID
claude-3-5-sonnet-20240620(read the blog post). Aliases "claude" and "claudes" have been linked to this latest Sonnet model.
Commits
Merged pull requests: - Add Anthropic Sonnet 3.5 (#167) (@svilupp)
- Julia
Published by github-actions[bot] almost 2 years ago
https://github.com/svilupp/promptingtools.jl - v0.32.0
PromptingTools v0.32.0
Updated
- Changed behavior of
RAGTools.rerank(::FlashRanker,...)to always dedupe input chunks (to reduce compute requirements).
Fixed
- Fixed a bug in verbose INFO log in
RAGTools.rerank(::FlashRanker,...).
Commits
Merged pull requests: - Update FlashRank to use only unique documents (#166) (@svilupp)
- Julia
Published by github-actions[bot] almost 2 years ago
https://github.com/svilupp/promptingtools.jl - v0.31.1
PromptingTools v0.31.1
Updated
- Improved the implementation of
RAGTools.unpack_bitsto be faster with fewer allocations.
Commits
Merged pull requests:
- Improve unpack_bits (#165) (@svilupp)
- Julia
Published by github-actions[bot] almost 2 years ago
https://github.com/svilupp/promptingtools.jl - v0.31.0
PromptingTools v0.31.0
Breaking Changes
- The return type of
RAGTools.find_tags(::NoTagger,...)is now::Nothinginstead ofCandidateChunks/MultiCandidateChunkswith all documents. Base.getindex(::MultiIndex, ::MultiCandidateChunks)now always returns sorted chunks for consistency with the behavior of othergetindexmethods on*Chunks.
Updated
- Cosine similarity search now uses
partialsortpermfor better performance on large datasets. - Skip unnecessary work when the tagging functionality in the RAG pipeline is disabled (
find_tagswithNoTaggeralways returnsnothingwhich improves the compiled code). - Changed the default behavior of
getindex(::MultiIndex, ::MultiCandidateChunks)to always return sorted chunks for consistency with other similar functions. Note that you should always use re-rankering anyway (seeFlashRank.jl).
Commits
Merged pull requests: - Update RAG performance (Breaking changes) (#164) (@svilupp)
- Julia
Published by github-actions[bot] almost 2 years ago
https://github.com/svilupp/promptingtools.jl - v0.30.0
PromptingTools v0.30.0
Fixed
- Fixed a bug on Julia 1.11 beta by adding REPL stdlib as a direct dependency.
- Fixed too restrictive argument types for
RAGTools.build_tagsmethod.
Commits
Merged pull requests: - Update deps for 1.11 (REPL) (#163) (@svilupp)
- Julia
Published by github-actions[bot] almost 2 years ago
https://github.com/svilupp/promptingtools.jl - v0.29.0
PromptingTools v0.29.0
Added
- Added a package extension for FlashRank.jl to support local ranking models. See ?RT.FlashRanker for more information or examples/RAGwithFlashRank.jl for a quick example.
Commits
Merged pull requests: - Add FlashRank.jl package extension (#162) (@svilupp)
Closed issues: - Allow changing OpenAI key after first load (#161)
- Julia
Published by github-actions[bot] almost 2 years ago
https://github.com/svilupp/promptingtools.jl - v0.28.0
PromptingTools v0.28.0
Added
- Added Mistral coding-oriented Codestral to the model registry, aliased as codestral or mistralc. It's very fast, performant and much cheaper than similar models.
Commits
Merged pull requests: - Add Mistral Codestral (#160) (@svilupp)
- Julia
Published by github-actions[bot] about 2 years ago
https://github.com/svilupp/promptingtools.jl - v0.27.0
PromptingTools v0.27.0
Added
- Added a keyword-based search similarity to RAGTools to serve both for baseline evaluation and for advanced performance (by having a hybrid index with both embeddings and BM25). See
?RT.KeywordsIndexerand?RT.BM25Similarityfor more information, to build usebuild_index(KeywordsIndexer(), texts)or convert an existing embeddings-based indexChunkKeywordsIndex(index).
Updated
- For naming consistency,
ChunkIndexin RAGTools has been renamed toChunkEmbeddingsIndex(with an aliasChunkIndexfor backwards compatibility). There are now two main index types:ChunkEmbeddingsIndexandChunkKeywordsIndex(=BM25), which can be combined into aMultiIndexto serve as a hybrid index.
Commits
Merged pull requests: - Add BM25 Index (#157) (@svilupp) - Implement E2E Hybrid retrieval (BM25 + embeddings) (#159) (@svilupp)
Closed issues: - [FR] RAG: Add HybridChunkIndex with BM25 support (#119)
- Julia
Published by github-actions[bot] about 2 years ago
https://github.com/svilupp/promptingtools.jl - v0.26.2
PromptingTools v0.26.2
Fixed
- Fixed a rare bug where prompt templates created on MacOS will come with metadata that breaks the prompt loader. From now on, it ignores any dotfiles (hidden files starting with ".").
Commits
Merged pull requests: - Template file parsing fix (#156) (@svilupp)
- Julia
Published by github-actions[bot] about 2 years ago
https://github.com/svilupp/promptingtools.jl - v0.26.1
PromptingTools v0.26.1
Fixed
- Fixed a bug where utility
length_longest_common_subsequencewas not working with complex Unicode characters
Commits
Merged pull requests: - Fix LCS utility (#155) (@svilupp)
- Julia
Published by github-actions[bot] about 2 years ago
https://github.com/svilupp/promptingtools.jl - v0.26.0
PromptingTools v0.26.0
BREAKING CHANGES
- Added new field
metatoTracerMessageandTracerMessageLiketo hold metadata in a simply dictionary. Change is backward-compatible. - Changed behaviour of
aitemplates(name::Symbol)to look for the exact match on the template name, not just a partial match. This is a breaking change for theaitemplatesfunction only. Motivation is that having multiple matches could have introduced subtle bugs when looking up valid placeholders for a template.
Added
- Improved support for
aiclassifywith OpenAI models (you can now encode upto 40 choices). - Added a template for routing questions
:QuestionRouter(to be used withaiclassify) - Improved tracing by
TracerSchemato automatically capture crucial metadata such as any LLM API kwargs (api_kwargs), use of prompt templates and its version. Information is captured inmeta(tracer)dictionary. See?TracerSchemafor more information. - New tracing schema
SaverSchemaallows to automatically serialize all conversations. It can be composed with other tracing schemas, eg,TracerSchemato automatically capture necessary metadata and serialize. See?SaverSchemafor more information. - Updated options for Binary embeddings (refer to release v0.18 for motivation). Adds utility functions
pack_bitsandunpack_bitsto move between binary and UInt64 representations of embeddings. RAGTools adds the correspondingBitPackedBatchEmbedderandBitPackedCosineSimilarityfor fast retrieval on these Bool<->UInt64 embeddings (credit to domluna's tinyRAG).
Fixed
- Fixed a bug where
aiclassifywould not work when returning the full conversation for choices with extra descriptions
Commits
Merged pull requests: - Improvements to aiclassify and aitemplates (#150) (@svilupp) - Improve tracer schema / automated logging (#151) (@svilupp) - Add BitPacked embeddings for RAG retrieval (#152) (@svilupp) - add tracer kwargs (#153) (@svilupp)
Closed issues: - [FR] Improve performance of Bool embeddings (#144)
- Julia
Published by github-actions[bot] about 2 years ago
https://github.com/svilupp/promptingtools.jl - v0.25.0
PromptingTools v0.25.0
Added
- Added model registry record for the latest OpenAI GPT4 Omni model (
gpt4o) - it's as good as GPT4, faster and cheaper.
Commits
Merged pull requests: - Add GPT4-Omni (#149) (@svilupp)
- Julia
Published by github-actions[bot] about 2 years ago
https://github.com/svilupp/promptingtools.jl - v0.24.0
PromptingTools v0.24.0
Added
- Added support for DeepSeek models via the
dschatanddscodealiases. You can set theDEEPSEEK_API_KEYenvironment variable to your DeepSeek API key.
Commits
Merged pull requests: - Add DeepSeek models (#147) (@svilupp) - Update Changelog (#148) (@svilupp)
- Julia
Published by github-actions[bot] about 2 years ago
https://github.com/svilupp/promptingtools.jl - v0.23.0
PromptingTools v0.23.0
Added
- Added new prompt templates for "Expert" tasks like
LinuxBashExpertAsk,JavascriptExpertTask, etc. - Added new prompt templates for self-critiquing agents like
ChiefEditorTranscriptCritic,JuliaExpertTranscriptCritic, etc.
Updated
- Extended
aicodefixer_feedbackmethods to work withAICodeandAIGenerate.
Commits
Merged pull requests: - Add model providers and Supported functions (#134) (@adarshpalaskar1) - Mention that the account requires funding (#135) (@KronosTheLate) - Add templates and minor improvements (#142) (@svilupp)
Closed issues: - Unable to get started (#132)
- Julia
Published by github-actions[bot] about 2 years ago
https://github.com/svilupp/promptingtools.jl - v0.22.0
PromptingTools v0.22.0
Added
- Added support for Groq, the fastest LLM provider out there. It's free for now, so you can try it out - you just need to set your GROQAPIKEY. We've added Llama3 8b (alias "gllama3"), 70b (alias "gllama370") and Mixtral 8x7b (alias "gmixtral"). For the shortcut junkies, we also added a shorthand Llama3 8b = "gl3" (first two letters and the last digit), Llama3 70b = "gl70" (first two letters and the last two digits).
Commits
Merged pull requests: - Add support for groq (#139) (@svilupp) - Update Project.toml (#140) (@svilupp)
- Julia
Published by github-actions[bot] about 2 years ago
https://github.com/svilupp/promptingtools.jl - v0.21.0
PromptingTools v0.21.0
Added
- New models added to the model registry: Llama3 8b on Ollama (alias "llama3" for convenience) and on Together.ai (alias "tllama3", "t" stands for Together.ai), also adding the llama3 70b on Together.ai (alias "tllama370") and the powerful Mixtral-8x22b on Together.ai (alias "tmixtral22").
Fixed
- Fixed a bug where pretty-printing
RAGResultwould forget a newline between the sources and context sections.
Commits
Merged pull requests: - Add Llama 3 (#138) (@svilupp)
- Julia
Published by github-actions[bot] about 2 years ago
https://github.com/svilupp/promptingtools.jl - v0.20.1
PromptingTools v0.20.1
Fixed
- Fixed
truncate_dimensionto ignore when 0 is provided (previously it would throw an error).
Commits
Merged pull requests: - Fix truncate_dimension (#137) (@svilupp)
- Julia
Published by github-actions[bot] about 2 years ago
https://github.com/svilupp/promptingtools.jl - v0.20.0
PromptingTools v0.20.0
Added
- Added a few new open-weights models hosted by Fireworks.ai to the registry (DBRX Instruct, Mixtral 8x22b Instruct, Qwen 72b). If you're curious about how well they work, try them!
- Added basic support for observability downstream. Created custom callback infrastructure with
initialize_tracerandfinalize_tracerand dedicated types areTracerMessageandTracerMessageLike. See?TracerMessagefor more information and the correspondingaigeneratedocstring. - Added
MultiCandidateChunkswhich can hold candidates for retrieval across many indices (it's a flat structure to be similar toCandidateChunksand easy to reason about). - JSON serialization support extended for
RAGResult,CandidateChunks, andMultiCandidateChunksto increase observability of RAG systems - Added a new search refiner
TavilySearchRefiner- it will search the web via Tavily API to try to improve on the RAG answer (see?refine!). - Introduced a few small utilities for manipulation of nested kwargs (necessary for RAG pipelines), check out
getpropertynested,setpropertynested,merge_kwargs_nested.
Updated
- [BREAKING] change to
CandidateChunkswhere it's no longer allowed to be nested (ie,cc.positionsbeing a list of severalCandidateChunks). This is a breaking change for theRAGToolsmodule only. We have introduced a newMultiCandidateChunkstypes that can refer toCandidateChunksacross many indices. - Changed default model for
RAGTools.CohereRerankerto "cohere-rerank-english-v3.0".
Fixed
wrap_stringutility now correctly splits only on spaces. Previously it would split on newlines, which would remove natural formatting of prompts/messages when displayed viapprint
Commits
Merged pull requests: - Correct hero cards (#129) (@cpfiffer) - Update Hero section in docs (#130) (@svilupp) - Add TraceMessage for observability (#133) (@svilupp) - Update binary RAG pipeline (#136) (@svilupp)
Closed issues:
- [Question/FR] Using some HugginFace models (#127)
- [DOCS] Markdown is not parsed in hero cards, use <pre> instead! (#128)
- Make REPL mode (#131)
- Julia
Published by github-actions[bot] about 2 years ago
https://github.com/svilupp/promptingtools.jl - v0.19.0
PromptingTools v0.19.0
Added
- [BREAKING CHANGE] The default GPT-4 Turbo model alias ("gpt4t") now points to the official GPT-4 Turbo endpoint ("gpt-4-turbo").
- Adds references to
mistral-tiny(7bn parameter model from MistralAI) to the model registry for completeness. - Adds the new GPT-4 Turbo model (
"gpt-4-turbo-2024-04-09"), but you can simply use alias"gpt4t"to access it.
Commits
Merged pull requests: - Register mistral tiny (#123) (@svilupp) - Add new GPT-4 Turbo (#124) (@svilupp)
- Julia
Published by github-actions[bot] about 2 years ago
https://github.com/svilupp/promptingtools.jl - v0.18.0
PromptingTools v0.18.0
Added
- Adds support for binary embeddings in RAGTools (dispatch type for
find_closestisfinder=BinaryCosineSimilarity()), but you can also just convert the embeddings to binary yourself (always chooseMatrix{Bool}for speed, notBitMatrix) and use without any changes (very little performance difference at the moment). - Added Ollama embedding models to the model registry ("nomic-embed-text", "mxbai-embed-large") and versioned MistralAI models.
- Added template for data extraction with Chain-of-thought reasoning:
:ExtractDataCoTXML. - Added data extraction support for Anthropic models (Claude 3) with
aiextract. Try it with Claude-3 Haiku (model="claudeh") and Chain-of-though template (:ExtractDataCoTXML). See?aiextractfor more information and check Anthropic's recommended practices.
Fixed
Commits
Merged pull requests: - Add Binary embeddings to RAGTools (#117) (@svilupp) - Add data extraction for Anthropic models (#122) (@svilupp)
- Julia
Published by github-actions[bot] about 2 years ago
https://github.com/svilupp/promptingtools.jl - v0.17.1
PromptingTools v0.17.1
Fixed
- Fixed a bug in
print_htmlwhere the custom kwargs were not being passed to theHTMLconstructor.
Commits
Merged pull requests:
- Fix bug in print_html (#116) (@svilupp)
- Julia
Published by github-actions[bot] about 2 years ago
https://github.com/svilupp/promptingtools.jl - v0.17.0
PromptingTools v0.17.0
Added
- Added support for
aigeneratewith Anthropic API. Preset model aliases areclaudeo,claudes, andclaudeh, for Claude 3 Opus, Sonnet, and Haiku, respectively. - Enabled the GoogleGenAI extension since
GoogleGenAI.jlis now officially registered. You can useaigenerateby setting the model togeminiand providing theGOOGLE_API_KEYenvironment variable. - Added utilities to make preparation of finetuning datasets easier. You can now export your conversations in JSONL format with ShareGPT formatting (eg, for Axolotl). See
?PT.save_conversationsfor more information. - Added
print_htmlutility for RAGTools module to print HTML-styled RAG answer annotations for web applications (eg, Genie.jl). See?PromptingTools.Experimental.RAGTools.print_htmlfor more information and examples.
Commits
Merged pull requests: - Update CHANGELOG.md (#104) (@svilupp) - A little README.md correction (#107) (@Muhammad-saad-2000) - Update RAG Diagram (#108) (@svilupp) - Add support for Claude API (#109) (@svilupp) - Enable GoogleGenAI extension (#111) (@svilupp) - Add ShareGPT template (#113) (@svilupp) - Increase compat for GoogleGenAI v0.3 (#114) (@svilupp) - Update html printing (#115) (@svilupp)
Closed issues: - [FR] Add support for Claude API (#96)
- Julia
Published by github-actions[bot] about 2 years ago
https://github.com/svilupp/promptingtools.jl - v0.16.1
PromptingTools v0.16.1
Fixed
- Fixed a bug where setnodestyle! was not accepting any Stylers expect for the vanilla Styler.
Commits
Merged pull requests: - Update Google AI tutorial (#103) (@svilupp) - Allow HTMLStyler in node annotations (#105) (@svilupp)
- Julia
Published by github-actions[bot] about 2 years ago
https://github.com/svilupp/promptingtools.jl - v0.16.0
PromptingTools v0.16.0
Added
- Added pretty-printing via
PT.pprintthat does NOT depend on Markdown and splits text to adjust to the width of the output terminal. It is useful in notebooks to add newlines. - Added support annotations for RAGTools (see
?RAGTools.Experimental.annotate_supportfor more information) to highlight which parts of the generated answer come from the provided context versus the model's knowledge base. It's useful for transparency and debugging, especially in the context of AI-generated content. You can experience it if you run the output ofairagthrough pretty printing (PT.pprint). - Added utility
distance_longest_common_subsequenceto find the normalized distance between two strings (or a vector of strings). Always returns a number between 0-1, where 0 means the strings are identical and 1 means they are completely different. It's useful for comparing the similarity between the context provided to the model and the generated answer. - Added a new documentation section "Extra Tools" to highlight key functionality in various modules, eg, the available text utilities, which were previously hard to discover.
- Extended documentation FAQ with tips on tackling rate limits and other common issues with OpenAI API.
- Extended documentation with all available prompt templates. See section "Prompt Templates" in the documentation.
- Added new RAG interface underneath
airaginPromptingTools.RAGTools.Experimental. Each step now has a dedicated function and a type that can be customized to achieve arbitrary logic (via defining methods for your own types).airagis split into two main steps:retrieveandgenerate!. You can use them separately or together. See?airagfor more information.
Updated
- Renamed
split_by_lengthtext splitter torecursive_splitterto make it easier to discover and understand its purpose.split_by_lengthis still available as a deprecated alias.
Fixed
- Fixed a bug where
LOCAL_SERVERdefault value was not getting picked up. Now, it defaults tohttp://localhost:10897/v1if not set in the preferences, which is the address of the server started by Llama.jl. - Fixed a bug in multi-line code annotation, which was assigning too optimistic scores to the generated code. Now the score of the chunk is the length-weighted score of the "top" source chunk divided by the full length of score tokens (much more robust and demanding).
Commits
Merged pull requests: - Update docs to Vitepress (#88) (@svilupp) - Add support annotations (#90) (@svilupp) - Update Documentation (#91) (@svilupp) - Add Prompt Templates to the Docs (#92) (@svilupp) - fix typo on set_preferences! examples, fixes #93 (#94) (@ceferisbarov) - Rag Interface Rewrite (#95) (@svilupp)
Closed issues: - Wrong syntax in README (#93)
- Julia
Published by github-actions[bot] about 2 years ago
https://github.com/svilupp/promptingtools.jl - v0.15.0
PromptingTools v0.15.0
Added
- Added experimental support for image generation with OpenAI DALL-E models, eg,
msg = aiimage("A white cat on a car"). See ?aiimage for more details.
Commits
Merged pull requests: - Add image generation with DALL-E 3 (#86) (@svilupp) - Update Changelog (#87) (@svilupp)
- Julia
Published by github-actions[bot] over 2 years ago
https://github.com/svilupp/promptingtools.jl - v0.14.0
PromptingTools v0.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_templateto create templates on the fly without having to deal withPT.UserMessageetc. If you specify the keyword argumentload_as = "MyName", the template will be immediately loaded to the template registry. See?create_templatefor more information and examples.
Commits
Merged pull requests: - Templating utilities (#84) (@svilupp) - Improve create_template functionality (#85) (@svilupp)
- Julia
Published by github-actions[bot] over 2 years ago
https://github.com/svilupp/promptingtools.jl - v0.13.0
PromptingTools v0.13.0
Added
- Added initial support for Google Gemini models for
aigenerate(requires environment variableGOOGLE_API_KEYand package GoogleGenAI.jl to be loaded). It must be loaded explicitly as it's not yet registered. - Added a utility to compare any two string sequences (and other iterators)
length_longest_common_subsequence. It can be used to fuzzy match strings (eg, detecting context/sources in an AI-generated response or fuzzy matching AI response to some preset categories). See the docstring for more information?length_longest_common_subsequence. - Rewrite of
aiclassifyto classify into an arbitrary list of categories (including with descriptions). It's a quick and easy option for "routing" and similar use cases, as it exploits the logit bias trick and outputs only 1 token. Currently, onlyOpenAISchemais supported. See?aiclassifyfor more information. - Initial support for multiple completions in one request for OpenAI-compatible API servers. Set via API kwarg
n=5and it will request 5 completions in one request, saving the network communication time and paying the prompt tokens only once. It's useful for majority voting, diversity, or challenging agentic workflows. - Added new fields to
AIMessageandDataMessagetypes to simplify tracking in complex applications. Added fields:cost- the cost of the query (summary per call, so count only once if you requested multiple completions in one call)log_prob- summary log probability of the generated sequence, set API kwarglogprobs=trueto receive itrun_id- ID of the AI API callsample_id- ID of the sample in the batch if you requested multiple completions, otherwisesample_id==nothing(they will have the samerun_id)finish_reason- the reason why the AI stopped generating the sequence (eg, "stop", "length") to provide more visibility for the user
- Support for Fireworks.ai and Together.ai providers for fast and easy access to open-source models. Requires environment variables
FIREWORKS_API_KEYandTOGETHER_API_KEYto be set, respectively. See the?FireworksOpenAISchemaand?TogetherOpenAISchemafor more information. - Added an
extrafield toChunkIndexobject for RAG workloads to allow additional flexibility with metadata for each document chunk (assumed to be a vector of the same length as the document chunks). - Added
airetryfunction toPromptingTools.Experimental.AgentToolsto allow "guided" automatic retries of the AI calls (eg,AIGeneratewhich is the "lazy" counterpart ofaigenerate) if a given condition fails. It's useful for robustness and reliability in agentic workflows. You can provide conditions as functions and the same holds for feedback to the model as well. See a guessing game example in?airetry.
Updated
- Updated names of endpoints and prices of Mistral.ai models as per the latest announcement and pricing. Eg,
mistral-small->mistral-small-latest. In addition, the latest Mistral model has been addedmistral-large-latest(aliased asmistral-largeandmistrall, same for the others).mistral-small-latestandmistral-large-latestnow support function calling, which means they will work withaiextract(You need to explicitly providetool_choice, see the docs?aiextract).
Removed
- Removed package extension for GoogleGenAI.jl, as it's not yet registered. Users must load the code manually for now.
Commits
Merged pull requests:
- Add google api (#75) (@svilupp)
- Add LCS matching for strings (#76) (@svilupp)
- Aiclassify arbitrary choices (#78) (@svilupp)
- Multiple competions (n) (#79) (@svilupp)
- Add more APIs (#80) (@svilupp)
- Add airetry! (#82) (@svilupp)
- Remove GoogleGenAI (#83) (@svilupp)
- Julia
Published by github-actions[bot] over 2 years ago
https://github.com/svilupp/promptingtools.jl - v0.12.0
PromptingTools v0.12.0
Added
- Added more specific kwargs in
Experimental.RAGTools.airagto give more control over each type of AI call (ie,aiembed_kwargs,aigenerate_kwargs,aiextract_kwargs) - Move up compat bounds for OpenAI.jl to 0.9
Fixed
- Fixed a bug where obtaining an API_KEY from ENV would get precompiled as well, causing an error if the ENV was not set at the time of precompilation. Now, we save the
get(ENV...)into a separate variable to avoid being compiled away.
Commits
Merged pull requests: - Update AIrag kwargs (#74) (@svilupp)
- Julia
Published by github-actions[bot] over 2 years ago
https://github.com/svilupp/promptingtools.jl - v0.11.0
PromptingTools v0.11.0
Added
- Support for Databricks Foundation Models API. Requires two environment variables to be set:
DATABRICKS_API_KEYandDATABRICKS_HOST(the part of the URL before/serving-endpoints/) - Experimental support for API tools to enhance your LLM workflows:
Experimental.APITools.create_websearchfunction which can execute and summarize a web search (incl. filtering on specific domains). It requiresTAVILY_API_KEYto be set in the environment. Get your own key from Tavily - the free tier enables c. 1000 searches/month, which should be more than enough to get started.
Fixed
- Added an option to reduce the "batch size" for the embedding step in building the RAG index (
build_index,get_embeddings). Setembedding_kwargs = (; target_batch_size_length=10_000, ntasks=1)if you're having some limit issues with your provider. - Better error message if RAGTools are only partially imported (requires
LinearAlgebraandSparseArraysto load the extension).
Commits
Merged pull requests: - Update to Codecov4 (#70) (@svilupp) - Add Databricks API support (#71) (@svilupp) - Embedding API (#72) (@svilupp) - Add Tavily api (#73) (@svilupp)
- Julia
Published by github-actions[bot] over 2 years ago
https://github.com/svilupp/promptingtools.jl - v0.10.0
PromptingTools v0.10.0
Added
- [BREAKING CHANGE] The default embedding model (
MODEL_EMBEDDING) changes to "text-embedding-3-small" effectively immediately (lower cost, higher performance). The default chat model (MODEL_CHAT) will be changed by OpenAI to 0125 (from 0613) by mid-February. If you have older embeddings or rely on the exact chat model version, please set the model explicitly in your code or in your preferences. - New OpenAI models added to the model registry (see the release notes).
- "gpt4t" refers to whichever is the latest GPT-4 Turbo model ("gpt-4-0125-preview" at the time of writing)
- "gpt3t" refers to the latest GPT-3.5 Turbo model version 0125, which is 25-50% cheaper and has updated knowledge (available from February 2024, you will get an error in the interim)
- "gpt3" still refers to the general endpoint "gpt-3.5-turbo", which OpenAI will move to version 0125 by mid-February (ie, "gpt3t" will be the same as "gpt3" then. We have reflected the approximate cost in the model registry but note that it will be incorrect in the transition period)
- "emb3small" refers to the small version of the new embedding model (dim=1536), which is 5x cheaper than Ada and promises higher quality
- "emb3large" refers to the large version of the new embedding model (dim=3072), which is only 30% more expensive than Ada
- Improved AgentTools: added more information and specific methods to
aicode_feedbackanderror_feedbackto pass more targeted feedback/tips to the AIAgent - Improved detection of which lines were the source of error during
AICodeevaluation + forcing the error details to be printed inAICode(...).stdoutfor downstream analysis. - Improved detection of Base/Main method overrides in
AICodeevaluation (only warns about the fact), but you can usedetect_base_main_overrides(code)for custom handling
Fixed
- Fixed typos in the documentation
- Fixed a bug when API keys set in ENV would not be picked up by the package (caused by inlining of the
get(ENV,...)during precompilation) - Fixed string interpolation to be correctly escaped when evaluating
AICode
Commits
Merged pull requests: - Fix tests on model costs (#58) (@svilupp) - Re-apply format (#59) (@svilupp) - Add devcontainer.json (#60) (@svilupp) - Fix API key getter with @noinline (#61) (@svilupp) - Improve code feedback (#62) (@svilupp) - Improve error capture + error lines capture (#63) (@svilupp) - Escape fix in code loading (#64) (@svilupp) - Detect Base method overrides (#65) (@svilupp) - Tag v0.10 (#66) (@svilupp)
Closed issues: - ERROR: ArgumentError: api_key cannot be empty (#57)
- Julia
Published by github-actions[bot] over 2 years ago
https://github.com/svilupp/promptingtools.jl - v0.9.0
PromptingTools v0.9.0
Added
- Split
Experimental.RAGTools.build_indexinto smaller functions to easier sharing with other packages (get_chunks,get_embeddings,get_metadata) - Added support for Cohere-based RAG re-ranking strategy (and introduced associated
COHERE_API_KEYglobal variable and ENV variable)
Commits
Merged pull requests: - Refactor RAGTools (#56) (@svilupp)
- Julia
Published by github-actions[bot] over 2 years ago
https://github.com/svilupp/promptingtools.jl - v0.8.1
PromptingTools v0.8.1
Fixed
- Fixed
split_by_lengthto not mutateseparatorsargument (appeared in RAG use cases where we repeatedly apply splits to different documents)
Commits
Merged pull requests: - Fix separators in splitbylength (#55) (@svilupp)
- Julia
Published by github-actions[bot] over 2 years ago
https://github.com/svilupp/promptingtools.jl - v0.8.0
PromptingTools v0.8.0
Added
- Initial support for Llama.jl and other local servers. Once your server is started, simply use
model="local"to route your queries to the local server, eg,ai"Say hi!"local. Option to permanently set theLOCAL_SERVER(URL) added to preference management. See?LocalServerOpenAISchemafor more information. - Added a new template
StorytellerExplainSHAP(see the metadata)
Fixed
- Repeated calls to Ollama models were failing due to missing
prompt_eval_countkey in subsequent calls.
Commits
Merged pull requests: - Fix typos (#49) (@pitmonticone) - Add LocalServerOpenAISchema to support Llama.jl (#50) (@svilupp) - Fix ollama repeated calls (#52) (@svilupp) - New template and version update (#53) (@svilupp)
Closed issues: - Ollama: repeated request with same prompt fails (#51)
- Julia
Published by github-actions[bot] over 2 years ago
https://github.com/svilupp/promptingtools.jl - v0.7.0
PromptingTools v0.7.0
Added
- Added new Experimental sub-module AgentTools introducing
AICall(incl.AIGenerate), andAICodeFixerstructs. The AICall struct provides a "lazy" wrapper for ai* functions, enabling efficient and flexible AI interactions and building Agentic workflows. - Added the first AI Agent:
AICodeFixerwhich iteratively analyzes and improves any code provided by a LLM by evaluating it in a sandbox. It allows a lot of customization (templated responses, feedback function, etc.) See?AICodeFixerfor more information on usage and?aicodefixer_feedbackfor the example implementation of the feedback function. - Added
@timeoutmacro to allow for limiting the execution time of a block of code inAICodeviaexecution_timeoutkwarg (prevents infinite loops, etc.). See?AICodefor more information. - Added
preview(conversation)utility that allows you to quickly preview the conversation in a Markdown format in your REPL. RequiresMarkdownpackage for the extension to be loaded. - Added
ItemsExtractconvenience wrapper foraiextractwhen you want to extract one or more of a specificreturn_type(eg,return_type = ItemsExtract{MyMeasurement})
Fixed
- Fixed
aiembedto accept any AbstractVector of documents (eg, a view of a vector of documents)
Commits
Merged pull requests: - add AICodeFixer, AgentTools (#44) (@svilupp) - Add ItemsExtract (#45) (@svilupp) - Fix aiembed args to accept AbstractVector of documents (#46) (@svilupp) - tag update (#47) (@svilupp)
- Julia
Published by github-actions[bot] over 2 years ago
https://github.com/svilupp/promptingtools.jl - v0.6.0
PromptingTools v0.6.0
Added
@ai_strmacros now support multi-turn conversations. Theai"something"call will automatically remember the last conversation, so you can simply reply withai!"my-reply". If you send another message withai"", you'll start a new conversation. Same for the asynchronous versionsaai""andaai!"".- Created a new default schema for Ollama models
OllamaSchema(replacingOllamaManagedSchema), which allows multi-turn conversations and conversations with images (eg, with Llava and Bakllava models).OllamaManagedSchemahas been kept for compatibility and as an example of a schema where one provides the prompt as a string (not dictionaries like OpenAI API).
Fixed
- Removed template
RAG/CreateQAFromContextbecause it's a duplicate ofRAG/RAGCreateQAFromContext
Commits
Merged pull requests: - Remove CreateQAFromContext (#39) (@svilupp) - Enable conversations with @ai_str macros (#40) (@svilupp) - Add Ollama chat (#41) (@svilupp) - Tag new version (#42) (@svilupp) - Fix test (#43) (@svilupp)
- Julia
Published by github-actions[bot] over 2 years ago
https://github.com/svilupp/promptingtools.jl - v0.5.0
PromptingTools v0.5.0
Added
- Experimental sub-module RAGTools providing basic Retrieval-Augmented Generation functionality. See
?RAGToolsfor more information. It's all nested inside ofPromptingTools.Experimental.RAGToolsto signify that it might change in the future. Key functions arebuild_indexandairag, but it also provides a suite to make evaluation easier (see?build_qa_evalsand?run_qa_evalsor just see the exampleexamples/building_RAG.jl)
Fixed
- Stricter code parsing in
AICodeto avoid false positives (code blocks must end with "```\n" to catch comments inside text) - Introduced an option
skip_invalid=trueforAICode, which allows you to include only code blocks that parse successfully (useful when the code definition is good, but the subsequent examples are not), and an optioncapture_stdout=falseto avoid capturing stdout if you want to evaluateAICodein parallel (Pipe()that we use is NOT thread-safe) OllamaManagedSchemawas passing an incorrect model name to the Ollama server, often serving the default llama2 model instead of the requested model. This is now fixed.- Fixed a bug in kwarg
modelhandling when leveraging PT.MODEL_REGISTRY
Commits
Merged pull requests: - fix AICode parser (#31) (@svilupp) - Make stdout capture optional (#32) (@svilupp) - Fallback parser to expect newlines (#33) (@svilupp) - Fix model kwarg in Ollama (#34) (@svilupp) - Enable ollama tests (#35) (@svilupp) - Add RAG Tools (#36) (@svilupp) - Update docs (#37) (@svilupp) - Fix params kwarg in runqaevals (#38) (@svilupp)
- Julia
Published by github-actions[bot] over 2 years ago
https://github.com/svilupp/promptingtools.jl - v0.4.0
PromptingTools v0.4.0
Changes
- Improved AICode parsing and error handling (eg, capture more REPL prompts, detect parsing errors earlier, parse more code fence types), including the option to remove unsafe code (eg, Pkg.add("SomePkg")) with AICode(msg; skip_unsafe=true, vebose=true)
- Added new prompt templates: JuliaRecapTask, JuliaRecapCoTTask, JuliaExpertTestCode and updated JuliaExpertCoTTask to be more robust against early stopping for smaller OSS models
- Added support for MistralAI API via the MistralOpenAISchema(). All their standard models have been registered, so you should be able to just use model="mistral-tiny in your aigenerate calls without any further changes. Remember to either provide apikwargs.apikey or ensure you have ENV variable MISTRALAIAPIKEY set.
- Added support for any OpenAI-compatible API via schema=CustomOpenAISchema(). All you have to do is to provide your apikey and url (base URL of the API) in the apikwargs keyword argument. This option is useful if you use Perplexity.ai, Fireworks.ai, or any other similar services.
Merged pull requests: - Improve code parsing for small LLMs (#28) (@svilupp) - Add templates (#29) (@svilupp) - add MistralAI support (#30) (@svilupp)
- Julia
Published by github-actions[bot] over 2 years ago
https://github.com/svilupp/promptingtools.jl - 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 applyAICodeto the AI messages.AICodetries 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=trueandai*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
NoSchemathat 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
?PREFERENCESdocstring 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_REGISTRYaroundModelSpecstruct, 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?ModelSpecfor more information and?register_model!for an example of how to register a new model
Fixed
- Changed type of global
PROMPT_SCHEMA::AbstractPromptSchemafor an easier switch to local models as a default option
Breaking Changes
API_KEYglobal variable has been renamed toOPENAI_API_KEYto 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)
- Julia
Published by github-actions[bot] over 2 years ago