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.

from athina_client.prompt import Prompt

Prompt.set_default(slug="test-staging", version=2)

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

Get Default Version

You can also get the default version of the prompt programmatically.

from athina_client.prompt import Prompt

Prompt.get_default(slug="test-staging") # returns a Prompt Template


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.