Azure OpenAI Integration
Azure OpenAI Setup
Azure OpenAI Service provides REST API access to OpenAI's powerful language models including GPT-4, GPT-3.5-Turbo, and Embeddings model series. To use Azure OpenAI, follow these steps:
-
Access Azure OpenAI Studio
- Go to Azure OpenAI Studio
- Sign in with your Azure account
- You'll see the "Azure OpenAI resources" page
- Click the Create new Azure OpenAI resource link in the left part of the header
-
Create Your Resource
- Follow our detailed guide on Creating a New Azure OpenAI Resource
- This will walk you through setting up your subscription, resource group, and network settings
-
Access Your Resource
- Once created, your resource will appear in the resources list
- You'll see details including:
- Resource name
- Subscription
- Region
- Pricing tier
- Endpoint
- Key
- Click the resource name to start working with your Azure OpenAI deployment
-
Get Integration Details
- In Azure AI Studio, click the resource selector in the top-right corner
- A sidebar will appear with your resource details
- You'll need:
- Azure OpenAI Resource Name: Found under "Azure OpenAI or AI services Resource"
- API Key: Found under "Key" (click the eye icon to reveal)
- These values are required for setting up the BotDojo integration
Creating a New Azure OpenAI Resource
When creating a new Azure OpenAI resource, you'll need to complete a multi-step form. Here's how to fill out each section:
Basics Tab
- Project Details
- Subscription: Select your Azure subscription from the dropdown
- Resource group: Either select an existing group or click "Create new"
- If creating new, we recommend naming it clearly (e.g., "openai-resources")
- We recommend creating the resource group in
East US
orEast US 2
for best model availability
- Name: Choose a unique name for your resource (this will be part of your API endpoint)
- Region: Select
East US
orEast US 2
for best model availability - Pricing tier: Standard S0 (default)
Network Tab
- Network Access
- We recommend selecting one of these options:
- All networks (Simplest): Allows access from any internet connection
- Selected networks (More secure): Limits access to specific networks
- Note: This option requires additional network configuration
- Contact us to schedule a 1-on-1 meeting for setup assistance
- We don't recommend "Disabled" for initial setup
- We recommend selecting one of these options:
Tags Tab
- Tags help you organize and track Azure resources
- Common tags to consider:
Environment
: (e.g., "production", "development", "staging")Project
: Your project nameDepartment
: Your team or departmentOwner
: Your team's contactCostCenter
: For billing purposes
- While optional, adding tags now makes resource management easier later
Review + submit
- Carefully review all settings:
- Verify your subscription and resource group
- Confirm the resource name is correct (can't be changed later)
- Double-check the region selection
- Verify network access settings
- Review any tags you've added
- Validation
- Azure will automatically validate your configuration
- Address any validation errors if they appear
- Click "Create"
- The deployment process will begin
- Wait for deployment to complete (usually takes 3-5 minutes)
- After Deployment
- You'll receive a notification when deployment is complete
- Click "Go to resource" to access your new Azure OpenAI resource
- You can now proceed with model deployments
Deploy Models in Azure OpenAI
Before using models, you need to deploy them in your Azure OpenAI resource. You can do this through the Azure OpenAI Studio:
-
Access Azure OpenAI Studio
- Go to Azure OpenAI Studio
- Sign in with your Azure account
- Select your Azure OpenAI resource from the dropdown in the top navigation
-
Deploy a Model
- In the left sidebar, click Deployments
- Click + Create new deployment
- Select a model from the dropdown
- IMPORTANT: The deployment name MUST EXACTLY match BotDojo's expected model names:
gpt-4o
for GPT-4 Omnigpt-4o-mini
for GPT-4 Omni Minigpt-4
for GPT-4gpt-35-turbo
for GPT-3.5 Turbotext-embedding-3-large
for embeddings (large)text-embedding-3-small
for embeddings (small)
- Any deviation from these exact names will cause the integration to fail
- Click Create
-
Verify Deployment
- After creation, check that the deployment name exactly matches the expected name
- The model will be available for use once the deployment status shows as "Succeeded"
⚠️ Critical Note: Model deployment names are case-sensitive and must exactly match the names listed above. Using different names (even slightly different) will prevent BotDojo from finding and using the models.
Model Deployment Best Practices
-
Capacity Planning
- Start with lower TPM (tokens per minute) limits
- Monitor usage and adjust as needed
- Consider deploying multiple models for different use cases
-
Region Selection
- Check model availability in your region
-
Security Considerations
- Store API keys securely
- Use Azure Key Vault for production deployments
- Implement proper access controls
- Monitor usage for unusual patterns
Usage Quotas and Limits
- Each deployment has TPM (tokens per minute) limits
- Quotas can be increased through Azure support requests
- Monitor usage through Azure metrics
- Set up alerts for quota approaching limits
Cost Management
- Costs are based on token usage
- Different models have different pricing tiers
- Monitor costs through Azure Cost Management
- Set up budgets and alerts to prevent overruns
Troubleshooting
Common issues and solutions:
- Rate Limiting: Implement exponential backoff
- Token Limits: Check model context windows
- API Errors: Verify credentials and endpoints
- Deployment Issues: Ensure model is properly deployed
For more detailed information, refer to the Azure OpenAI documentation.