justmd5/laravel-tencent-ai

腾讯AI开放平台sdk.

v1.2.0 2019-10-18 08:47 UTC

This package is auto-updated.

Last update: 2024-10-18 19:56:09 UTC


README

Tencent AI open platform sdk

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

Requirement

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

Install

in your laravel application, execute the following command:

composer require justmd5/laravel-tencent-ai

Configure

add service provider to the app.php:

'providers' => [
    // Application Service Providers...
    Justmd5\LaravelTencentAi\ServiceProvider::class,
],

if you use laravel that >= 5.5 ,the above steps are not required.

publish config:

php artisan vendor:publish --provider="Justmd5\LaravelTencentAi\ServiceProvider"

after that, you might want to change some config about tencentai:

// config/tencentai.php
return [
    'appKey'    => '',
    'appSecret' => '',
    'debug'     => 0,
];

Usage

    $params = [
            'question'=>'腾讯人工智能',
            'session'=>123,
    ];
    
    dd(app('tencent-ai')->nlp->request('textchat', $params));

Documentation

Tencent AI · Official Documents

Help

qq群

Thanks

License

MIT

FOSSA Status