PHPackages                             labsllm/llm-wrapper - 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. labsllm/llm-wrapper

ActiveLibrary[API Development](/categories/api)

labsllm/llm-wrapper
===================

PHP library that integrates different LLM services (ChatGPT, Claude, Gemini) into a single wrapper

v2.2.1(1y ago)11.2k[1 PRs](https://github.com/HimAndRobot/labsllm/pulls)MITPHPPHP &gt;=8.1

Since May 4Pushed 7mo ago1 watchersCompare

[ Source](https://github.com/HimAndRobot/labsllm)[ Packagist](https://packagist.org/packages/labsllm/llm-wrapper)[ RSS](/packages/labsllm-llm-wrapper/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (1)Dependencies (3)Versions (23)Used By (0)

LLM Wrapper
===========

[](#llm-wrapper)

A simple PHP library that provides a unified interface for interacting with various Large Language Models like OpenAI, Anthropic, and Google.

For complete documentation, visit [labsllm.geanpedro.com.br](https://labsllm.geanpedro.com.br/)

Install
-------

[](#install)

```
composer require labsllm/llm-wrapper
```

Basic Usage
-----------

[](#basic-usage)

```
$execute = LabsLLM::text()
    ->using(new OpenAI('SK-***', 'gpt-4o-mini'))
    ->executePrompt('Your question here');

$response = $execute->getResponseData();

echo $response->response;
```

Switching Providers
-------------------

[](#switching-providers)

Just change the provider in the `using()` method:

```
// Using Google
$execute = LabsLLM::text()
    ->using(new Google('API-KEY', 'gemini-pro'))
    ->executePrompt('Your question here');

// Using Anthropic
$execute = LabsLLM::text()
    ->using(new Anthropic('API-KEY', 'claude-3-opus'))
    ->executePrompt('Your question here');
```

Provider Support Status
-----------------------

[](#provider-support-status)

Legend:

- ✅ Supported
- 🚧 In Development
- 📅 Planned
- ❌ Not Supported

FeatureOpenAIGoogleAnthropicText Prompts✅✅📅System Instructions✅✅📅Chat✅✅📅Tools/Functions✅✅❌Structure Output✅✅❌Streaming✅✅❌Embeddings📅❌❌Voice📅❌❌Image Generation📅❌📅

###  Health Score

38

—

LowBetter than 83% of packages

Maintenance55

Moderate activity, may be stable

Popularity22

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity56

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 ~12 days

Recently: every ~53 days

Total

19

Last Release

247d ago

Major Versions

1.1.2 → v2.0.02025-05-10

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/36330402?v=4)[Gean Pedro da Silva](/maintainers/HimAndRobot)[@HimAndRobot](https://github.com/HimAndRobot)

---

Top Contributors

[![HimAndRobot](https://avatars.githubusercontent.com/u/36330402?v=4)](https://github.com/HimAndRobot "HimAndRobot (69 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/labsllm-llm-wrapper/health.svg)

```
[![Health](https://phpackages.com/badges/labsllm-llm-wrapper/health.svg)](https://phpackages.com/packages/labsllm-llm-wrapper)
```

###  Alternatives

[theodo-group/llphant

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

1.7k441.1k8](/packages/theodo-group-llphant)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3661.3M49](/packages/tencentcloud-tencentcloud-sdk-php)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

353.6k](/packages/eslazarev-wildberries-sdk)[files.com/files-php-sdk

Files.com PHP SDK

2482.9k](/packages/filescom-files-php-sdk)[sproutcms/cms

Enterprise content management and framework

243.0k4](/packages/sproutcms-cms)[mage-os/module-automatic-translation

Automatic AI content translation for Mage-OS.

3223.7k](/packages/mage-os-module-automatic-translation)

PHPackages © 2026

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