PHPackages                             masterskill/chat-gpt - 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. masterskill/chat-gpt

ActiveLibrary[API Development](/categories/api)

masterskill/chat-gpt
====================

This is an extension of beautifull package that is 'orhanerday/open-ai'

010PHP

Since Jul 12Pushed 2y ago1 watchersCompare

[ Source](https://github.com/masterSkill77/chat-gpt)[ Packagist](https://packagist.org/packages/masterskill/chat-gpt)[ RSS](/packages/masterskill-chat-gpt/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (3)Used By (0)

Installation
============

[](#installation)

`composer require masterskill/chat-gpt`

Documentation
=============

[](#documentation)

How to initialize the package
-----------------------------

[](#how-to-initialize-the-package)

You need to instaciate the OpenAi class

`require "vendor/autoload.php";`

Use the namespace

`use Masterskill\Chatgpt\OpenAi;`

Instanctiate class

`$openAi = new OpenAi("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx");`

Ex : get all available models `$response = $openAi->models()`

How to use it
-------------

[](#how-to-use-it)

#### Models

[](#models)

- Retrieve all models `$openAi->models()`
- Retrieve one model `$openAi->getModel($modelName)`

#### Chat

[](#chat)

- Chat with GPT : `$openAi->chat($modelName, $data)`

\-- $modelName : should be one available on the models listed. -- $data : should be on form of : - array of \["role" =&gt; $role, "content" =&gt; $content\] And then, you can implemente it like you want, but just follow what said from the doc

###  Health Score

15

—

LowBetter than 3% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity25

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/2b884b2d979f6811b9e24aece509a3b1a18ac07f4779a495f5d42779b8f82a71?d=identicon)[masterSkill77](/maintainers/masterSkill77)

---

Top Contributors

[![masterSkill77](https://avatars.githubusercontent.com/u/76204885?v=4)](https://github.com/masterSkill77 "masterSkill77 (22 commits)")

### Embed Badge

![Health badge](/badges/masterskill-chat-gpt/health.svg)

```
[![Health](https://phpackages.com/badges/masterskill-chat-gpt/health.svg)](https://phpackages.com/packages/masterskill-chat-gpt)
```

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[facebook/php-business-sdk

PHP SDK for Facebook Business

90821.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

74513.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

265103.1M454](/packages/google-gax)[google/common-protos

Google API Common Protos for PHP

173103.7M50](/packages/google-common-protos)

PHPackages © 2026

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