Tencent AI open platform sdk
- PHP >= 7.0
- Composer
- ext-curl 拓展
- ext-json 拓展
in your laravel application, execute the following command:
composer require justmd5/laravel-tencent-ai
add service provider to the app.php:
'providers' => [
// Application Service Providers...
Justmd5\LaravelTencentAi\ServiceProvider::class,
],
if you use laravel that >= 5.5 ,the above steps are not required.
publish config:
php artisan vendor:publish --provider="Justmd5\LaravelTencentAi\ServiceProvider"
after that, you might want to change some config about tencentai:
// config/tencentai.php
return [
'appKey' => '',
'appSecret' => '',
'debug' => 0,
];
$params = [
'question'=>'腾讯人工智能',
'session'=>123,
];
dd(app('tencent-ai')->nlp->request('textchat', $params));
Tencent AI · Official Documents
qq群
- thanks to hanson/foundation-sdk
MIT