feat(openai): 新增意图相关接口

This commit is contained in:
Fu Diwei
2021-10-08 18:39:11 +08:00
parent 03d49a0012
commit 75bb97f2f3
41 changed files with 2200 additions and 0 deletions

View File

@@ -0,0 +1,3 @@
{
"intent_id": 1205882
}

View File

@@ -0,0 +1,127 @@
{
"code": 0,
"msg": "请求成功",
"request_id": "255i0ug8-l9q4-3801-44ft-w7csjn9e5142",
"data": {
"slots": [
{
"name": "城市",
"dicts": [ "建筑", "公路" ],
"keep_ask": true,
"ask_content": [ "建筑1", "公路1" ]
}
],
"pre": [
{
"skill": "音乐",
"intent": "点播"
}
],
"next": [
{
"skill": "天气",
"intent": "询问"
}
],
"keep_ask": true,
"keep_ask_num": 10,
"answer_config_type": 4,
"dynamic_ask_answer_config": {
"api": "_dynamic_list_selection_{}",
"question": "AskAnswerConfigQuestion",
"result": [
{
"code": "0",
"desc": "",
"answer_config_type": 3,
"answer": "",
"ask_answer_config": {
"api": "_bot_ask_{}",
"question": "AskAnswerConfigQuestion",
"result": [
{
"code": "0",
"desc": "",
"answer_config_type": 2,
"answer": "",
"ask_slot_answer_config": {
"api": "_bot_getinfo_{}",
"arguments": [
{
"name": "",
"slot": "Slot",
"ask_content": [ "111", "222" ]
}
],
"result": [
{
"code": "0",
"desc": "",
"answer_config_type": 1,
"answer": "",
"api_answer_config": {
"api": "_http_service_{}",
"need_confirm": true,
"need_confirm_response": "城市好啊",
"http_method": "get",
"http_url": "HttpUrl111",
"arguments": {
"input": [
{
"name": "InputName",
"input": true,
"desc": "Inputdesc",
"slot": "InputSlot",
"default_value": "defa",
"ask_content": [ "ask" ]
}
],
"output": [
{
"name": "OutputName",
"input": false,
"desc": "desc",
"slot": "OutputSlot",
"default_value": ""
}
]
},
"result": [
{
"code": "0",
"desc": "",
"answer_config_type": 0,
"answer": "",
"normal_answer_config": {
"merge_answer": true,
"answer": [
{
"type": 0,
"content": "我在哪"
},
{
"type": 1,
"content": {
"title": "我是h5",
"description": "我是Description",
"url": "我是Url",
"pic_url": "我是PicUrl",
"type": "h5"
}
}
]
}
}
]
}
}
]
}
}
]
}
}
]
}
}
}

View File

@@ -0,0 +1,125 @@
{
"intent_id": 9617433,
"skill_id": 1549251,
"slots": [
{
"name": "城市",
"dicts": [
"建筑",
"公路"
],
"keep_ask": true,
"ask_content": [
"建筑1",
"公路1"
]
}
],
"pre": [
{
"skill": "音乐",
"intent": "点播"
}
],
"next": [
{
"skill": "天气",
"intent": "询问"
}
],
"keep_ask": true,
"keep_ask_num": 10,
"answer_config_type": 4,
"dynamic_ask_answer_config": {
"api": "_dynamic_list_selection_{}",
"question": "AskAnswerConfig Question",
"result": [
{
"code": "0",
"desc": "",
"answer_config_type": 3,
"answer": "",
"ask_answer_config": {
"api": "_bot_ask_{}",
"question": "AskAnswerConfig Question",
"result": [
{
"code": "0",
"desc": "",
"answer_config_type": 2,
"answer": "",
"ask_slot_answer_config": {
"api": "_bot_getinfo_{}",
"arguments": [
{
"name": "",
"slot": "Slot",
"ask_content": [
"111",
"222"
]
}
],
"result": [
{
"code": "0",
"desc": "",
"answer_config_type": 1,
"answer": "",
"api_answer_config": {
"api": "_http_service_{}",
"need_confirm": true,
"need_confirm_response": "城市好啊",
"http_method": "get",
"http_url": "HttpUrl111",
"arguments": {
"input": [
{
"name": "Input Name",
"input": true,
"desc": "Input desc",
"slot": "Input Slot",
"default_value": "defa",
"ask_content": [
"ask"
]
}
],
"output": [
{
"name": "Output Name",
"input": false,
"desc": "desc",
"slot": "Output Slot",
"default_value": ""
}
]
},
"result": [
{
"code": "0",
"desc": "",
"answer_config_type": 0,
"answer": "",
"normal_answer_config": {
"merge_answer": true,
"answer": [
{
"content": "我在哪"
}
]
}
}
]
}
}
]
}
}
]
}
}
]
}
}

