Skip to content

Releases: svilupp/PromptingTools.jl

v0.59.1

20 Oct 19:57
6e728ab
Compare
Choose a tag to compare

PromptingTools v0.59.1

Diff since v0.59.0

### 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:

v0.59.0

20 Oct 13:16
06fcd59
Compare
Choose a tag to compare

PromptingTools v0.59.0

Diff since v0.58.0

Breaking Changes

  • New field name introduced in AbstractChatMessage and AIToolRequest messages to enable role-based workflows. It initializes to nothing, 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 function aitools to support mixed structured and non-structured workflows, eg, agentic workflows (see ?aitools).
  • Added a field name to AbstractChatMessage and AIToolRequest messages to enable role-based workflows.
  • Added a support for partial argument execution with execute_tool function (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_signature to tool_call_signature to 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_choice keyword 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:

v0.58.0

09 Oct 20:58
592eafb
Compare
Choose a tag to compare

PromptingTools v0.58.0

Diff since v0.57.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 aiclassify to 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 IF feedback_inplace=true (because otherwise LLM can see it in the message history).

Fixed

  • Fixed a potential bug in airetry! where the aicall object was not properly validated to ensure it has been run! first.

Commits

Merged pull requests:

  • Add Cerebras API + node validation for airetry! (#217) (@svilupp)

v0.57.0

24 Sep 11:52
188ede9
Compare
Choose a tag to compare

PromptingTools v0.57.0

Diff since v0.56.1

Added

  • Support for Azure OpenAI API. Requires two environment variables to be st: AZURE_OPENAI_API_KEY and AZURE_OPENAI_HOST(i.e. https://.openai.azure.com). Thanks to @pabvald !

Commits

Merged pull requests:

v0.56.1

23 Sep 08:27
76b528d
Compare
Choose a tag to compare

Fixed

  • Removed accidental INFO log in Anthropic's aigenerate
  • Changed internal logging in streamcallback to use @debug when printing raw data chunks.

v0.56.0

18 Sep 19:37
826fceb
Compare
Choose a tag to compare

PromptingTools v0.56.0

Diff since v0.55.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 StreamCallback to allow for more flexibility.

Commits

Merged pull requests:

Closed issues:

  • Implement Prompt Caching Feature for Anthropic API Calls (#196)

v0.55.0

15 Sep 14:13
17cea6b
Compare
Choose a tag to compare

PromptingTools v0.55.0

Diff since v0.54.0

Added

  • Added support for OpenAI's JSON mode for aiextract (just provide kwarg json_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). The or prefix 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 aiclassify for the OpenAI GPT4o models that have a different tokenizer. Unknown model IDs will throw an error.

Commits

Merged pull requests:

v0.54.0

10 Sep 09:15
8fdad32
Compare
Choose a tag to compare

PromptingTools v0.54.0

Diff since v0.53.0

Updated

  • Improved the performance of BM25/Keywords-based indices for >10M documents. Introduced new kwargs of min_term_freq and max_terms in RT.get_keywords to reduce the size of the vocabulary. See ?RT.get_keywords for more information.

Commits

Merged pull requests:

  • Updated DocumentTermMatrix implementation (#205) (@svilupp)

v0.53.0

09 Sep 09:29
b89eb97
Compare
Choose a tag to compare

PromptingTools v0.53.0

Diff since v0.52.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 aigenerate to make it clear that if streamcallback is provide WITH flavor set, there is no automatic configuration and the user must provide the correct api_kwargs.
  • Grouped Anthropic's beta headers as a comma-separated string as per the latest API specification.

Commits

Merged pull requests:

v0.52.0

07 Sep 18:50
5c198fb
Compare
Choose a tag to compare

PromptingTools v0.52.0

Diff since v0.51.0

Added

  • Added a new EXPERIMENTAL streamcallback kwarg for aigenerate with the OpenAI and Anthropic prompt schema to enable custom streaming implementations. Simplest usage is simply with streamcallback=stdout, which will print each text chunk into the console. System is modular enabling custom callbacks and allowing you to inspect received chunks. See ?StreamCallback for more information. It does not support tools yet.

Commits

Merged pull requests: