机器人对话URL:
url: /robot/say.do
Post请求参数:
json
{
“token”: “914845391cdfc2d35671a6185ec31d6f”,
“robot_id”: “b4bdf8343cd0b858e9377a116e70ad0d”, //机器人ID
“user_id”: “18622190278”, //用户ID
“input”: “你好” //用户输入信息
“parameter”: //可选参数
{
“key”:”我是参数”,
“entity-parameter”:{“sys:name”:[“代伟”]}, //实体参数,用于实体识别节点
“option-dict”:{“selector1″:”a2”, “selector2″:”b2”} //分支选择器的选项字典参数,如果流程有分支选择器节点,需要使用该参数
}
}
返回结果:
json
{
“info”: {
“id”: “c35155d1da5cb72e32fa4140bda698c4_-25”, //当前ID
“input”: “嘻嘻哈哈”, //输入内容
“is_flow_output”: True, //是否流程输出
“slot_output”: “默认输出”, //槽输出内容
“flow_end”: False, //流程是否结束
“output”: “默认输出” //输出内容
“default_next”: False, //是否默认往下走了
“breakable”: True, //是否可以打断
“node_text”: “输出”, //节点文本内容
“output_expand”: None, //输出扩展内容
“output_command”: None, //输出命令
“filter_flow”: “c35155d1da5cb72e32fa4140bda698c4”, //过滤流程ID
“delay”: 0, //延时时间
“slot_info”: {
“user_info”: “姓氏:李,电话:13358699125”
}, //槽信息
“ann_corpus_id”: “3036dfbd26d2d74e2fc99e572d4a3227”, //ann查询最像语料ID
“flow_title”: “03关于三角龙”, //流程标题
“user_label”: “未知”, //用户标签
“output_id”: “6828fe10bb5810d390b9014472edd53d”, //输出语料ID
“node_label”: “”, //节点标签
“user_label_tag_list”: [], //用户标签对应的标记列表
“slot_data”: {}, //槽数据
“path”: [{
“to”: {
“type”: “main”,
“id”: “1c50b53178668e7c90877a777ac2fce9_-20”
},
“from”: {
“type”: “main”,
“id”: “1c50b53178668e7c90877a777ac2fce9_-17”
}
}, {
“to”: {
“type”: “sub”,
“id”: “c35155d1da5cb72e32fa4140bda698c4_-15”
},
“from”: {
“type”: “sub”,
“id”: “c35155d1da5cb72e32fa4140bda698c4_-2”
}
}, {
“to”: {
“type”: “sub”,
“id”: “c35155d1da5cb72e32fa4140bda698c4_-16”
},
“from”: {
“type”: “sub”,
“id”: “c35155d1da5cb72e32fa4140bda698c4_-15”
}
}, {
“to”: {
“type”: “sub”,
“id”: “c35155d1da5cb72e32fa4140bda698c4_-8”
},
“from”: {
“type”: “sub”,
“id”: “c35155d1da5cb72e32fa4140bda698c4_-16”
}
}, {
“to”: {
“type”: “sub”,
“id”: “c35155d1da5cb72e32fa4140bda698c4_-25”
},
“from”: {
“type”: “sub”,
“id”: “c35155d1da5cb72e32fa4140bda698c4_-16”
}
}], //流程流转路径
“interactive_similarity”: 0.0, //交互语料相似度
“interactive_corpus_id”: None, //交互语料ID
“interactive_key_word”: None, //交互语料内容
“pre_node_id”: “1c50b53178668e7c90877a777ac2fce9_-9”, //最像的前置节点ID
“pre_node_similarity”: 0.3668349087238312, //最像的前置节点相似度
“pre_node_condition_id”: “157a53326e96967f4d88b47fd51f75fe”, //最像前置节点条件ID
“pre_node_key_word”: “不玩了”, //最像的前置节点关键词
“ann_corpus_similarity”: 0.4482845366001129, //ann最像语料相似度
“ann_key_word”: “喊他爸爸”, //ann查询最像关键词
“most_like_similarity”: 0.4482845366001129, //关键词调整后最像的语料相似度
“most_like_corpus_id”: “3036dfbd26d2d74e2fc99e572d4a3227”, //关键词调整后最像语料ID
“most_like_key_word”: “喊他爸爸”, //通过关键词权重调整后的最像的关键词
“need_evaluating”: False //是否需要声音评测
“evaluating_content”: None //评测内容
“data_tree_result”: [{
“info”: “101”,
“comment”: “101室”,
“sort_no”: 1
}, {
“info”: “102”,
“comment”: “102室”,
“sort_no”: 2
}, {
“info”: “204”,
“comment”: “204室”,
“sort_no”: 7
}] //数据树的结果
},
“message”: “ok”,
“successful”: true
}