42
GitHub - justmd5/tencent-ai: 腾讯AI开放平台 Tencent AI open platform
source link: https://github.com/justmd5/tencent-ai
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
README.md
腾讯AI开放平台 SDK
Tencent AI open platform sdk
Requirement
- PHP >= 7.0
- Composer
- ext-curl 拓展
- ext-json 拓展
install
composer require justmd5/tencent-ai
Usage
$config = [ 'appKey' => '1106944xxx', 'appSecret' => 'dsgnbnWnX8Yxxxxxx', 'debug' => 0,//1 show debug info ]; $AI = new \Justmd5\TencentAi\Ai($config);
Interface call example
智能闲聊 url: https://api.ai.qq.com/fcgi-bin/nlp/nlp_textchat request like bellow
$params = [
'question'=>'腾讯人工智能',
'session'=>123,
];
try {
dd($AI->nlp->request('textchat', $params));
} catch (\Justmd5\TencentAi\Exception\NotFoundException $e) {
dd($e);
}
Documentation
Tencent AI · Official Documents
Help
qq群
Todo
- parameter verify
Thanks
- thanks to hanson/foundation-sdk
License
MIT
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK