腾讯AI开放平台 SDK
Tencent AI open platform sdk, (*1)
, (*2)
Requirement
- PHP >= 7.0
- Composer
- ext-curl 拓展
- ext-json 拓展
Install
in your laravel application, execute the following command:, (*3)
composer require justmd5/laravel-tencent-ai
, (*4)
add service provider to the app.php:, (*5)
'providers' => [
// Application Service Providers...
Justmd5\LaravelTencentAi\ServiceProvider::class,
],
if you use laravel that >= 5.5 ,the above steps are not required., (*6)
publish config:, (*7)
php artisan vendor:publish --provider="Justmd5\LaravelTencentAi\ServiceProvider"
after that, you might want to change some config about tencentai:, (*8)
// config/tencentai.php
return [
'appKey' => '',
'appSecret' => '',
'debug' => 0,
];
Usage
$params = [
'question'=>'腾讯人工智能',
'session'=>123,
];
dd(app('tencent-ai')->nlp->request('textchat', $params));
Documentation
Tencent AI · Official Documents, (*9)
Help
qq群, (*10)
, (*11)
Thanks
License
MIT, (*12)
, (*13)