【扩展分享】腾讯AI开放平台 SDK

浏览:789 发布日期:2018/11/14 分类:系统代码 关键字: 腾讯 AI 开放平台 SDK
腾讯AI开放平台 SDK
Requirement
PHP >= 7.0
Composer
ext-curl 拓展
ext-json 拓展
安装composer require justmd5/tencent-ai使用$config  = [
    'appKey'    => '1106944xxx',
    'appSecret' => 'dsgnbnWnX8Yxxxxxx',
    'debug'     => 0,//1 show debug info 
];
$AI      = new \Justmd5\TencentAi\Ai($config);
接口调用示例
智能闲聊 url: https://api.ai.qq.com/fcgi-bin/nlp/nlp_textchat 请求示例如下:$params = [
'question'=>'腾讯人工智能',
'session'=>123,
];
try {
    dd($AI->nlp->request('textchat', $params));
} catch (\Justmd5\TencentAi\Exception\NotFoundException $e) {
    dd($e);
}
https://github.com/justmd5/tencent-ai
评论( 相关
后面还有条评论,点击查看>>