PHPackages                             hch/chatgpt-integration-bundle - 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. hch/chatgpt-integration-bundle

ActiveSymfony-bundle[API Development](/categories/api)

hch/chatgpt-integration-bundle
==============================

A Symfony bundle to integrate ChatGPT API.

v1.0.0(1y ago)2211MITPHPPHP &gt;=7.4

Since Oct 25Pushed 1y ago1 watchersCompare

[ Source](https://github.com/lechaabani/ChatGPTIntegrationBundle)[ Packagist](https://packagist.org/packages/hch/chatgpt-integration-bundle)[ RSS](/packages/hch-chatgpt-integration-bundle/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (3)Versions (2)Used By (0)

ChatGPTIntegrationBundle
========================

[](#chatgptintegrationbundle)

This bundle provides a simple way to integrate ChatGPT API with Symfony applications.

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

[](#installation)

```
composer require HCH/chatgpt-integration-bundle
```

Configuration
-------------

[](#configuration)

In your Symfony config, add your OpenAI API key, API URL, and model:

```
# config/packages/chatgpt_integration.yaml
chatgpt_integration:
    api_key: '%env(CHATGPT_API_KEY)%'
    api_url: 'https://api.openai.com/v1/chat/completions'
    model: 'gpt-3.5-turbo'
```

Usage
-----

[](#usage)

Inject the `ChatGPTClient` service wherever needed:

```
use HCH\ChatGPTIntegrationBundle\Service\ChatGPTClient;

class SomeService
{
    private $chatGPTClient;

    public function __construct(ChatGPTClient $chatGPTClient)
    {
        $this->chatGPTClient = $chatGPTClient;
    }

    public function getResponseFromChatGPT(string $message): string
    {
        return $this->chatGPTClient->ask($message);
    }
}
```

Testing
-------

[](#testing)

Run tests with PHPUnit:

```
php bin/phpunit
```

License
-------

[](#license)

This bundle is released under the MIT License.

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance38

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

 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

Unknown

Total

1

Last Release

560d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7e8d866baf77d018f6f41d6dfe3fd8104dfe49a30b5c717bad62cefd1d8a3d43?d=identicon)[Hamadi](/maintainers/Hamadi)

---

Top Contributors

[![lechaabani](https://avatars.githubusercontent.com/u/3493399?v=4)](https://github.com/lechaabani "lechaabani (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/hch-chatgpt-integration-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/hch-chatgpt-integration-bundle/health.svg)](https://phpackages.com/packages/hch-chatgpt-integration-bundle)
```

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M646](/packages/sylius-sylius)

PHPackages © 2026

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