View File

@@ -0,0 +1,5 @@
{
"code": 0,
"msg": "请求成功",
"request_id": "255i0ug8-l9q4-3801-44ft-w7csjn9e5142"
}

View File

@@ -0,0 +1,3 @@
{
"id_list": [ 1205882, 1205883, 1205884 ]
}

View File

@@ -0,0 +1,5 @@
{
"code": 0,
"msg": "success",
"request_id": "255i0ug8-l9q4-3801-44ft-w7csjn9e5142"
}

View File

@@ -0,0 +1,24 @@
{
"code": 0,
"data": {
"id": 6326248,
"name": "温度bab1",
"questions": [
{
"counter_example": true,
"id": 92,
"question": "今天温度怎么样e",
"rank_level": 1,
"threshold": 0.9
}
],
"rank_level": 1,
"skill_id": 1205882,
"switch": false,
"threshold": 0.9,
"frequency": 0,
"updated_time": 1588931008
},
"msg": "请求成功",
"request_id": "255i0ug8-l9q4-3801-44ft-w7csjn9e5142"
}

View File

@@ -0,0 +1,4 @@
{
"skill_id": 1548171,
"intent_name": "温度"
}

View File

@@ -0,0 +1,8 @@
{
"code": 0,
"msg": "success",
"request_id": "255i0ug8-l9q4-3801-44ft-w7csjn9e5142",
"data": {
"exist": true
}
}

View File

@@ -0,0 +1,20 @@
{
"intent_list": [
{
"intent_id": 0,
"skill_id": 1,
"name": "测试创建意图1",
"rank_level": 0.65,
"threshold": 0.7,
"switch": false
},
{
"intent_id": 0,
"skill_id": 1,
"name": "测试创建意图2",
"rank_level": 0.75,
"threshold": 0.7,
"switch": true
}
]
}

View File

@@ -0,0 +1,18 @@
{
"code": 0,
"msg": "success",
"request_id": "255i0ug8-l9q4-3801-44ft-w7csjn9e5142",
"data": {
"count": 2,
"list": [
{
"intent_id": 45,
"intent_name": "测试创建意图1"
},
{
"intent_id": 20,
"intent_name": "测试创建意图2"
}
]
}
}

View File

@@ -0,0 +1,5 @@
{
"keyword": "测试",
"page": 1,
"size": 10
}

View File

@@ -0,0 +1,28 @@
{
"code": 0,
"data": {
"count": 3,
"list": [
{
"intent_id": 1516,
"intent_name": "笑什么?",
"skill_id": 7895,
"skill_name": "测试技能4"
},
{
"intent_id": 1517,
"intent_name": "测试意图333",
"skill_id": 7899,
"skill_name": "技能5"
},
{
"intent_id": 2,
"intent_name": "测试意图666",
"skill_id": 7899,
"skill_name": "技能5"
}
]
},
"msg": "请求成功",
"request_id": "255i0ug8-l9q4-3801-44ft-w7csjn9e5142"
}

View File

@@ -0,0 +1,12 @@
{
"switch_list": [
{
"id": 1205882,
"switch": true
},
{
"id": 1205883,
"switch": false
}
]
}

View File

@@ -0,0 +1,5 @@
{
"code": 0,
"msg": "请求成功",
"request_id": "255i0ug8-l9q4-3801-44ft-w7csjn9e5142"
}

View File

@@ -0,0 +1,5 @@
{
"code": 0,
"msg": "success",
"request_id": "255i0ug8-l9q4-3801-44ft-w7csjn9e5142"
}

View File

@@ -0,0 +1,23 @@
{
"mode": 0,
"skill_id": 16579,
"skill_name": "",
"intent_id": 1205882,
"intent_name": "",
"data": [
{
"id": 0,
"question": "天气",
"rank_level": 0.9,
"threshold": 0.8,
"counter_example": false
},
{
"id": 0,
"question": "温度",
"rank_level": 0.8,
"threshold": 0.8,
"counter_example": false
}
]
}

View File

@@ -0,0 +1,5 @@
{
"code": 0,
"msg": "success",
"request_id": "255i0ug8-l9q4-3801-44ft-w7csjn9e5142"
}