Download the PHP package fmujie/tuling without Composer

On this page you can find all versions of the php package fmujie/tuling. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package tuling

现仅有图灵Api的文本交互功能

安装

  1. 安装包文件

配置

  1. 注册 ServiceProvider:

  2. 创建配置文件:

    通常得需要选择publish哪一个服务,因为没带参数,选择编号 [n ]

    [n ] Provider: Fmujie\TulingApi\TulingApiServiceProvider

    执行命令后会在 config 目录下生成本扩展配置文件:laravel-tuling-apikey.php

  3. .env 文件中增加如下配置:

    • TULING_API_KEY:图灵ApiKey

使用

  1. 文本交流

    接口字段:

    参数 类型 说明 可为空
    text String 合成的文本 N
    userId String 用户唯一标识 N
    city String 所在城市 N
    province String 所在省份 Y
    street String 所在路段 Y

    接口返回字段详细见 图灵API V2.0接入文档.

    调用示例

    <?php
    
    namespace App\Http\Controllers\Api;
    
    use Illuminate\Http\Request;
    use Fmujie\TulingApi\TulingApi;
    use App\Http\Controllers\Controller;
    
    class TestController extends Controller
    {
        public function test(Request $request)
        {
            $res = TulingApi::txtConversation($request, '我爱你');
            return response()->json([
                'result' => $this->return
            ], $this->statusCode);
        }
    }

    返回示例

    {
        "result": {
            "code": 1,
            "status": "success",
            "msg": "请求成功",
            "data": "我也喜欢你啦~"
        }
    }

    注:使用txt优先级大于Request

License

The MIT License (MIT). Please see License File for more information.


All versions of tuling with dependencies

PHP Build Version
Package Version
Requires guzzlehttp/guzzle Version ^6.3
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package fmujie/tuling contains the following files

Loading the files please wait ....