42

GitHub - justmd5/tencent-ai: 腾讯AI开放平台 Tencent AI open platform

 5 years ago
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

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

Requirement

  1. PHP >= 7.0
  2. Composer
  3. ext-curl 拓展
  4. 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群

68747470733a2f2f7773312e73696e61696d672e636e2f6d773639302f626331646663366167793166736d67337a616b36636a32306630306b6b3765692e6a7067

Todo

  • parameter verify

Thanks

License

MIT


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK