Azure OpenAI

Configure and use Azure OpenAI Service through InferXgate.

InferXgate supports Azure OpenAI Service for enterprise deployments.

Configuration

AZURE_OPENAI_API_KEY=your-azure-key
AZURE_OPENAI_ENDPOINT=https://your-resource.openai.azure.com
AZURE_OPENAI_API_VERSION=2024-02-01

# Map models to deployments
AZURE_OPENAI_DEPLOYMENTS=gpt-4:my-gpt4,gpt-35-turbo:my-gpt35

Usage

Use the azure- prefix for Azure models:

from openai import OpenAI

client = OpenAI(
    base_url="http://localhost:3000/v1",
    api_key="your-api-key"
)

response = client.chat.completions.create(
    model="azure-gpt-4",  # Maps to your deployment
    messages=[
        {"role": "user", "content": "Hello!"}
    ]
)

Deployment Mapping

Configure model-to-deployment mappings:

# Format: model:deployment,model:deployment
AZURE_OPENAI_DEPLOYMENTS=gpt-4:production-gpt4,gpt-35-turbo:fast-gpt35

Then use:

  • azure-gpt-4 → routes to production-gpt4 deployment
  • azure-gpt-35-turbo → routes to fast-gpt35 deployment

Features

  • All OpenAI features
  • Enterprise compliance
  • Regional deployments
  • Private networking support

Benefits

  1. Data residency - Keep data in specific regions
  2. Enterprise SLA - 99.9% uptime guarantee
  3. Private endpoints - VNet integration
  4. Compliance - SOC 2, HIPAA, etc.