Athina’s prompt management system allows you to run prompts on the platform.

Run a Prompt on Athina Playground

To run a prompt:

  1. Open https://app.athina.ai.ai/prompt and select the prompt you want to run.
  2. Enter the input variables in the editor.
  3. Select the model you want to run the prompt on, and configure any parameters.
  4. Click Run to generate the output.

Run a Prompt Programmatically

You can run a prompt via the API by calling the Run Prompt endpoint with the prompt_slug and input variables.

import os
from athina_client.prompt import Prompt, Slug
from athina_client.keys import AthinaApiKey

AthinaApiKey.set_key(os.getenv('ATHINA_API_KEY'))

Prompt.run_prompt(
    slug='test-staging',
    # the following fields are optional
    version=2,
    model="gpt-4o",
    variables={
        "company": "nvidia"
    },
    parameters={
        "temperature": 1,
        "max_tokens": 1000
    },
)
  • variables: Input variables for the prompt.
  • version (optional): The version of the prompt to run. If not specified, the default version will be used.
  • model (optional): The model to run the prompt on. If not specified, we will use the model provided in your commit.
  • parameters (optional): Additional parameters for the model like temperature, max_tokens, etc. If not specified, the default parameters will be used.