Setting up the Validate SDK
Last updated
Was this helpful?
Last updated
Was this helpful?
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
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.
After you set up your deployment, copy your API key and API endpoint to the following environment variables:
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
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
In your Python script or Jupyter notebook, set your Anthropic API key as the value of ANTHROPIC_API_KEY
:
To get an Open AI API key, go to .
For information on how to set up a deployment, go to this .
When you , you must provide the deployment name.
To get a Gemini API key, go to the .
To get a Anthropic API key, go to the .