papi-ai/azure-openai

Azure OpenAI provider for PapiAI

Maintainers

Package info

github.com/papi-ai/azure-openai

pkg:composer/papi-ai/azure-openai

Statistics

Installs: 0

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v0.9.1 2026-03-10 18:13 UTC

This package is not auto-updated.

Last update: 2026-03-11 16:52:36 UTC


README

Azure OpenAI provider with AAD auth support for the PapiAI agent library.

Installation

composer require papi-ai/azure-openai

Usage

use PapiAI\AzureOpenAI\AzureOpenAIProvider;
use PapiAI\Core\Message;

$provider = new AzureOpenAIProvider(
    apiKey: 'your-azure-api-key-or-aad-token',
    endpoint: 'https://myresource.openai.azure.com',
    deployment: 'gpt-4o',
);

$response = $provider->chat([
    Message::system('You are a helpful assistant.'),
    Message::user('Hello!'),
]);

echo $response->text;

Embeddings

$response = $provider->embed('Hello world', [
    'model' => 'text-embedding-ada-002',
]);

$vector = $response->first();

License

MIT