首页 版块 积分商城 访问AI主站 注册 发帖
love卵疼
32
积分 积分商城
0
获赞
UNIT2.0 调用示例(Python3)
Ta的回复 :你好,有没有多轮对话的demo ,返回的json还是太恶心了
12
技能对话接口,API多轮对话的实现
Ta的回复 :好烦  一直是 请求数据不对 "{ "bot_session":{ "session_id":"session-1539308171714-2261805925-8013-24"},"log_id":"7758521","request":{ "bernard_level":2,"client_session":"{"client_results":"", "candidate_options":[]}","query":"hyc在不在","query_info":{ "asr_candidates":[],"source":"KEYBOARD","type":"TEXT"},"updates":"","user_id":"99635"},"bot_id":12752,"version":"2.0"}"  都不知道这个拼接哪里有错。
27
多伦对话业务系统代码demo有吗
Ta的回复 :我其实就是想知道第二轮对话中我这个json哪里有问题:  "{"bot_session":"{"session_id":"session-1539310509100-2261805925-8013-26"}","log_id":"7758521","request":{"bernard_level":1,"client_session":"{\"client_results\":\"\", \"candidate_options\":[]}","query":"何友闯在不在","query_info":{"asr_candidates":[],"source":"KEYBOARD","type":"TEXT"},"updates":"","user_id":"99635"},"bot_id":"12752","version":"2.0"}" 我这个bot_session 是否设置错误了,我去掉 bot_session 请求正确,但是加上session就是 282008 错误
3
如果商用UNIT的情况,QPS最高能达到多少?
Ta的回复 :是不是每秒服务器可并发处理40个语义请求。是不是商用UNIT必须要部署到生产环境中,沙盒环境,QPS限制是多少呢
3
UNIT2.0 调用示例(Python3)
Ta的回复 :可以使用引导意图,还有返回json中,type 如果是clarify之类的 才能正确确定是多轮对话。在返回剩余类型时,本地存储的SessionID置空。
12
技能对话接口,API多轮对话的实现
Ta的回复 :这是我 一次对话百度json返回的bot_session内容,我不确定,在第二轮对话的时候是否需要把这么多再次传回去(如果我语文学的没错的情况下,楼主应该就是这个意思)   {{"bot_id":"12968","bot_views":{"bernard_res":[{"action_list":[{"action_id":"","confidence":0.0,"custom_reply":"","refine_detail":{"clarify_reason":"","interact":"","option_list":[]},"say":"","type":"understood"}],"msg":"ok","qu_res":{"candidates":[{"confidence":100.0,"domain_confidence":0.0,"extra_info":{"group_id":"5","real_threshold":"1","threshold":"0.7"},"from_who":"pow-slu-lev1","intent":"QUERYPOSITION","intent_confidence":100.0,"intent_need_clarify":false,"match_info":"{\"group_id\":\"5\",\"id\":\"739186\",\"match_keywords\":\" kw_querypositionyuqi:在哪里\",\"match_pattern\":\"[D:user_queryposition]\\t[D:kw_querypositionyuqi]\",\"ori_pattern\":\"[D:user_queryposition]\\t[D:kw_querypositionyuqi]\",\"ori_slots\":{\"confidence\":100.0,\"domain_confidence\":0.0,\"extra_info\":{},\"from_who\":\"smart_qu\",\"intent\":\"QUERYPOSITION\",\"intent_confidence\":100.0,\"intent_need_clarify\":false,\"match_info\":\"[D:user_queryposition] \\t[D:kw_querypositionyuqi] kw_querypositionyuqi:在哪里\",\"slots\":[{\"begin\":0,\"confidence\":100.0,\"father_idx\":-1,\"length\":4,\"name\":\"user_queryposition\",\"need_clarify\":false,\"normalized_word\":\"\",\"original_word\":\"电梯\",\"word_type\":\"\"},{\"begin\":4,\"confidence\":100.0,\"father_idx\":-1,\"length\":6,\"name\":\"kw_querypositionyuqi\",\"need_clarify\":false,\"normalized_word\":\"\",\"original_word\":\"在哪里\",\"word_type\":\"\"}]},\"real_threshold\":1.0,\"threshold\":0.6999999880790710}","slots":[{"begin":0,"confidence":100.0,"father_idx":-1,"length":4,"name":"user_queryposition","need_clarify":false,"normalized_word":"电梯","original_word":"电梯","word_type":""}]}],"lexical_analysis":[{"basic_word":["电梯"],"etypes":["[D:user_queryposition]"],"term":"电梯","type":"user_queryposition","weight":0.6080},{"basic_word":["在"],"etypes":[],"term":"在","type":"28","weight":0.130},{"basic_word":["哪里"],"etypes":["[D:COREF_LOCATION]","sys_coref_location","sys_coref_location"],"term":"哪里","type":"sys_coref_location","weight":0.260}],"qu_res_chosen":"{\"confidence\":100.0,\"domain_confidence\":0.0,\"extra_info\":{\"group_id\":\"5\",\"real_threshold\":\"1\",\"threshold\":\"0.7\"},\"from_who\":\"pow-slu-lev1\",\"intent\":\"QUERYPOSITION\",\"intent_confidence\":100.0,\"intent_need_clarify\":false,\"match_info\":\"{\\\"group_id\\\":\\\"5\\\",\\\"id\\\":\\\"739186\\\",\\\"match_keywords\\\":\\\" kw_querypositionyuqi:在哪里\\\",\\\"match_pattern\\\":\\\"[D:user_queryposition]\\\\t[D:kw_querypositionyuqi]\\\",\\\"ori_pattern\\\":\\\"[D:user_queryposition]\\\\t[D:kw_querypositionyuqi]\\\",\\\"ori_slots\\\":{\\\"confidence\\\":100.0,\\\"domain_confidence\\\":0.0,\\\"extra_info\\\":{},\\\"from_who\\\":\\\"smart_qu\\\",\\\"intent\\\":\\\"QUERYPOSITION\\\",\\\"intent_confidence\\\":100.0,\\\"intent_need_clarify\\\":false,\\\"match_info\\\":\\\"[D:user_queryposition] \\\\t[D:kw_querypositionyuqi] kw_querypositionyuqi:在哪里\\\",\\\"slots\\\":[{\\\"begin\\\":0,\\\"confidence\\\":100.0,\\\"father_idx\\\":-1,\\\"length\\\":4,\\\"name\\\":\\\"user_queryposition\\\",\\\"need_clarify\\\":false,\\\"normalized_word\\\":\\\"\\\",\\\"original_word\\\":\\\"电梯\\\",\\\"word_type\\\":\\\"\\\"},{\\\"begin\\\":4,\\\"confidence\\\":100.0,\\\"father_idx\\\":-1,\\\"length\\\":6,\\\"name\\\":\\\"kw_querypositionyuqi\\\",\\\"need_clarify\\\":false,\\\"normalized_word\\\":\\\"\\\",\\\"original_word\\\":\\\"在哪里\\\",\\\"word_type\\\":\\\"\\\"}]},\\\"real_threshold\\\":1.0,\\\"threshold\\\":0.6999999880790710}\",\"slots\":[{\"begin\":0,\"confidence\":100.0,\"father_idx\":-1,\"length\":4,\"name\":\"user_queryposition\",\"need_clarify\":false,\"normalized_word\":\"电梯\",\"original_word\":\"电梯\",\"word_type\":\"\"}]}\n","raw_query":"电梯在哪里","sentiment_analysis":{"label":"1","pval":0.9960},"status":0,"timestamp":0},"schema":{"domain_confidence":0.0,"intent":"QUERYPOSITION","intent_confidence":100.0,"slots":[{"begin":0,"confidence":100.0,"length":4,"merge_method":"updated","name":"user_queryposition","normalized_word":"电梯","original_word":"电梯","session_offset":0,"sub_slots":[],"word_type":""}]},"status":0}],"bernard_status":[{"index":0,"step":"AFTER_DM_TRIGGER"}],"intervention":{"interv_qu_res":"","interv_query":"","qu_res_interved":"","qu_res_original":"","query_original":"","type":"","user_id":""},"user_slots":{"user_queryposition":{"state":2,"static_slot":{"default_state":0,"default_tag_name":"DEFAULT","extensible":true,"name":"user_queryposition","print":["区域位置"],"type":0,"update_type":"single_turn","weight":1.0},"tag_map":{"电梯":{"begin":0,"confidence":100.0,"length":4,"merge_method":"updated","normalized_name":"电梯","original_name":"电梯","state":2,"turn":0,"word_type":""}}}}},"dialog_state":{"contexts":{},"intents":[{"index":0,"name":"QUERYPOSITION"}],"user_slots":{"user_queryposition":{"attrs":{"default_state":0,"default_tag_name":"DEFAULT","extensible":true,"name":"user_queryposition","print":["区域位置"],"type":0,"update_type":"single_turn","weight":1.0},"state":2,"values":{"电梯":{"begin":0,"confidence":100.0,"length":4,"merge_method":"updated","normalized_name":"电梯","original_name":"电梯","session_offest":0,"state":2,"word_type":""}}}}},"interactions":[{"interaction_id":"interaction-1541226572696-746135415-8013-497","request":{"bernard_level":1,"client_session":"{\"client_results\":\"\", \"candidate_options\":[]}","hyper_params":{"slu_tags":[]},"query":"电梯在哪里","query_info":{"asr_candidates":[],"source":"KEYBOARD","type":"TEXT"},"updates":"","user_id":"99635"},"response":{"action_list":[{"action_id":"queryposition_satisfy","confidence":100.0,"custom_reply":"","refine_detail":{"clarify_reason":"","interact":"","option_list":[]},"say":"结果请查看地图","type":"satisfy"}],"msg":"ok","qu_res":{"candidates":[{"confidence":100.0,"domain_confidence":0.0,"extra_info":{"group_id":"5","real_threshold":"1","threshold":"0.7"},"from_who":"pow-slu-lev1","intent":"QUERYPOSITION","intent_confidence":100.0,"intent_need_clarify":false,"match_info":"{\"group_id\":\"5\",\"id\":\"739186\",\"match_keywords\":\" kw_querypositionyuqi:在哪里\",\"match_pattern\":\"[D:user_queryposition]\\t[D:kw_querypositionyuqi]\",\"ori_pattern\":\"[D:user_queryposition]\\t[D:kw_querypositionyuqi]\",\"ori_slots\":{\"confidence\":100.0,\"domain_confidence\":0.0,\"extra_info\":{},\"from_who\":\"smart_qu\",\"intent\":\"QUERYPOSITION\",\"intent_confidence\":100.0,\"intent_need_clarify\":false,\"match_info\":\"[D:user_queryposition] \\t[D:kw_querypositionyuqi] kw_querypositionyuqi:在哪里\",\"slots\":[{\"begin\":0,\"confidence\":100.0,\"father_idx\":-1,\"length\":4,\"name\":\"user_queryposition\",\"need_clarify\":false,\"normalized_word\":\"\",\"original_word\":\"电梯\",\"word_type\":\"\"},{\"begin\":4,\"confidence\":100.0,\"father_idx\":-1,\"length\":6,\"name\":\"kw_querypositionyuqi\",\"need_clarify\":false,\"normalized_word\":\"\",\"original_word\":\"在哪里\",\"word_type\":\"\"}]},\"real_threshold\":1.0,\"threshold\":0.6999999880790710}","slots":[{"begin":0,"confidence":100.0,"father_idx":-1,"length":2,"name":"user_queryposition","need_clarify":false,"normalized_word":"电梯","original_word":"电梯","word_type":""}]}],"lexical_analysis":[{"basic_word":["电梯"],"etypes":["[D:user_queryposition]"],"term":"电梯","type":"user_queryposition","weight":0.6080},{"basic_word":["在"],"etypes":[],"term":"在","type":"28","weight":0.130},{"basic_word":["哪里"],"etypes":["[D:COREF_LOCATION]","sys_coref_location","sys_coref_location"],"term":"哪里","type":"sys_coref_location","weight":0.260}],"qu_res_chosen":"{\"confidence\":100.0,\"domain_confidence\":0.0,\"extra_info\":{\"group_id\":\"5\",\"real_threshold\":\"1\",\"threshold\":\"0.7\"},\"from_who\":\"pow-slu-lev1\",\"intent\":\"QUERYPOSITION\",\"intent_confidence\":100.0,\"intent_need_clarify\":false,\"match_info\":\"{\\\"group_id\\\":\\\"5\\\",\\\"id\\\":\\\"739186\\\",\\\"match_keywords\\\":\\\" kw_querypositionyuqi:在哪里\\\",\\\"match_pattern\\\":\\\"[D:user_queryposition]\\\\t[D:kw_querypositionyuqi]\\\",\\\"ori_pattern\\\":\\\"[D:user_queryposition]\\\\t[D:kw_querypositionyuqi]\\\",\\\"ori_slots\\\":{\\\"confidence\\\":100.0,\\\"domain_confidence\\\":0.0,\\\"extra_info\\\":{},\\\"from_who\\\":\\\"smart_qu\\\",\\\"intent\\\":\\\"QUERYPOSITION\\\",\\\"intent_confidence\\\":100.0,\\\"intent_need_clarify\\\":false,\\\"match_info\\\":\\\"[D:user_queryposition] \\\\t[D:kw_querypositionyuqi] kw_querypositionyuqi:在哪里\\\",\\\"slots\\\":[{\\\"begin\\\":0,\\\"confidence\\\":100.0,\\\"father_idx\\\":-1,\\\"length\\\":4,\\\"name\\\":\\\"user_queryposition\\\",\\\"need_clarify\\\":false,\\\"normalized_word\\\":\\\"\\\",\\\"original_word\\\":\\\"电梯\\\",\\\"word_type\\\":\\\"\\\"},{\\\"begin\\\":4,\\\"confidence\\\":100.0,\\\"father_idx\\\":-1,\\\"length\\\":6,\\\"name\\\":\\\"kw_querypositionyuqi\\\",\\\"need_clarify\\\":false,\\\"normalized_word\\\":\\\"\\\",\\\"original_word\\\":\\\"在哪里\\\",\\\"word_type\\\":\\\"\\\"}]},\\\"real_threshold\\\":1.0,\\\"threshold\\\":0.6999999880790710}\",\"slots\":[{\"begin\":0,\"confidence\":100.0,\"father_idx\":-1,\"length\":4,\"name\":\"user_queryposition\",\"need_clarify\":false,\"normalized_word\":\"电梯\",\"original_word\":\"电梯\",\"word_type\":\"\"}]}\n","raw_query":"电梯在哪里","sentiment_analysis":{"label":"1","pval":0.9960},"status":0,"timestamp":0},"schema":{"domain_confidence":0.0,"intent":"QUERYPOSITION","intent_confidence":100.0,"slots":[{"begin":0,"confidence":100.0,"length":2,"merge_method":"updated","name":"user_queryposition","normalized_word":"电梯","original_word":"电梯","session_offset":0,"sub_slots":[],"word_type":""}]},"status":0},"timestamp":"2018-11-03 14:29:32.696"}],"session_id":"session-1541226572612-746135415-8013-490"}}     把这么多的玩意再次传回去。。 确定吗?
27
【小白终结帖】UNIT开发者必备学习资料大集合
Ta的回复 :多轮对话json有没有
34
C#调用bot时,多轮对话中,报282000错误
Ta的回复 :楼主解决没有
3
切换版块
智能客服