justmd5/laravel-tencent-ai

腾讯AI开放平台sdk.

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

This package is auto-updated.

Last update: 2024-03-18 18:49:46 UTC


README

Tencent AI open platform sdk

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

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群

68747470733a2f2f7773312e73696e61696d672e636e2f6d773639302f626331646663366167793166736d67337a616b36636a32306630306b6b3765692e6a7067

Thanks

License

MIT

FOSSA Status