PHPackages                             edgaras/azurellm - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. edgaras/azurellm

AbandonedArchivedLibrary[API Development](/categories/api)

edgaras/azurellm
================

PHP package for integrating and interacting with deployed Azure LLM models

v1.4.1(1y ago)052MITPHPPHP &gt;=8.1.0

Since Feb 5Pushed 1y ago1 watchersCompare

[ Source](https://github.com/Edgaras0x4E/AzureLLM)[ Packagist](https://packagist.org/packages/edgaras/azurellm)[ Docs](https://github.com/Edgaras0x4E/AzureLLM)[ RSS](/packages/edgaras-azurellm/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (8)Dependencies (2)Versions (12)Used By (0)

AzureLLM
========

[](#azurellm)

PHP package for integrating and interacting with deployed Azure LLM models.

🚀 Changelog (v1.4.1)
--------------------

[](#-changelog-v141)

### **New Features**

[](#new-features)

- **Added `DeepSeek`** model support.

---

📌 Documentation
---------------

[](#-documentation)

- 📖 **[AI Agents](docs/agents.md)**
- 🔍 **[AI Search](docs/aisearch.md)**

---

Features
--------

[](#features)

- Simplifies managing **Azure OpenAI API** settings such as API keys, endpoints, deployments, and API versions.
- Full support for **Agents, Threads, and Vector Stores**.
- Integrated **Azure AI Search** functionalities.

Requirements
------------

[](#requirements)

- PHP 8.1+
- Composer

Installation
------------

[](#installation)

1. Use the library via Composer:

```
composer require edgaras/azurellm

```

2. Include the Composer autoloader:

```
require __DIR__ . '/vendor/autoload.php';
```

Usage
-----

[](#usage)

### 1. Initialization

[](#1-initialization)

Set up your Azure OpenAI configuration:

```
use Edgaras\AzureLLM\LLM;

$config = new LLM([
    'apiKey' => '',
    'endpoint' => 'https://.openai.azure.com',
    'deployment' => '',
    'apiVersion' => ''
]);

```

### 2. Basic usage

[](#2-basic-usage)

Send requests to your Azure OpenAI deployment:

```
use Edgaras\AzureLLM\LLM;
use Edgaras\AzureLLM\AzureOpenAI;

$config = new LLM([
    'apiKey' => '',
    'endpoint' => 'https://.openai.azure.com',
    'deployment' => '',
    'apiVersion' => ''
]);

$azureLLM = new AzureOpenAI($config);

$inputMessages = [
    ['role' => 'system', 'content' => 'You are a helpful assistant.'],
    ['role' => 'user', 'content' => 'What is the capital of Lithuania?']
];

$options = [
    "temperature" => 0.7,
    "top_p" => 0.95,
    "max_tokens" => 150
];

$response = $azureLLM->chatCompletions($inputMessages, $options);
```

### 3. Use with Azure AI Search

[](#3-use-with-azure-ai-search)

Combine the Azure OpenAI service with Azure Search for contextual completions:

```
use Edgaras\AzureLLM\LLM;
use Edgaras\AzureLLM\AzureOpenAI;

$config = new LLM([
    'apiKey' => '',
    'endpoint' => 'https://.openai.azure.com',
    'deployment' => '',
    'apiVersion' => ''
]);

$azureLLM = new AzureOpenAI($config);

$inputMessages = [
    ['role' => 'system', 'content' => 'You are a helpful assistant.'],
    ['role' => 'user', 'content' => 'Summarize your knowledgebase']
];

$options = [
    "temperature" => 0.7,
    "top_p" => 0.95,
    "max_tokens" => 150
];

$data_sources = [[
    "type" => "azure_search",
    "parameters" => [
        "filter" => null,
        "endpoint" => 'https://.search.windows.net',
        "index_name" => '',
        "authentication" => [
            "type" => "api_key",
            "key" => ''
        ],
    ],
]];

$response = $azureLLM->chatCompletions($inputMessages, $options, $data_sources);
```

### 4. Initialize AI Search Configuration

[](#4-initialize-ai-search-configuration)

```
use Edgaras\AzureLLM\AISearch\Auth;

$config = new Auth([
    'apiKey' => '',
    'endpoint' => 'https://.search.windows.net',
    'apiVersion' => '2023-07-01-Preview'
]);
```

### 5. Manage AI Search Indexes

[](#5-manage-ai-search-indexes)

```
use Edgaras\AzureLLM\AISearch\Index;

$indexService = new Index($config);

// Define Index Fields
$fields = [
    ['name' => 'id', 'type' => 'Edm.String', 'key' => true],
    ['name' => 'content', 'type' => 'Edm.String', 'searchable' => true, 'retrievable' => true]
];

// Create Index
$indexService->createIndex('test-index', $fields);

// List all indexes
$indexes = $indexService->listIndexes();
print_r($indexes);
```

### 6. Manage AI Search Indexers

[](#6-manage-ai-search-indexers)

```
use Edgaras\AzureLLM\AISearch\Indexer;

$indexerService = new Indexer($config);

// Define Indexer
$indexerConfig = [
    'dataSourceName' => 'test-data-source',
    'targetIndexName' => 'test-index',
    'schedule' => ['interval' => 'P1D']
];

// Create Indexer
$indexerService->createIndexer('test-indexer', $indexerConfig);

// Run Indexer Manually
$indexerService->runIndexer('test-indexer');
```

### 7. Manage AI Search Data Sources

[](#7-manage-ai-search-data-sources)

```
use Edgaras\AzureLLM\AISearch\DataSource;

$dataSourceService = new DataSource($config);

// Define Data Source Configuration
$dataSourceConfig = [
    'type' => 'azureblob',
    'credentials' => ['connectionString' => ''],
    'container' => ['name' => 'your-container']
];

// Create Data Source
$dataSourceService->createDataSource('test-data-source', $dataSourceConfig);
```

[Full AI Search Docs](docs/aisearch.md)

### 8. Agents &amp; Threads

[](#8-agents--threads)

```
use Edgaras\AzureLLM\LLM;
use Edgaras\AzureLLM\Agents\Agent;
use Edgaras\AzureLLM\Agents\Thread;

// Initialize
$config = new LLM([
    'apiKey' => '',
    'endpoint' => 'https://.openai.azure.com',
    'deployment' => '',
    'apiVersion' => '2024-05-01-preview'
]);

$agent = new Agent($config);
$thread = new Thread($config);

// Create an Agent
$agentResponse = $agent->createAgent("SupportBot", "Assist users with support queries.");
$agentId = $agentResponse['id'];

// Start a conversation thread
$threadResponse = $thread->createThread();
$threadId = $threadResponse['id'];

// Send a message
$thread->addMessageToThread($threadId, "user", "How do I reset my password?");

// Run the AI Assistant on the thread
$thread->runThread($threadId, $agentId);
```

[Full AI Agents Docs](docs/agents.md)

### 9. Basic usage (DeepSeek)

[](#9-basic-usage-deepseek)

Send requests to your DeepSeek deployment:

```
use Edgaras\AzureLLM\LLM;
use Edgaras\AzureLLM\DeepSeek;

$config = new LLM([
    'apiKey' => '',
    'endpoint' => 'https://.services.ai.azure.com',
    'deployment' => '',
    'apiVersion' => ''
]);

$deepSeek = new DeepSeek($config);

$inputMessages = [
    ['role' => 'system', 'content' => 'You are a helpful assistant.'],
    ['role' => 'user', 'content' => 'What is the capital of Lithuania?']
];

$options = [
    "temperature" => 0.7,
    "top_p" => 0.95,
    "max_tokens" => 150
];

$response = $deepSeek->chatCompletions($inputMessages, $options);
```

Useful links
------------

[](#useful-links)

- [Azure OpenAI Service REST API reference](https://learn.microsoft.com/en-us/azure/ai-services/openai/reference).
- [Azure AI Search documentation](https://learn.microsoft.com/en-us/azure/search/).
- [Tutorial: Get started with DeepSeek-R1 reasoning model in Azure AI model inference](https://learn.microsoft.com/en-us/azure/ai-foundry/model-inference/tutorials/get-started-deepseek-r1?tabs=rest).
- [What is Azure AI Agent Service?](https://learn.microsoft.com/en-us/azure/ai-services/agents/overview).

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance46

Moderate activity, may be stable

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~5 days

Total

11

Last Release

418d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/eb360d69caebafdf5339cd93817328b6fa1784f023009a6c27d84151bf212b01?d=identicon)[Edgaras](/maintainers/Edgaras)

---

Top Contributors

[![Edgaras0x4E](https://avatars.githubusercontent.com/u/42358442?v=4)](https://github.com/Edgaras0x4E "Edgaras0x4E (11 commits)")

---

Tags

aiopenaiazurellmgptdeepseek

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/edgaras-azurellm/health.svg)

```
[![Health](https://phpackages.com/badges/edgaras-azurellm/health.svg)](https://phpackages.com/packages/edgaras-azurellm)
```

###  Alternatives

[deepseek-php/deepseek-php-client

deepseek PHP client is a robust and community-driven PHP client library for seamless integration with the Deepseek API, offering efficient access to advanced AI and data processing capabilities.

47073.9k5](/packages/deepseek-php-deepseek-php-client)[theodo-group/llphant

LLPhant is a library to help you build Generative AI applications.

1.5k311.5k5](/packages/theodo-group-llphant)[claude-php/claude-php-sdk-laravel

Laravel integration for the Claude PHP SDK - Anthropic Claude API

5010.8k](/packages/claude-php-claude-php-sdk-laravel)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
