Skip to main content

Using OpenAI with Phoenix Evals

Requires openai>=1.0.0
Create an LLM instance with the OpenAI provider:
The LLM wrapper reads your API key from the OPENAI_API_KEY environment variable, or you can pass it directly:

Using with evaluators

Custom parameters

Pass additional parameters to the OpenAI client:

Azure OpenAI

Use the "azure" provider for Azure OpenAI deployments:
The model parameter is the deployment name in Azure. You can find it in the Azure OpenAI playground.
Azure OpenAI deployment endpoint and API key configuration

How to find the model param in Azure

For full details on Azure OpenAI, check out the OpenAI Documentation.