PHPackages                             yvesnda/chatgpt - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. yvesnda/chatgpt

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

yvesnda/chatgpt
===============

1.0.0(8mo ago)02MITPHP

Since Sep 8Pushed 8mo agoCompare

[ Source](https://github.com/yvesnda/chatgpt-php)[ Packagist](https://packagist.org/packages/yvesnda/chatgpt)[ RSS](/packages/yvesnda-chatgpt/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

ChatGPT PHP Library
===================

[](#chatgpt-php-library)

A lightweight PHP library to interact with the OpenAI ChatGPT API.

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

[](#installation)

Install via Composer:

```
composer require yvesnda/chatgpt
```

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

[](#requirements)

- PHP 5.3 or higher
- PHP extensions: `curl`, `json`

Usage
-----

[](#usage)

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

use ChatGPT\ChatGPT;

$chat = new ChatGPT('YOUR_OPENAI_API_KEY');

// Optionally add a system message
$chat->addSystemMessage('You are a helpful assistant.');

// Add a user message and get a response
$response = $chat->ask('Hello, who won the world cup in 2018?');

echo $response;

// You can also add messages manually and call ask() without arguments
$chat->addUserMessage('Tell me a joke.');
echo $chat->ask();
```

Features
--------

[](#features)

- Add user, system, and assistant messages
- Maintains conversation context
- Simple API for sending prompts and receiving responses

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance60

Regular maintenance activity

Popularity3

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity35

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

252d ago

### Community

Maintainers

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

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/yvesnda-chatgpt/health.svg)

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

###  Alternatives

[mistic100/randomcolor

Generate attractive random colors

2431.4M6](/packages/mistic100-randomcolor)[khill/php-duration

Converts between colon formatted time, human-readable time and seconds

1611.7M20](/packages/khill-php-duration)[staudenmeir/dusk-updater

Updater for Laravel Dusk ChromeDriver binaries

1242.3M1](/packages/staudenmeir-dusk-updater)[ans-group/laravel-health-check

A package for checking the health of your Laravel/Lumen applications.

167930.0k2](/packages/ans-group-laravel-health-check)[mantas-done/subtitles

Subtitle converter and generator for PHP

163837.8k2](/packages/mantas-done-subtitles)[prooph/common

Common classes used across prooph packages

852.2M27](/packages/prooph-common)

PHPackages © 2026

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