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 RobotFeedback |
20
|
|
|
* 机器人回答评价 |
21
|
|
|
* |
22
|
|
|
* 接口说明: |
23
|
|
|
* 接口类型:主动调用接口。 |
24
|
|
|
* 接口作用:通过主动调用接口来进行机器人回答的评价(非会话评价)。 |
25
|
|
|
* |
26
|
|
|
* @property-write string $visitorid 访客id |
27
|
|
|
* @property-write string $cid 会话id |
28
|
|
|
* @property-write string $docid 词条id |
29
|
|
|
* @property-write string $doc_name 词条名称 |
30
|
|
|
* @property-write int $robot_flag 机器人id |
31
|
|
|
* @property-write int $status 评价状态 1:顶,-1:踩 |
32
|
|
|
* @property-write string $msgid 消息id |
33
|
|
|
* @property-write string|null $partnerid 企业自己的用户id,可自行传值 |
34
|
|
|
* @property-write int $from 客户来源,0:开放平台;1:web、sdk;2:微信 |
35
|
|
|
* |
36
|
|
|
* @method RobotFeedback visitorid(string $value) 访客id |
37
|
|
|
* @method RobotFeedback cid(string $value) 会话id |
38
|
|
|
* @method RobotFeedback docid(string $value) 词条id |
39
|
|
|
* @method RobotFeedback docName(string $value) 词条名称 |
40
|
|
|
* @method RobotFeedback robotFlag(int $value) 机器人id |
41
|
|
|
* @method RobotFeedback status(int $value) 评价状态 1:顶,-1:踩 |
42
|
|
|
* @method RobotFeedback msgid(string $value) 消息id |
43
|
|
|
* @method RobotFeedback partnerid(?string $value) 企业自己的用户id,可自行传值 |
44
|
|
|
* @method RobotFeedback from(int $value) 客户来源,0:开放平台;1:web、sdk;2:微信 |
45
|
|
|
* |
46
|
|
|
* 注:如没有visitorid,可传入partnerid、from三个字段代替 |
47
|
|
|
* |
48
|
|
|
* @package MuCTS\Sobot\Robot |
49
|
|
|
*/ |
50
|
|
|
class RobotFeedback extends Sobot |
51
|
|
|
{ |
52
|
|
|
|
53
|
|
|
public function getRequestMethod(): string |
54
|
|
|
{ |
55
|
|
|
return self::METHOD_POST; |
56
|
|
|
} |
57
|
|
|
|
58
|
|
|
public function getRequestPath(): string |
59
|
|
|
{ |
60
|
|
|
return '/api/chat/5/user/robot_feedback'; |
61
|
|
|
} |
62
|
|
|
} |