|
1
|
|
|
<?php |
|
2
|
|
|
/** |
|
3
|
|
|
* This file is part of the mucts.com. |
|
4
|
|
|
* |
|
5
|
|
|
* This source file is subject to the MIT license that is bundled |
|
6
|
|
|
* with this source code in the file LICENSE. |
|
7
|
|
|
* |
|
8
|
|
|
* @version 1.0 |
|
9
|
|
|
* @author herry<[email protected]> |
|
10
|
|
|
* @copyright © 2020 MuCTS.com All Rights Reserved. |
|
11
|
|
|
*/ |
|
12
|
|
|
|
|
13
|
|
|
namespace MuCTS\Sobot\Robot; |
|
14
|
|
|
|
|
15
|
|
|
|
|
16
|
|
|
use MuCTS\Sobot\Contracts\Sobot; |
|
17
|
|
|
|
|
18
|
|
|
/** |
|
19
|
|
|
* Class AddRobotDoc |
|
20
|
|
|
* 添加知识库词条 |
|
21
|
|
|
* |
|
22
|
|
|
* 接口说明: |
|
23
|
|
|
* 接口类型:主动调用接口。 |
|
24
|
|
|
* 接口作用:可通过调用该接口来添加一个知识条目。 |
|
25
|
|
|
* |
|
26
|
|
|
* @property-write int $robot_flag 知识库所属机器人:0公共知识库,1机器人一 |
|
27
|
|
|
* @property-write string $question_title 标准问题 |
|
28
|
|
|
* @property-write int $match_flag 匹配模式:0智能匹配,1完全匹配,2包含匹配 |
|
29
|
|
|
* @property-write string $answer_desc 知识库配置的答案内容,格式为HTML |
|
30
|
|
|
* @property-write string $question_typeid 词条分类id |
|
31
|
|
|
* @property-write int $used_flag 词条状态:0开启,1停用 |
|
32
|
|
|
* @property-write int $audit_status 有效状态:1永久有效;2指定时间有效 |
|
33
|
|
|
* @property-write string|null $effect_time 生效时间,格式:yyyy-MM-dd HH:mm:ss |
|
34
|
|
|
* @property-write string|null $invalid_time 失效时间,格式:yyyy-MM-dd HH:mm:ss |
|
35
|
|
|
* |
|
36
|
|
|
* @method AddRobotDoc robotFlag(int $value) 知识库所属机器人:0公共知识库,1机器人一 |
|
37
|
|
|
* @method AddRobotDoc questionTitle(string $value) 标准问题 |
|
38
|
|
|
* @method AddRobotDoc matchFlag(int $value) 匹配模式:0智能匹配,1完全匹配,2包含匹配 |
|
39
|
|
|
* @method AddRobotDoc answerDesc(string $value) 知识库配置的答案内容,格式为HTML |
|
40
|
|
|
* @method AddRobotDoc questionTypeid(string $value) 词条分类id |
|
41
|
|
|
* @method AddRobotDoc usedFlag(int $value) 词条状态:0开启,1停用 |
|
42
|
|
|
* @method AddRobotDoc auditStatus(int $value) 有效状态:1永久有效;2指定时间有效 |
|
43
|
|
|
* @method AddRobotDoc effectTime(string $value) 生效时间,格式:yyyy-MM-dd HH:mm:ss |
|
44
|
|
|
* @method AddRobotDoc invalidTime(string $value) 失效时间,格式:yyyy-MM-dd HH:mm:ss |
|
45
|
|
|
* |
|
46
|
|
|
* @package MuCTS\Sobot\Robot |
|
47
|
|
|
*/ |
|
48
|
|
|
class AddRobotDoc extends Sobot |
|
49
|
|
|
{ |
|
50
|
|
|
|
|
51
|
|
|
public function getRequestMethod(): string |
|
52
|
|
|
{ |
|
53
|
|
|
return self::METHOD_POST; |
|
54
|
|
|
} |
|
55
|
|
|
|
|
56
|
|
|
public function getRequestPath(): string |
|
57
|
|
|
{ |
|
58
|
|
|
return '/api/robot/5/add_robot_doc'; |
|
59
|
|
|
} |
|
60
|
|
|
} |