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 toproduction-gpt4deploymentazure-gpt-35-turbo→ routes tofast-gpt35deployment
Features
- All OpenAI features
- Enterprise compliance
- Regional deployments
- Private networking support
Benefits
- Data residency - Keep data in specific regions
- Enterprise SLA - 99.9% uptime guarantee
- Private endpoints - VNet integration
- Compliance - SOC 2, HIPAA, etc.