To use Azure OpenAI with `llm_classify`, you should use the `OpenAIModel` class from Phoenix, passing Azure-specific parameters (`model`, `azure_endpoint`, and `api_version`). There is no separate `AzureOpenAI` class in Phoenix; Azure support is handled via `OpenAIModel` with the correct arguments. Example:
```
from phoenix.evals import OpenAIModel, llm_classify
azure_model = OpenAIModel(
model="gpt-35-turbo-16k", # your Azure deployment name
azure_endpoint="https://<your-resource-name> .openai.azure.com/",
api_version="2023-09-15-preview",
api_key="<your-azure-openai-api-key> "
)
clarity_eval = llm_classify(
dataframe=clarity_df,
template=CLARITY_LLM_JUDGE_PROMPT,
rails=['clear', 'unclear'],
model=azure_model,
provide_explanation=True
)
```
Do not use a class named `AzureOpenAI`; use `OpenAIModel` with Azure parameters as shown above. For more, see the <https://arize.com/docs/phoenix/integrations/llm-providers/openai/openai-evals#azure-openai|Phoenix Azure OpenAI integration docs> and <https://arize.com/docs/phoenix/evaluation/how-to-evals/evaluation-models#%3AS1%3A|API reference>.
Would you like more detail on configuring authentication or troubleshooting common Azure errors?
Sources:
- <https://arize.com/docs/phoenix/integrations/llm-providers/openai/openai-evals#azure-openai|Phoenix Azure OpenAI integration docs>
- <https://arize.com/docs/phoenix/evaluation/how-to-evals/evaluation-models#%3AS1%3A|Phoenix API reference: evaluation models>
- <https://github.com/Arize-ai/phoenix/blob/main/docs/section-integrations/llm-providers/openai/openai-evals.md|Phoenix evaluation models GitHub>