yunzhiyike / chat-gpt
This is an free chat-gpt sdk
Installs: 8
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/yunzhiyike/chat-gpt
Requires
- guzzlehttp/guzzle: ^7.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.58
- phpunit/phpunit: ^10.5
README
免费chatGPT接口
镜像仓库设置
composer config -g repo.packagist composer https://packagist.org
使用方法
<?php declare(strict_types=1); /** * This file is part of Yunzhiyike */ namespace Yunzhiyike\Test; use PHPUnit\Framework\TestCase; use Yunzhiyike\ChatGpt\ChatGptFactory; use Yunzhiyike\ChatGpt\constans\GptV1Model; /** * @internal * @coversNothing */ class TestA extends TestCase { public function test() { $res = ChatGptFactory::getInstance()->gptV1->sendText('给我画一幅美丽的风景图', GptV1Model::GTP_4O, 'http://账号:密码@IP:端口'); var_dump($res); } }