PHPackages                             sabir/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. [API Development](/categories/api)
4. /
5. sabir/chatgpt

ActiveLibrary[API Development](/categories/api)

sabir/chatgpt
=============

A Laravel package for interacting with ChatGPT APIs.

1.0.0(2y ago)163MITPHPPHP &gt;=7.0.0

Since Jun 15Pushed 2y ago1 watchersCompare

[ Source](https://github.com/sabir-shah123/GPT-Package-Developement)[ Packagist](https://packagist.org/packages/sabir/chatgpt)[ RSS](/packages/sabir-chatgpt/feed)WikiDiscussions master Synced 1mo ago

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

To integrate the ChatGPT package with PHP and Laravel, please follow these steps:

Install the package: Install the package via Composer by running the following command in your project directory:

composer require sabir/chatgpt:dev-master Publish configuration file: Run the following command to publish the package's configuration file:

php artisan vendor:publish --tag=chatgpt-config --ansi --force This command will create a configuration file named chatgpt.php in your Laravel project's config directory.

Set API key and model: Open the .env file in your project's root folder and set the values for the following environment variables:

CHAT\_API=YOUR\_CHAT\_API\_KEY CHAT\_MODEL=YOUR\_CHAT\_MODEL\_ID Replace YOUR\_CHAT\_API\_KEY with your OpenAI Chat API key and YOUR\_CHAT\_MODEL\_ID with the model ID you want to use (e.g., "davinci", "curie", "babbage", or "ada").

Create an instance and call the chat method: In your Laravel code, you can now create an instance of the ChatGPT class and call the chat method to interact with the ChatGPT model. Here's an example:

use Sabir\\ChatGPT\\Facades\\ChatGPT;

// ...

$s = new ChatGPT(); $response = $s-&gt;chat('hi, how are you?'); dd($response);

The chat method accepts three parameters:

message (required): The message or prompt to send to the ChatGPT model. type (optional): The API type to use for the chat. If left blank or set to "devinci", "curie", "babbage", or "ada", it will use the OpenAI models. You can extend this functionality to include other types if needed. options (optional): An array of additional options for the API request, such as temperature, max\_tokens, top\_p, etc. The chat method will return the response from the ChatGPT model.

Note: The provided code snippet is a simplified example. You may need to adjust it based on your project structure and requirements.

Ensure that you have properly configured the API key, model ID, and other settings according to your OpenAI account and desired behavior.

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity39

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

1065d ago

### Community

Maintainers

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

---

Top Contributors

[![sabir-shah123](https://avatars.githubusercontent.com/u/62803506?v=4)](https://github.com/sabir-shah123 "sabir-shah123 (30 commits)")

---

Tags

apilaravelGPT-3chatbotgptChatGptgpt3

### Embed Badge

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

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

###  Alternatives

[openai-php/laravel

OpenAI PHP for Laravel is a supercharged PHP API client that allows you to interact with the Open AI API

3.7k7.6M74](/packages/openai-php-laravel)[smodav/mpesa

M-Pesa API implementation

16363.7k1](/packages/smodav-mpesa)[claude-php/claude-php-sdk-laravel

Laravel integration for the Claude PHP SDK - Anthropic Claude API

5010.8k](/packages/claude-php-claude-php-sdk-laravel)[ardakilic/mutlucell

Mutlucell SMS API wrapper for sending sms text messages for Laravel

457.3k](/packages/ardakilic-mutlucell)[sbsaga/toon

🧠 TOON for Laravel — a compact, human-readable, and token-efficient data format for AI prompts &amp; LLM contexts. Perfect for ChatGPT, Gemini, Claude, Mistral, and OpenAI integrations (JSON ⇄ TOON).

6115.6k](/packages/sbsaga-toon)[dariusiii/tmdb-laravel

Laravel Package for TMDB ( The Movie Database ) API. Provides easy access to the wtfzdotnet/php-tmdb-api library.

1821.1k](/packages/dariusiii-tmdb-laravel)

PHPackages © 2026

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