2017 © Pedro Peláez
 

library tencent-ai

腾讯AI开放平台sdk

image

justmd5/tencent-ai

腾讯AI开放平台sdk

  • Sunday, July 15, 2018
  • by justmd5
  • Repository
  • 1 Watchers
  • 28 Stars
  • 22 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 4 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

📢 请注意!由于腾讯原有免费API已关闭,该项目目前已属于不可用状态, (*1)

腾讯AI开放平台 SDK

Tencent AI open platform sdk, (*2)

styleci PHP from Packagist GitHub stars Latest Stable Version Latest Unstable Version License , (*3)

Special thanks to the generous sponsorship by:



, (*4)

Requirement

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

安装

composer require justmd5/tencent-ai, (*5)

使用


$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:, (*6)

$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:, (*7)

$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, (*8)

帮助

qq群, (*9)

, (*10)

Todo

  • [ ] parameter verify

Stargazers over time

Stargazers over time, (*11)

感谢

源码列表

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 |, (*12)

非全部接口实现(完善中)

|https://gitee.com/french-home/TencentAISDK | | 1928881525 | .NET(C#) |, (*13)

OCR接口实现人脸模块接口实现

|https://gitee.com/ch_1928881525/Tentcent.Ai | | 910139966 | PHP | ALL | https://github.com/justmd5/tencent-ai|, (*14)

License

MIT, (*15)

FOSSA Status, (*16)

The Versions

15/07 2018

dev-master

9999999-dev

腾讯AI开放平台sdk

  Sources   Download

MIT

The Requires

 

sdk tencent tencent-ai ai-sdk

25/06 2018

v0.2

0.2.0.0

腾讯AI开放平台sdk

  Sources   Download

MIT

The Requires

 

sdk tencent tencent-ai ai-sdk

25/06 2018

v0.1

0.1.0.0

腾讯AI开放平台sdk

  Sources   Download

MIT

The Requires

 

sdk tencent tencent-ai ai-sdk