Skip to content

CockyCat/PHP-GPT

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

PHP-GPT - A PHP library base openai

Directory structure

├── src
│   ├── OpenAPI
│   │   ├── Client.php
│   │  
│   ├── Exception
│   │   ├── OpenAIException.php
├── tests
│   ├── ClientTest.php
├── vendor
│   └── 
├── composer.json
└── 

Dependency

composer require guzzlehttp/guzzle:^7.0 league/oauth2-client:^2.6 phpunit/phpunit:^9.0

Installation

composer require cockycat/php-gpt

Usage

Add Facade in Laravel/Lumen

Add an entry for the facade class in the aliases array in config/app.php, for example:

'aliases' => [
    // ...
    'OpenAIClient' => App\\Facades\\OpenAIFacade::class,
],

Call function in Laravel/Lumen

use OpenAIClient;


$data = OpenAIClient::chat('/test', ['param1' => 'value1']);

About

A PHP Composer Library for LLM

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages