Azure OpenAI Provider

Use Azure OpenAI Service with PraisonAI TypeScript

Diagram

Input

Agent

Output

Azure OpenAI Provider

Use Azure-hosted OpenAI models with enterprise features.

Environment Variables

bash
export AZURE_API_KEY=...
export AZURE_RESOURCE_NAME=your-resource
export AZURE_DEPLOYMENT_NAME=your-deployment

Supported Modalities

ModalitySupported
Text/Chat✅
Embeddings✅
Image✅
Tools✅

Quick Start

  1. Simple Usage
    typescript
    import { Agent } from 'praisonai';
    
    const agent = new Agent({
      name: 'AzureAgent',
      instructions: 'You are a helpful assistant.',
      llm: 'azure/gpt-4o',
      llmConfig: {
        resourceName: process.env.AZURE_RESOURCE_NAME,
        deploymentName: process.env.AZURE_DEPLOYMENT_NAME,
      }
    });
    
    const response = await agent.chat('Hello!');
  2. With Configuration

    Adjust provider credentials and model settings for production — see the sections above.

Related