1 Star 7 Fork 0

justmd5 / tencent-ai

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

腾讯AI开放平台 SDK

Tencent AI open platform sdk

styleci PHP from Packagist GitHub stars Latest Stable Version Latest Unstable Version License

Special thanks to the generous sponsorship by:



Requirement

  1. PHP >= 7.0
  2. Composer
  3. ext-curl 拓展
  4. ext-json 拓展

安装

composer require justmd5/tencent-ai

使用


$config  = [
    'appKey'    => '1106944xxx',
    'appSecret' => 'dsgnbnWnX8Yxxxxxx',
    'debug'     => true,//true show debug info 
];
$AI      = new \Justmd5\TencentAi\Ai($config);

接口调用示例

智能闲聊 url: https://api.ai.qq.com/fcgi-bin/nlp/nlp_textchat 请求示例1:

$params = [
'question'=>'腾讯人工智能',
'session'=>123,
];
try {
    dd($AI->nlp->request('textchat', $params));
} catch (\Justmd5\TencentAi\Exception\NotFoundException $e) {
    dd($e);
}

看图说话 url: https://api.ai.qq.com/fcgi-bin/vision/vision_imgtotext 请求示例2:

$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

  • parameter verify

Stargazers over time

Stargazers over time

感谢

源码列表

SDK 联系人 QQ 语言 实现接口 源代码&SDK 地址
783021975 JAVA ALL https://gitee.com/xshuai/taip
1361653339 Golang ALL https://github.com/shiguanghuxian/txai
1280827369 NodeJS
非全部接口实现
https://github.com/w89612b/qqai-api-sdk
1109527533 Python
非全部接口实现(完善中)
https://gitee.com/french-home/TencentAISDK
1928881525 .NET(C#)
OCR接口实现人脸模块接口实现
https://gitee.com/ch_1928881525/Tentcent.Ai
910139966 PHP ALL https://github.com/justmd5/tencent-ai

License

MIT

FOSSA Status

MIT License Copyright (c) 2018 独步弈城 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

腾讯AI开放平台 SDK 展开 收起
PHP
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
PHP
1
https://gitee.com/justmd5/tencent-ai.git
git@gitee.com:justmd5/tencent-ai.git
justmd5
tencent-ai
tencent-ai
master

搜索帮助