在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:tencent-ai开源软件地址:https://gitee.com/justmd5/tencent-ai开源软件介绍:腾讯AI开放平台 SDKTencent AI open platform sdk Special thanks to the generous sponsorship by: Requirement
安装
使用$config = [ 'appKey' => '1106944xxx', 'appSecret' => 'dsgnbnWnX8Yxxxxxx', 'debug' => true,//true show debug info ];$AI = new \Justmd5\TencentAi\Ai($config); 接口调用示例
$params = ['question'=>'腾讯人工智能','session'=>123,];try { dd($AI->nlp->request('textchat', $params));} catch (\Justmd5\TencentAi\Exception\NotFoundException $e) { dd($e);}
$params = [//image 支持两种传递参数方式// 'image' => base64_encode(file_get_contents(__DIR__ . '/1571126902_843200.jpg')),//old 'image' => __DIR__ . '/1571126902_843200.jpg',//new 'session_id' => time(),];try { var_dump($AI->vision->request('imgtotext', $params));} catch (\Justmd5\TencentAi\Exception\NotFoundException $e) { print_r($e->getMessage());} catch (\Justmd5\TencentAi\Exception\IllegalParameterException $e) { print_r($e->getMessage());} 文档Tencent AI · Official Documents 帮助qq群 Todo
Stargazers over time感谢
源码列表
LicenseMIT |
请发表评论