justmd5 / laravel-tencent-ai
腾讯AI开放平台sdk.
v1.2.0
2019-10-18 08:47 UTC
Requires
- php: >=7.0
- ext-curl: *
- ext-json: *
- justmd5/tencent-ai: ~0.6
This package is auto-updated.
Last update: 2024-11-18 20:10:01 UTC
README
Tencent AI open platform sdk
Requirement
- PHP >= 7.0
- Composer
- ext-curl 拓展
- ext-json 拓展
Install
in your laravel application, execute the following command:
composer require justmd5/laravel-tencent-ai
Configure
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, ];
Usage
$params = [ 'question'=>'腾讯人工智能', 'session'=>123, ]; dd(app('tencent-ai')->nlp->request('textchat', $params));
Documentation
Tencent AI · Official Documents
Help
qq群
Thanks
- thanks to hanson/foundation-sdk
License
MIT