Skip to main content

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:

  1. 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
  2. Create Your Resource

  3. 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
  4. 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

  1. 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 or East 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 or East US 2 for best model availability
    • Pricing tier: Standard S0 (default)

Network Tab

  1. 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

Tags Tab

  • Tags help you organize and track Azure resources
  • Common tags to consider:
    • Environment: (e.g., "production", "development", "staging")
    • Project: Your project name
    • Department: Your team or department
    • Owner: Your team's contact
    • CostCenter: For billing purposes
  • While optional, adding tags now makes resource management easier later

Review + submit

  1. 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
  2. Validation
    • Azure will automatically validate your configuration
    • Address any validation errors if they appear
  3. Click "Create"
    • The deployment process will begin
    • Wait for deployment to complete (usually takes 3-5 minutes)
  4. 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:

  1. 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
  2. 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 Omni
      • gpt-4o-mini for GPT-4 Omni Mini
      • gpt-4 for GPT-4
      • gpt-35-turbo for GPT-3.5 Turbo
      • text-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
  3. 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

  1. Capacity Planning

    • Start with lower TPM (tokens per minute) limits
    • Monitor usage and adjust as needed
    • Consider deploying multiple models for different use cases
  2. Region Selection

    • Check model availability in your region
  3. 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.