When you create a prompt_template in Athina, it is automatically assigned a version (an auto-incremented integer) to help you track of changes over time.

This allows you to revert to previous versions if needed, and collaborate with others on the same prompt.

Commit a new version

You can commit a new version of a prompt_slug in the prompt playground, or via the API.

  1. Press the Commit button in the editor
  2. Enter a commit message (optional), and check that the prompt, default model, and parameters are correct.

Set Default Version

One version of your prompt_slug can be considered the “default” version.

This is the version that will be used by default when you run the prompt via API.

To set a version as the default version, you can do so in the prompt playground, or via the API.

curl
--location
--request PATCH 'https://api.athina.ai/api/v1/prompt/[PROMPT_SLUG]/[VERSION]/set-default' \
--header 'athina-api-key: ATHINA_API_KEY'

  • VERSION: The version number you want to set as the default version. (ex: 11)

View all versions

You can view all versions of a prompt_slug in the prompt playground, or via the API.

  1. Click the version identifier in the top bar of the editor.
  2. A panel will open showing all versions of the prompt.
  3. Hover over a version to see it in the editor.
  4. Click on a version to replace the editor content with that version.