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(9mo ago)02MITPHP

Since Sep 8Pushed 9mo agoCompare

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

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

26

—

LowBetter than 41% of packages

Maintenance55

Moderate activity, may be stable

Popularity2

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity36

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

297d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/44164396?v=4)[yvesnda](/maintainers/yvesnda)[@yvesnda](https://github.com/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)
```

PHPackages © 2026

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