Azure OpenAI¶
Configure HolmesGPT to use Azure OpenAI Service.
Setup¶
Create an Azure OpenAI resource.
Configuration¶
Required Environment Variables¶
export AZURE_API_VERSION="2024-02-15-preview"
export AZURE_API_BASE="https://my-org.openai.azure.com/"
export AZURE_API_KEY="your-azure-api-key" # Optional, can use --api-key instead
Usage¶
Replace <DEPLOYMENT_NAME>
with your actual Azure OpenAI deployment name.
Environment Variables¶
- AZURE_API_VERSION - API version (e.g.,
2024-02-15-preview
) - AZURE_API_BASE - Your Azure endpoint URL (e.g.,
https://my-org.openai.azure.com/
) - AZURE_API_KEY - Your Azure API key (optional if passed via
--api-key
)
Available Models¶
Azure OpenAI uses deployment names instead of model names:
# Using gpt-4 deployment
holmes ask "analyze cluster issues" --model=azure/gpt-4-deployment
# Using gpt-35-turbo deployment
holmes ask "quick cluster check" --model=azure/gpt-35-turbo-deployment
Note
Model availability varies by region. Check your Azure portal for available models.
Troubleshooting¶
Authentication Errors
- Verify environment variables are set correctly - Check that your Azure OpenAI resource is deployed - Ensure your API key has the correct permissionsDeployment Not Found
- Verify your deployment name is correct - Check that the deployment is in the same region as your API base - Ensure the deployment is fully deployed and runningRegional Issues
- Some models are only available in specific regions - Consider deploying in a different region