To install tonic_validate
, you use pip:
To log metrics using tonic_validate
, you need to set the API key by passing it into ValidateApi
Validate uses LLM-assisted evaluation. You must provide an API key for the LLM evaluator model that you want to use.
Validate currently supports the following models:
To use the OpenAI models, you must:
Have an OpenAI API key
Set the API key as the value of the environment variable OPENAI_API_KEY
To get an Open AI API key, go to the OpenAI API key page.
In your Python script or Jupyter notebook, set your Open AI API key as the value of OPENAI_API_KEY
:
Validate also supports Azure's OpenAI API service.
To use Azure, you must set up an Azure OpenAI deployment.
For information on how to set up a deployment, go to this Azure OpenAI service quickstart.
After you set up your deployment, copy your API key and API endpoint to the following environment variables:
When you start a Validate run, you must provide the deployment name.
To use Gemini models, you must:
Have a Gemini API key
Set the API key as the value of the environment variable GEMINI_API_KEY
To get a Gemini API key, go to the Gemini home page.
In your Python script or Jupyter notebook, set your Gemini API key as the value of GEMINI_API_KEY
:
To use Anthropic models, you must:
Have a Anthropic API key
Set the API key as the value of the environment variable ANTHROPIC_API_KEY
To get a Anthropic API key, go to the Anthropic API page.
In your Python script or Jupyter notebook, set your Anthropic API key as the value of ANTHROPIC_API_KEY
: