流式对话接口
更新时间:2024-11-04
流式对话接口
/core/v4/stream/query
接口说明
-
接口返回值答案answer字段解析:
- 若answerText存在值(下述两种方式任选其一): - 直接使用answer::answerText - 解析answer::answerContents列表,列表中答案类型根据具体type进行解析
- 若answerText不存在值: - 解析clarify字段
-
外呼/呼出类型agent对接:
- 会话开始时发起一次queryText为空的core/query接口请求,接口返回开场白节点欢迎语。
- 如果上层所有话术使用TTS播放,只需关注: answerText, 若answerText为空,则解析clarify。
- 会话中控接口请求状态为400情况下,错误说明如下:
code | msg | 说明 |
---|---|---|
4000019 | 用户请求过于频繁,请稍后再试 | qps大于阈值 |
4000647 | 当前agent不存在可用的会话引擎 | 无可用会话引擎 |
4002409 | bot token错误 | 非法bot token |
4002413 | 该bot已停用,请启用后再试 | bot已停用 |
4002010 | 包含敏感词,请检查 | 敏感词 |
4001104 | webhook接口返回答案类型不合法 | webhook服务错误 |
4000319 | 对话树配置的跳转存在死循环 | 对话树配置错误 |
4000346 | 会话引导异常,没有可以回退的场景,请检查开场白片段弱引导配置 | 引导配置错误 |
- 私有化部署时,7010和754以及后续版本调用会话中控接口时,如需生成会话记录,需要在请求接口时增加一个Header信息:
ACTIVE: online
接口地址
https://api-ngd.baidu.com/core/v4/stream/query
请求方法
POST
Header参数
名称 | 类型 | 必填 | 中文名 | 说明 |
---|---|---|---|---|
Authorization | string | 是 | token_info | 示例:NGD access_tokenaccess_token是bot的属性,通过bot管理列表获取,注意:字符“NGD”与access_token字符串中间有一空格 |
Uid | string | 否 | c 端用户id | |
Username | string | 否 | c 端用户名称 | |
ACTIVE | string | 否 | 调用环境 | online/offline 分别代表线上环境和测试环境公有云环境该参数不生效 |
请求参数说明
参数名 | 类型 | 必选 | 说明 |
---|---|---|---|
nlu | Boolean | 否 | 是否返回nlu识别信息(意图,实体,情感,态度) |
debug | Boolean | 否 | 是否打开调试模式,返回调试信息 |
queryId | String | 否 | 请求id,用于出现问题时快速定位排查,不传则系统生成uuid;建议用户设置,语音场景可能因为超时,丢失answer信息,通过请求query指定queryId,方便问题排查 |
POST body参数说明
参数名 | 类型 | 必选 | 说明 |
---|---|---|---|
queryText | String | 是 | 请求文本 |
sessionId | String | 否 | 会话id。 可不传值,由会话机器人生成; 若传值,使用业务方传入的sessionId,用户传入的sessionId必须保证唯一,如UUID. |
sources | List | 否 | 对话模式: 1. task_based:多轮 2. kg:知识图谱 3. faq:问答 4. chitchat:闲聊 5. 空或无该字段为智能对话 |
channel | String | 否 | 渠道信息,整个session周期固定 |
context | Map | 否 | 上下文信息。与当前的会话session中的上下文进行合并,若存在key冲突,以传入的key为准 |
collect | Boolean | 否 | 是否收集会话数据,用于用户标注。默认为false |
vad | String | 否 | 系统指令: silent:静默 interrupt:打断 |
ext | Map | 否 | 调用方回传参数,格式为json,数据不做处理用来后期分析使用; 示例:调用会话时传入{ "uid",001 } 会话日志中ext将会存储该信息用于后期分析。 |
返回参数说明
参数名 | 类型 | 说明 |
---|---|---|
code | int | 错误码 |
msg | String | 错误信息 |
data | Map<String, Object> | 返回答案的详细信息 |
data:
参数名 | 类型 | 说明 |
---|---|---|
sessionId | String | 会话id |
queryId | String | 请求id |
source | String | 会话模式(faq,task_based,chitchat,kg,clarify(澄清),none(澄清失败、系统默认回复等),auto_fill(实体自动填充),system(bot系统事件)、botEvent(bot自定义事件)第三方引擎ID、技能ID) |
solved | Boolean | 指定会话模式是否有答案.(多轮会话中,命中顶层节点且节点条件为anything_else,solved为false) |
confidence | Double | 相似度 |
nlu | Map | 当前query的nlu识别信息 |
answer | Map | 回复答案 |
queryTime | String | 请求时间,格式:yyyy-MM-dd HH:mm:ss:SSS |
responseTime | String | 响应时间,格式:yyyy-MM-dd HH:mm:ss:SS |
context | Map | 会话上下文信息 |
associateData | Map | 随路数据收集 |
actions | List |
透传的指令,如打断(interrupted ) |
webhook | Boolean | 是否使用webhook |
topAnythingElse | Boolean | 多轮是否命中顶层anythingElse节点 |
anythingElse | Boolean | 多轮是否命中anythingElse节点 |
debug | Map | 调试信息(开启debug模式后才会有值) |
flowOutput | Boolean | flowOutput = true:流式回复flowOutput = false:非流式回复(主要是富文本类型) |
nlu:
参数名 | 类型 | 说明 |
---|---|---|
intents | List | 识别的意图列表(格式同:debug → intents) |
entities | Map | 识别的实体列表(格式同:debug → entities) |
attitude | Map | 态度详情(格式同:debug → attitude) |
sentiment | Map | 情感详情(格式同:debug → sentiment) |
action | Map | 动作详情(格式同:debug → action) |
answer:
参数名 | 类型 | 说明 |
---|---|---|
clarify | Map | 澄清答案 |
clarifyType | String | 意图澄清:INTENT_CLARIFY 问答澄清:FAQ_CLARIFY 意图问答澄清:INTENT_FAQ_CLARIFY faq高置信度澄清:FAQ_HIGH_CLARIFY 问答核心词澄清:FAQ_CORE_CLARIFY 意图模版澄清:TEMPLATE_INTENT_CLARIFY 问答模版澄清:TEMPLATE_FAQ_CLARIFY 意图问答模版澄清:TEMPLATE_INTENT_FAQ_CLARIFY KG澄清:KG_CLARIFY 实体澄清:ENTITY_CLARIFY 第三方引擎澄清:THIRD_CLARIFY 技能澄清:SKILL_CLARIFY |
answerContents | List | 答案列表,元素类型有:1: 纯文本类型,2: link类型,3: 富文本类型,4: 图片类型,6: 录音类型,7: 录音拼变量类型,8: 列表类型 |
answerText | String | 根据answerContents列表拼接的文本推荐答案) |
recommendContents | List | 推荐答案列表,元素类型:8: 列表类型 |
clarify:
参数名 | 类型 | 说明 |
---|---|---|
voice | Map | 语音回复 |
text | Map | 文字回复 |
voice:
参数名 | 类型 | 说明 |
---|---|---|
content | String | 澄清语句 |
text:
参数名 | 类型 | 说明 |
---|---|---|
title | String | 澄清标题 |
list | List | 澄清问题列表 |
answerContents:
type: 1,纯文本类型
参数名 | 类型 | 说明 |
---|---|---|
type | int | 回复内容类型 1:纯文本 |
text | String | 回复内容 |
type: 2,link类型
参数名 | 类型 | 说明 |
---|---|---|
type | int | 回复内容类型 2:link |
text | String | 回复内容 |
url | String | url |
type: 3,富文本类型
参数名 | 类型 | 说明 |
---|---|---|
type | int | 回复内容类型 3:富文本 |
text | String | 富文本回复内容 |
type: 4,图片类型
参数名 | 类型 | 说明 |
---|---|---|
type | int | 回复内容类型 4:图片 |
url | String | 图片url |
type: 6,录音类型
参数名 | 类型 | 说明 |
---|---|---|
type | int | 回复内容类型 6:录音 |
audio | Map | 录音内容 |
audio:
参数名 | 类型 | 说明 |
---|---|---|
duration | int | 录音时长 |
name | String | 录音文件名称 |
id | String | 录音文件id |
text | String | 录音内容文本 |
url | String | 录音url |
textModify | String | 修改后的录音内容 |
type: 7,录音拼变量
参数名 | 类型 | 说明 |
---|---|---|
type | int | 回复内容类型 7:录音拼变量 |
values | List | 回复内容列表,列表中元素由类型6与类型1组成,即录音类型与文本类型组成 |
type: 8,列表类型
参数名 | 类型 | 说明 |
---|---|---|
type | int | 回复内容类型 8:列表类型 |
title | String | 回复标题 |
list | List< String> | 回复列表 |
debug:
参数名 | 类型 | 说明 |
---|---|---|
botId | String | 会话bot的id |
queryId | String | 请求id |
nlu | Map | nlu分析当前query的详细结果 |
detail | Map | debug信息详情 |
nlu:
参数名 | 类型 | 说明 |
---|---|---|
rawQuery | String | 原始query |
nluQuery | String | nlu识别的query |
nluChangedQuery | String | nlu上下文改写后的query |
nluCorrectedQuery | String | nlu纠错后的query |
intents | List | 识别的意图列表 |
clarifyIntents | List | 识别的澄清意图 |
clarifyTemplates | List | 识别的澄清模版意图 |
entities | Map | 识别的实体列表 |
clarifyEntities | Map | 识别的实体澄清列表 |
attitude | Map | 态度详情 |
sentiment | Map | 情感详情 |
action | Map | 动作详情 |
entityAutoFillVoMap | Map | 复合实体填充信息 |
sensitiveWordsList | List<SensitiveVo> | 敏感词详情 |
intents/clarifyIntents/clarifyTemplates:
参数名 | 类型 | 说明 |
---|---|---|
id | String | 意图id |
name | String | 意图标识 |
nameZh | String | 意图中文名称 |
description | String | 意图描述 |
system | String | 是否系统意图 |
source | String | 算法名称 |
alias | String | 意图别名 |
templateStr | String | 模版字符串 |
attitude:
参数名 | 类型 | 说明 |
---|---|---|
prob | String | 置信度 |
source | String | 识别模型 |
name | String | 态度标识 |
nameZh | String | 态度中文名 |
sentiment:
参数名 | 类型 | 说明 |
---|---|---|
prob | String | 置信度 |
source | String | 识别模型 |
name | String | 情感标识 |
nameZh | String | 情感中文名 |
action:
参数名 | 类型 | 说明 |
---|---|---|
prob | String | 置信度 |
source | String | 识别模型 |
name | String | 动作标识 |
nameZh | String | 动作中文名 |
SensitiveVo:
参数名 | 类型 | 说明 |
---|---|---|
sensitiveWord | String | 敏感词 |
repositoryName | String | 所属词库 |
detail:
多轮 task_based模式:
参数名 | 类型 | 说明 |
---|---|---|
dialogs | List | 触发会话树节点详情 |
confidence | Double | 置信度 |
nlu | Map | 答案对应的nlu结果(结构同 debug-->nlu) |
lastNodeId | String | 最近一次触发的会话树节点id |
dialogs:
参数名 | 类型 | 说明 |
---|---|---|
dialogNodeId | String | 会话树节点id |
dialogNodeName | String | 会话树节点名 |
processId | String | 流程片段id |
processName | String | 流程片段名 |
outputIndex | int | 执行模块下标 |
values | List | 当前会话树节点回复内容的格式配置 |
jumpBackValues | String | 外呼当前会话树节点跳回话术格式配置(字段格式和values⼀致) |
webhook | Boolean | 是否使用webhook |
action | String | 指令 |
webhookInfo | Map | webhook接口调用结果 |
tags | List | 节点标签 |
知识图谱 kg模式:
参数名 | 类型 | 说明 |
---|---|---|
nlpSessionId | String | KG_DM的会话id |
confidence | Double | 置信度 |
type | String | 答案类型。 SATISFY("satisfy", "答上来了") CLARIFY("clarify", "需要澄清") FAILURE("failure", "没答上来") |
sayText | String | 答案话术 |
kgPatternType | String | 句式类型 |
kgClassName | String | 类目名称 |
kgPropertyName | String 属性名称 | |
kgPropertyArray | String 属性名称多值 | |
kgModQueryText | String | 改写后的Query |
kgQueryPattern | String | 句式pattern |
values | List | 回复内容(格式与answer → answerContents格式一致) |
问答 faq模式:
参数名 | 类型 | 说明 |
---|---|---|
id | String | 标准问ID |
standardQuestion | String | 标准问问题 |
confidence | double | 相似度 |
extendQuestion | String | 扩展问问题 |
suggest | List< String> | 关联问题列表 |
answer | Map | 答案详情 |
answer 答案详情
参数名 | 类型 | 说明 |
---|---|---|
type | int | 答案类别: 1:纯文本 3:富文本(html tag) 4:pic url link 6:audio |
text | String | type为1或3时使用,回复内容 |
url | String | type为4时使用,图片url |
audio | Map | type为6时使用,录音回复内容,(格式与suggestionAnswers → answerValues中的录音类型格式一致) |
闲聊 chitchat模式:
参数名 | 类型 | 说明 |
---|---|---|
id | String | 标准问ID |
standardQuestion | String | 标准问问题 |
extendQuestion | String | 扩展问问题 |
confidence | double | 相似度 |
answer | Map | 答案详情 |
answer 答案详情:
参数名 | 类型 | 说明 |
---|---|---|
type | int | 答案类别 1:纯文本 |
text | String | 回复内容 |
自动填充 auto_fill模式:
参数名 | 类型 | 说明 |
---|---|---|
entityAutoFill | Map | 复合实体自动填充 |
entityAutoFill:
参数名 | 类型 | 说明 |
---|---|---|
entityAutoFillVo | Map | 复合实体自动填充 |
entityAutoFillName | String | 自动填充实体 |
fillText | String | 自动填充文本 |
entityAutoFillVo:
参数名 | 类型 | 说明 |
---|---|---|
entity | Map | 复合实体自动填充 |
entityFillType | int | 实体填充类型 |
propertyVoMap | Map | 属性详情列表 |
propertyNames | List |
属性名称列表 |
currentFillVo | Map | 当前填充话术 |
entity:
参数名 | 类型 | 说明 |
---|---|---|
entityId | String | 实体id |
entryId | String | 实体值id |
value | String | 实体值 |
original | String | 实体原始值 |
name | String | 实体名称 |
nameZh | String | 实体中文名称 |
subName | String | 实体子名称 |
offset | int | 偏移量 |
system | Boolean | 是否系统实体 |
display | String | 实体显示值 |
type | int | 实体类型 |
combineValue | String | 复合实体组合值 |
extra | Map | 扩展属性 |
currentFillVo:
参数名 | 类型 | 说明 |
---|---|---|
propertyName | String | 属性名称 |
fillText | String | 填充话术 |
澄清 clarify模式:
参数名 | 类型 | 说明 |
---|---|---|
clarifyType | String | 澄清类型 |
clarifyQuestions | Map | 澄清 |
entityClarify | Map | 实体澄清 |
keywordConfirmQuestions | List | 模版澄清 |
highConfirmQuestions | List | 高置信度澄清 |
keywordConfirmQuestions/highConfirmQuestions:
参数名 | 类型 | 说明 |
---|---|---|
sore | String | 分值 |
clickable | Map | 是否可点击 |
source | Map | 来源 |
question | List | 澄清内容 |
bot系统事件模式:
参数名 | 类型 | 说明 |
---|---|---|
name | String | 策略名称 |
index | int | 策略序号 |
count | int | 当前计数次数 |
reply | Map | 策略配置 |
reply 策略配置:
参数名 | 类型 | 说明 |
---|---|---|
count | int | 当前计数次数 |
symbol | String | 策略符号,例如:>,<等 |
isWebhook | boolean | 是否启用webhook |
action | String | 指令 |
type | int | 返回答案类型 |
text | String | 文本返回答案内容,type为1时使用 |
audio | Map | 录音返回答案内容,type为6时使用,格式同:faq-→ answer→ audio |
bot自定义事件模式:
参数名 | 类型 | 说明 |
---|---|---|
name | String | 事件名称 |
values | Map | 当前会话节点回复内容格式配置 |
webhook | Boolean | 是否使用webhook |
action | String | 指令 |
interrupted | Boolean | 打断标识 |
outputIndex | int | 执行策略序号 |
nlu | Map | nlu信息 |
技能模式:
参数名 | 类型 | 说明 |
---|---|---|
skillInfo | SkillInfo | 技能信息 |
engineInfo | Map | 技能命中的某个引擎调试信息(task_based、faq等),详见上述相关字段 |
SkillInfo:
参数名 | 类型 | 说明 |
---|---|---|
skill | boolean | 是否是技能 |
skillName | String | 技能名 |
skillId | String | 技能Id |
sourceAgentId | String | 共享agentId |
shareAgentId | String | 当前使用agentId |
originSource | String | 对应资源命中的引擎名(task_based、faq等) |
answerInterventionRules:
参数名 | 类型 | 说明 |
---|---|---|
name | String | 干预规则名称 |
type | int | 干预规则类型: 1:全部替换 2:增加前后缀 |
valueMaps | Map | 规则内容 |
valueMaps(type=1):
参数名 | 类型 | 说明 |
---|---|---|
values | Map | 全文,见上文values答案描述介绍 |
valueMaps(type=2):
参数名 | 类型 | 说明 |
---|---|---|
prefixValues | Map | 前缀,见上文values答案描述介绍 |
suffixValues | Map | 后缀,见上文values答案描述介绍 |
appendAnswers:
参数名 | 类型 | 说明 |
---|---|---|
type | int | 回复类型: 1:文本 6:语音 7:录音拼变量 (更多type详见answer:dialogs:values参数描述) |
text/audio/values | String/Map/List | 外呼类型机器人跳回话术回复内容 |
请求示例
curl 'https://api-ngd.baidu.com/ngd/core/v4/stream/query?debug=true' \
-H 'Authorization: NGD 75676418-a574-44b8-8d27-a0bc79f2224c' \
-H 'Content-Type: application/json;charset=UTF-8' \
-H 'requestFrom: NGD' \
--data-raw '{"queryText":"海淀公园","sessionId":"eb653f94-d9ff-412b-9cdb-7693cc1013df","collect":false,"sources":null,"vad":null}' \
--compressed
响应结果示例
{"flowOutput":true,"fluxAnswer":{"prefetch":256,"scanAvailable":true},"queryId":"12b91ac0-42a5-4e70-9bad-80f16ea59fde","sessionId":"eb653f94-d9ff-412b-9cdb-7693cc1013df","source":"largeModel","solved":false,"confidence":0.0,"answer":{"answerText":"海淀公园位于北京西北四环万泉河立交桥的西","answerContents":[{"original":"海淀公园位于北京西北四环万泉河立交桥的西","text":"海淀公园位于北京西北四环万泉河立交桥的西","type":1}],"recommendContents":[]},"queryTime":"2023-08-09 14:55:02:853","answerTime":"2023-08-09 14:55:02:955","actions":[],"webhook":false,"topAnythingElse":false,"anythingElse":false,"debug":{"botName":"bot111","nlu":{"clarifyEntities":{},"sentiment":{"query":"海淀公园","label":0,"prob":0.9944125,"source":"model","name":"neutral","nameZh":"中立","recSource":null},"intents":[],"nluQuery":"海淀公园","clarifyIntents":[],"clarifyTemplates":[],"nluCorrectedQuery":null,"entities":{},"nluChangedQuery":null,"action":null,"sensitiveWordsList":[],"entityAutoFillVoMap":null,"attitude":{"query":"海淀公园","label":0,"prob":1.0,"source":"model","name":"unknown","nameZh":"无态度","recSource":null},"rawQuery":"海淀公园"},"botId":"c19d51a0-4dc5-4c82-9faa-8ad038964d8a","detail":{"answerInterventionRules":null,"appendAnswers":null,"name":"unMatch","reply":{"symbol":null,"count":0,"type":1,"text":"抱歉,我不太理解您的意思","audio":null,"isWebhook":false,"action":null,"actionName":null}},"queryId":"12b91ac0-42a5-4e70-9bad-80f16ea59fde"},"dialogSceneStatus":"exception"}
{"flowOutput":true,"fluxAnswer":{"prefetch":256,"scanAvailable":true},"queryId":"12b91ac0-42a5-4e70-9bad-80f16ea59fde","sessionId":"eb653f94-d9ff-412b-9cdb-7693cc1013df","source":"largeModel","solved":false,"confidence":0.0,"answer":{"answerText":"北角,东起万泉河路,西至万柳中路,南到西","answerContents":[{"original":"北角,东起万泉河路,西至万柳中路,南到西","text":"北角,东起万泉河路,西至万柳中路,南到西","type":1}],"recommendContents":[]},"queryTime":"2023-08-09 14:55:02:853","answerTime":"2023-08-09 14:55:02:955","actions":[],"webhook":false,"topAnythingElse":false,"anythingElse":false,"debug":{"botName":"bot111","nlu":{"clarifyEntities":{},"sentiment":{"query":"海淀公园","label":0,"prob":0.9944125,"source":"model","name":"neutral","nameZh":"中立","recSource":null},"intents":[],"nluQuery":"海淀公园","clarifyIntents":[],"clarifyTemplates":[],"nluCorrectedQuery":null,"entities":{},"nluChangedQuery":null,"action":null,"sensitiveWordsList":[],"entityAutoFillVoMap":null,"attitude":{"query":"海淀公园","label":0,"prob":1.0,"source":"model","name":"unknown","nameZh":"无态度","recSource":null},"rawQuery":"海淀公园"},"botId":"c19d51a0-4dc5-4c82-9faa-8ad038964d8a","detail":{"answerInterventionRules":null,"appendAnswers":null,"name":"unMatch","reply":{"symbol":null,"count":0,"type":1,"text":"抱歉,我不太理解您的意思","audio":null,"isWebhook":false,"action":null,"actionName":null}},"queryId":"12b91ac0-42a5-4e70-9bad-80f16ea59fde"},"dialogSceneStatus":"exception"}
{"flowOutput":true,"fluxAnswer":{"prefetch":256,"scanAvailable":true},"queryId":"12b91ac0-42a5-4e70-9bad-80f16ea59fde","sessionId":"eb653f94-d9ff-412b-9cdb-7693cc1013df","source":"largeModel","solved":false,"confidence":0.0,"answer":{"answerText":"北四环路,北至新建宫门路,东邻中关村科技","answerContents":[{"original":"北四环路,北至新建宫门路,东邻中关村科技","text":"北四环路,北至新建宫门路,东邻中关村科技","type":1}],"recommendContents":[]},"queryTime":"2023-08-09 14:55:02:853","answerTime":"2023-08-09 14:55:02:955","actions":[],"webhook":false,"topAnythingElse":false,"anythingElse":false,"debug":{"botName":"bot111","nlu":{"clarifyEntities":{},"sentiment":{"query":"海淀公园","label":0,"prob":0.9944125,"source":"model","name":"neutral","nameZh":"中立","recSource":null},"intents":[],"nluQuery":"海淀公园","clarifyIntents":[],"clarifyTemplates":[],"nluCorrectedQuery":null,"entities":{},"nluChangedQuery":null,"action":null,"sensitiveWordsList":[],"entityAutoFillVoMap":null,"attitude":{"query":"海淀公园","label":0,"prob":1.0,"source":"model","name":"unknown","nameZh":"无态度","recSource":null},"rawQuery":"海淀公园"},"botId":"c19d51a0-4dc5-4c82-9faa-8ad038964d8a","detail":{"answerInterventionRules":null,"appendAnswers":null,"name":"unMatch","reply":{"symbol":null,"count":0,"type":1,"text":"抱歉,我不太理解您的意思","audio":null,"isWebhook":false,"action":null,"actionName":null}},"queryId":"12b91ac0-42a5-4e70-9bad-80f16ea59fde"},"dialogSceneStatus":"exception"}
{"flowOutput":true,"fluxAnswer":{"prefetch":256,"scanAvailable":true},"queryId":"12b91ac0-42a5-4e70-9bad-80f16ea59fde","sessionId":"eb653f94-d9ff-412b-9cdb-7693cc1013df","source":"largeModel","solved":false,"confidence":0.0,"answer":{"answerText":"园区,毗邻清华大学、北京大学,面积约34公顷,是历史上北","answerContents":[{"original":"园区,毗邻清华大学、北京大学,面积约34公顷,是历史上北","text":"园区,毗邻清华大学、北京大学,面积约34公顷,是历史上北","type":1}],"recommendContents":[]},"queryTime":"2023-08-09 14:55:02:853","answerTime":"2023-08-09 14:55:02:955","actions":[],"webhook":false,"topAnythingElse":false,"anythingElse":false,"debug":{"botName":"bot111","nlu":{"clarifyEntities":{},"sentiment":{"query":"海淀公园","label":0,"prob":0.9944125,"source":"model","name":"neutral","nameZh":"中立","recSource":null},"intents":[],"nluQuery":"海淀公园","clarifyIntents":[],"clarifyTemplates":[],"nluCorrectedQuery":null,"entities":{},"nluChangedQuery":null,"action":null,"sensitiveWordsList":[],"entityAutoFillVoMap":null,"attitude":{"query":"海淀公园","label":0,"prob":1.0,"source":"model","name":"unknown","nameZh":"无态度","recSource":null},"rawQuery":"海淀公园"},"botId":"c19d51a0-4dc5-4c82-9faa-8ad038964d8a","detail":{"answerInterventionRules":null,"appendAnswers":null,"name":"unMatch","reply":{"symbol":null,"count":0,"type":1,"text":"抱歉,我不太理解您的意思","audio":null,"isWebhook":false,"action":null,"actionName":null}},"queryId":"12b91ac0-42a5-4e70-9bad-80f16ea59fde"},"dialogSceneStatus":"exception"}
{"flowOutput":true,"fluxAnswer":{"prefetch":256,"scanAvailable":true},"queryId":"12b91ac0-42a5-4e70-9bad-80f16ea59fde","sessionId":"eb653f94-d9ff-412b-9cdb-7693cc1013df","source":"largeModel","solved":false,"confidence":0.0,"answer":{"answerText":"京三山五园之一—畅春园的遗址,也是百度与","answerContents":[{"original":"京三山五园之一—畅春园的遗址,也是百度与","text":"京三山五园之一—畅春园的遗址,也是百度与","type":1}],"recommendContents":[]},"queryTime":"2023-08-09 14:55:02:853","answerTime":"2023-08-09 14:55:02:955","actions":[],"webhook":false,"topAnythingElse":false,"anythingElse":false,"debug":{"botName":"bot111","nlu":{"clarifyEntities":{},"sentiment":{"query":"海淀公园","label":0,"prob":0.9944125,"source":"model","name":"neutral","nameZh":"中立","recSource":null},"intents":[],"nluQuery":"海淀公园","clarifyIntents":[],"clarifyTemplates":[],"nluCorrectedQuery":null,"entities":{},"nluChangedQuery":null,"action":null,"sensitiveWordsList":[],"entityAutoFillVoMap":null,"attitude":{"query":"海淀公园","label":0,"prob":1.0,"source":"model","name":"unknown","nameZh":"无态度","recSource":null},"rawQuery":"海淀公园"},"botId":"c19d51a0-4dc5-4c82-9faa-8ad038964d8a","detail":{"answerInterventionRules":null,"appendAnswers":null,"name":"unMatch","reply":{"symbol":null,"count":0,"type":1,"text":"抱歉,我不太理解您的意思","audio":null,"isWebhook":false,"action":null,"actionName":null}},"queryId":"12b91ac0-42a5-4e70-9bad-80f16ea59fde"},"dialogSceneStatus":"exception"}
{"flowOutput":true,"fluxAnswer":{"prefetch":256,"scanAvailable":true},"queryId":"12b91ac0-42a5-4e70-9bad-80f16ea59fde","sessionId":"eb653f94-d9ff-412b-9cdb-7693cc1013df","source":"largeModel","solved":false,"confidence":0.0,"answer":{"answerText":"海淀区共建的全球首个AI公园。","answerContents":[{"original":"海淀区共建的全球首个AI公园。","text":"海淀区共建的全球首个AI公园。","type":1}],"recommendContents":[]},"queryTime":"2023-08-09 14:55:02:853","answerTime":"2023-08-09 14:55:02:955","actions":[],"webhook":false,"topAnythingElse":false,"anythingElse":false,"debug":{"botName":"bot111","nlu":{"clarifyEntities":{},"sentiment":{"query":"海淀公园","label":0,"prob":0.9944125,"source":"model","name":"neutral","nameZh":"中立","recSource":null},"intents":[],"nluQuery":"海淀公园","clarifyIntents":[],"clarifyTemplates":[],"nluCorrectedQuery":null,"entities":{},"nluChangedQuery":null,"action":null,"sensitiveWordsList":[],"entityAutoFillVoMap":null,"attitude":{"query":"海淀公园","label":0,"prob":1.0,"source":"model","name":"unknown","nameZh":"无态度","recSource":null},"rawQuery":"海淀公园"},"botId":"c19d51a0-4dc5-4c82-9faa-8ad038964d8a","detail":{"answerInterventionRules":null,"appendAnswers":null,"name":"unMatch","reply":{"symbol":null,"count":0,"type":1,"text":"抱歉,我不太理解您的意思","audio":null,"isWebhook":false,"action":null,"actionName":null}},"queryId":"12b91ac0-42a5-4e70-9bad-80f16ea59fde"},"dialogSceneStatus":"exception"}
任务式会话
{
"time": 1586486514896,
"data": {
"sessionId": "11c8cddd-3d0c-493e-a33f-9a02ae5f99e5",
"source": "task_based",
"solved": true,
"confidence": 1,
"nlu": {
"sentiment": {
"query": "租车",
"label": 0,
"prob": 0.97234964,
"source": "model",
"name": "neutral",
"nameZh": "中立"
},
"intents": [
{
"id": "e5304670-6841-40f6-ba49-11bbca32c6a8",
"name": "rental",
"description": "",
"agentId": null,
"created": null,
"updated": null,
"confidence": 1,
"source": "knn",
"threshold": 0,
"system": false,
"alias": "",
"nameZh": "租车",
"examples": null,
"hasActiveCopy": false,
"templateStr": null,
"createdUserName": null,
"createdUserId": null,
"lastEditUserName": null,
"lastEditUserId": null,
"version": 0,
"industryIntent": false
}
],
"entities": {},
"attitude": {
"query": "租车",
"label": 0,
"prob": 1,
"source": "model",
"name": "unknown",
"nameZh": "无态度"
}
},
"answer": {
"answerText": "指令级别的兜底话术请输入车型",
"answerContents": [
{
"original": "指令级别的兜底话术",
"text": "指令级别的兜底话术",
"type": 1
},
{
"type": 1,
"text": "请输入车型",
"original": "请输入车型"
}
]
},
"context": {
"sys_counter": {
"租车": 1,
"检查车型实体节点_qwpg1bhv": 1
},
"api_response_status": false,
"sys_webhook_eval_success": false
},
"associateData": {},
"actions": [
"aciton"
],
"webhook": true,
"debug": {
"responseTime": "2020-04-10 10:41:54:896",
"nlu": {
"clarifyEntities": {},
"sentiment": {
"query": "租车",
"label": 0,
"prob": 0.97234964,
"source": "model",
"name": "neutral",
"nameZh": "中立"
},
"intents": [
{
"id": "e5304670-6841-40f6-ba49-11bbca32c6a8",
"name": "rental",
"description": "",
"agentId": null,
"created": null,
"updated": null,
"confidence": 1,
"source": "knn",
"threshold": 0,
"system": false,
"alias": "",
"nameZh": "租车",
"examples": null,
"hasActiveCopy": false,
"templateStr": null,
"createdUserName": null,
"createdUserId": null,
"lastEditUserName": null,
"lastEditUserId": null,
"version": 0,
"industryIntent": false
}
],
"nluQuery": "租车",
"entities": {},
"clarifyIntents": [],
"clarifyTemplates": [],
"attitude": {
"query": "租车",
"label": 0,
"prob": 1,
"source": "model",
"name": "unknown",
"nameZh": "无态度"
},
"rawQuery": "租车"
},
"queryTime": "2020-04-10 10:41:49:860",
"botId": "b4762b99-d0df-4d51-bb70-38000b5b3f79",
"detail": {
"nlu": {
"clarifyEntities": {},
"sentiment": {
"query": "租车",
"label": 0,
"prob": 0.97234964,
"source": "model",
"name": "neutral",
"nameZh": "中立"
},
"intents": {
"id": "e5304670-6841-40f6-ba49-11bbca32c6a8",
"name": "rental",
"description": "",
"agentId": null,
"created": null,
"updated": null,
"confidence": 1,
"source": "knn",
"threshold": 0,
"system": false,
"alias": "",
"nameZh": "租车",
"examples": null,
"hasActiveCopy": false,
"templateStr": null,
"createdUserName": null,
"createdUserId": null,
"lastEditUserName": null,
"lastEditUserId": null,
"version": 0,
"industryIntent": false
},
"nluQuery": "租车",
"entities": {},
"clarifyIntents": [],
"clarifyTemplates": [],
"source": "knn",
"attitude": {
"query": "租车",
"label": 0,
"prob": 1,
"source": "model",
"name": "unknown",
"nameZh": "无态度"
},
"rawQuery": "租车"
},
"confidence": 1,
"lastNodeId": "",
"dialogs": [
{
"dialogNodeName": "租车",
"webhook": true,
"values": {
"original": "指令级别的兜底话术",
"text": "指令级别的兜底话术",
"type": 1
},
"description": null,
"dialogNodeId": "3d2cdfb3-9158-4980-b78d-bb77586b1937",
"processVersion": 4,
"isBackTrack": false,
"endNode": false,
"outputIndex": 1,
"processId": "b229f5ec-5fe8-4401-8df3-9d329a69c329",
"processName": "fanlh",
"action": "aciton",
"processType": 0,
"isResult": false,
"value": "指令级别的兜底话术"
},
{
"dialogNodeName": "检查车型实体节点_qwpg1bhv",
"webhook": false,
"values": {
"type": 1,
"text": "请输入车型",
"original": "请输入车型"
},
"description": "检查车型实体节点",
"dialogNodeId": "b017e30c-3550-4fce-be32-f09d84d1dce1",
"processVersion": 4,
"isBackTrack": false,
"endNode": false,
"outputIndex": 1,
"processId": "b229f5ec-5fe8-4401-8df3-9d329a69c329",
"processName": "fanlh",
"processType": 0,
"isResult": false,
"value": "请输入车型"
}
]
},
"queryId": "05903c5c-54b6-4565-8a27-c6d19fce01b2"
},
"code": 200,
"msg": "OK"
}
}
Faq:
{
"time": 1586499361098,
"data": {
"sessionId": "11c8cddd-3d0c-493e-a33f-9a02ae5f99e5",
"source": "faq",
"solved": true,
"confidence": 1,
"nlu": {
"sentiment": {
"query": "问答吗",
"label": 0,
"prob": 0.9999976,
"source": "model",
"name": "neutral",
"nameZh": "中立"
},
"intents": [],
"entities": {},
"attitude": {
"query": "问答吗",
"label": 0,
"prob": 0.9965682,
"source": "model",
"name": "unknown",
"nameZh": "无态度"
}
},
"answer": {
"answerText": "是的 这里是问答",
"answerContents": [
{
"original": "是的 这里是问答",
"text": "是的 这里是问答",
"type": 1
}
]
},
"context": {},
"webhook": false,
"debug": {
"responseTime": "2020-04-10 14:16:01:098",
"nlu": {
"clarifyEntities": {},
"sentiment": {
"query": "问答吗",
"label": 0,
"prob": 0.9999976,
"source": "model",
"name": "neutral",
"nameZh": "中立"
},
"intents": [],
"nluQuery": "问答吗",
"entities": {},
"clarifyIntents": [],
"clarifyTemplates": [],
"attitude": {
"query": "问答吗",
"label": 0,
"prob": 0.9965682,
"source": "model",
"name": "unknown",
"nameZh": "无态度"
},
"rawQuery": "问答吗"
},
"queryTime": "2020-04-10 14:15:58:132",
"botId": "b4762b99-d0df-4d51-bb70-38000b5b3f79",
"detail": {
"standardQuestion": "这里是问答吗?",
"extentQuestion": "问答吗?",
"answer": {
"original": "是的 这里是问答",
"text": "是的 这里是问答",
"type": 1
},
"confidence": 1,
"id": "12837cac-215b-4d41-81cb-16636ab5a21d",
"suggest": []
},
"queryId": "49d7f755-7c92-4489-be9c-42924ca25083"
}
},
"code": 200,
"msg": "OK"
}
澄清:
{
"queryId": "87aff1df-9517-499a-a09d-c0208187473e",
"sessionId": "6cd8cd6a-ceff-4714-b39f-90313d0ee8bb",
"source": "clarify",
"solved": true,
"confidence": 0,
"answer": {
"clarify": {
"voice": "请问您想问的是租个车吗?",
"text": {
"title": "请问您想咨询的是?",
"list": [
"租个车"
]
}
},
"clarifyType": "INTENT_CLARIFY"
},
"queryTime": "2021-08-16 16:14:12:787",
"answerTime": "2021-08-16 16:14:13:241",
"actions": [],
"webhook": false,
"topAnythingElse": false,
"anythingElse": false,
"debug": {
"botName": "call_in_bot",
"nlu": {
"clarifyEntities": {},
"sentiment": {
"query": "车",
"label": 0,
"prob": 0.9802588,
"source": "model",
"name": "neutral",
"nameZh": "中立"
},
"intents": [],
"nluQuery": "车",
"clarifyIntents": [
{
"_effect": 0,
"id": "23bba558-79a6-4507-82c2-33d66a310f12",
"name": "car_rental",
"description": "",
"agentId": null,
"created": null,
"updated": null,
"confidence": 0.717866837978363,
"source": "knn",
"threshold": 0,
"system": false,
"needClarify": false,
"alias": "租个车",
"nameZh": "租车",
"examples": null,
"hasActiveCopy": false,
"templateStr": null,
"createdUserName": null,
"createdUserId": null,
"lastEditUserName": null,
"lastEditUserId": null,
"version": 0,
"industryIntent": false,
"knnExampleStr": "租车",
"noResponse": false
}
],
"clarifyTemplates": [],
"nluCorrectedQuery": null,
"entities": {},
"nluChangedQuery": null,
"action": null,
"sensitiveWordsList": [],
"entityAutoFillVoMap": null,
"attitude": {
"query": "车",
"label": 0,
"prob": 1,
"source": "model",
"name": "unknown",
"nameZh": "无态度"
},
"rawQuery": "车"
},
"botId": "c46e1b75-bf24-4562-aa88-834243aecf86",
"detail": {
"clarifyType": "INTENT_CLARIFY",
"answerInterventionRules": null,
"appendAnswers": null,
"confirmQuestions": [
{
"score": 0.717866837978363,
"clickable": true,
"source": "task_based",
"question": "租个车",
"faqId": null
}
],
"clarifyTypeDesc": "意图澄清",
"highConfirmQuestions": null,
"clarifyQuestions": {
"voice": "请问您想问的是租个车吗?",
"text": {
"title": "请问您想咨询的是?",
"list": [
"租个车"
]
}
},
"keywordConfirmQuestions": null,
"entityClarify": null
},
"queryId": "87aff1df-9517-499a-a09d-c0208187473e"
}
}
闲聊:
{
"time": 1586502732524,
"data": {
"sessionId": "11c8cddd-3d0c-493e-a33f-9a02ae5f99e5",
"source": "chitchat",
"solved": true,
"confidence": 1,
"nlu": {
"sentiment": {
"query": "闲聊吗",
"label": 0,
"prob": 0.9999223,
"source": "model",
"name": "neutral",
"nameZh": "中立"
},
"intents": [],
"entities": {},
"attitude": {
"query": "闲聊吗",
"label": 0,
"prob": 0.9947141,
"source": "model",
"name": "unknown",
"nameZh": "无态度"
}
},
"answer": {
"answerText": "这是闲聊",
"answerContents": [
{
"type": 1,
"text": "这是闲聊"
}
]
},
"debug": {
"responseTime": "2020-04-10 15:12:12:524",
"nlu": {
"clarifyEntities": {},
"sentiment": {
"query": "闲聊吗",
"label": 0,
"prob": 0.9999223,
"source": "model",
"name": "neutral",
"nameZh": "中立"
},
"intents": [],
"nluQuery": "闲聊吗",
"entities": {},
"clarifyIntents": [],
"clarifyTemplates": [],
"attitude": {
"query": "闲聊吗",
"label": 0,
"prob": 0.9947141,
"source": "model",
"name": "unknown",
"nameZh": "无态度"
},
"rawQuery": "闲聊吗"
},
"queryTime": "2020-04-10 15:12:09:114",
"botId": "b4762b99-d0df-4d51-bb70-38000b5b3f79",
"detail": {
"standardQuestion": "闲聊吗",
"extentQuestion": null,
"answer": {
"type": 1,
"text": "这是闲聊"
},
"confidence": 1,
"id": "0ea8b370-f0b4-44fe-a0b7-bf25ffa20365"
},
"queryId": "cb204ea7-f6ec-4a3a-a72f-9cf58647485f"
}
},
"code": 200,
"msg": "OK"
}
bot系统事件:
{
"queryId": "ffd58556-2cd8-4c63-a6d1-d79e3c2cc424",
"sessionId": "2375914d-ab78-4035-81dd-ede33297b0a0",
"source": "system",
"solved": true,
"confidence": 0,
"answer": {
"answerText": "silent",
"answerContents": [
{
"text": "silent",
"type": 1
}
],
"recommendContents": []
},
"queryTime": "2021-08-16 16:39:25:445",
"answerTime": "2021-08-16 16:39:25:535",
"actions": [],
"webhook": false,
"topAnythingElse": false,
"anythingElse": false,
"debug": {
"botName": "call_in_bot",
"nlu": {
"clarifyEntities": null,
"sentiment": null,
"intents": null,
"nluQuery": "",
"clarifyIntents": null,
"clarifyTemplates": null,
"nluCorrectedQuery": null,
"entities": null,
"nluChangedQuery": null,
"action": null,
"sensitiveWordsList": [],
"entityAutoFillVoMap": null,
"attitude": null,
"rawQuery": ""
},
"botId": "c46e1b75-bf24-4562-aa88-834243aecf86",
"detail": {
"answerInterventionRules": null,
"appendAnswers": null,
"name": "silent",
"count": 1,
"index": 1,
"reply": {
"symbol": "=",
"count": 1,
"type": 1,
"text": "silent",
"audio": null,
"isWebhook": false,
"action": "",
"actionName": ""
}
},
"queryId": "ffd58556-2cd8-4c63-a6d1-d79e3c2cc424"
}
}