@quec-wx-mp/api-ai
v1.0.0
Published
小程序插件 AI库
Readme
AI 能力
AI 能力模块,提供对话、记忆、成长、语音、内容、用量、总结和面板配置等 API。
安装
npm install @quec-wx-mp/api-aiimport ai from '@quec-wx-mp/api-ai'
const plugin = requirePlugin('quecPlugin')
plugin.use(ai)API 列表
1. 角色/声音相关
| 方法 | 说明 | | ---------------------- | ------------------------- | | findDevice | 获取设备的当前角色 | | roleFindPage | 可选角色列表 | | queryAiBotVoiceList | 可选声音列表 | | editDeviceRoleVoice | 切换角色/音色 | | getSpeedConfig | 查询语速配置详情 | | setSpeedConfig | 设置语速配置 | | findDeviceRoleVoiceRel | 查询给角色/音色的配置关系 | | setBotConfigBatch | 批量设置智能体配置 | | findWsConnectConfig | 查询连接配置 |
2. 聊天记录
| 方法 | 说明 | | --------------- | -------------------- | | aiChatPage | 获取设备历史聊天记录 | | deleteHistoryV2 | 聊天记录删除 |
3. 设置唤醒词/聊天模式
| 方法 | 说明 | | ----------------- | ---------------- | | aiChatWarnStatus | 查询聊天告警状态 | | aiChatWarnDisable | 关闭聊天告警 | | aiChatCurrent | 查询当前展示状态 |
4. 自定义角色
| 方法 | 说明 | | -------------------- | -------------- | | promptTemplateList | 提示词模板列表 | | promptTemplateDetail | 提示词模板详情 | | obtainPolishPrompt | 润色提示词 | | roleAdd | 新增角色 | | roleEdit | 编辑角色 | | roleDetail | 角色详情 | | roleDelete | 角色删除 |
5. 互动总结
| 方法 | 说明 | | -------------------- | --------------------- | | isShowSummaryAndTask | 是否显示互动总结/任务 | | querySummaryGenerate | 查询互动总结是否生成 | | summaryCommon | 查询互动总结内容 | | getSummary | 查询总结 |
6. 声音复刻
| 方法 | 说明 | | ----------------------- | ------------------------ | | getAiVoiceCopyStatus | 查询产品是否开启声音复刻 | | findPackageList | 查询套餐列表 | | createBizOrder | 创建订单 | | getEduVoiceCopyAudio | 获取教育版语音复制音频 | | setVoiceNameAudio | 设置语音名称音频 | | changePublishStatus | 修改发布状态 | | pcmToMp3 | PCM 转 MP3 | | uploadGuideVoice | 上传引导音频 | | eduUploadCopyVoiceAudio | 上传教育版复制语音音频 |
7. 声纹识别
| 方法 | 说明 | | ----------------------- | ------------------------ | | getVoicePrintStatus | 查询产品是否开启声纹识别 | | getDeviceVoicePrintInfo | 查询设备声纹详情 | | addFeature | 添加声纹特征 | | updateFeature | 修改声纹特征 | | getFeature | 查询声纹特征 | | deleteFeature | 删除声纹特征 | | uploadFeature | 上传声纹特征 | | updateDeviceVoicePrint | 设置声纹状态变更 |
8. 内容服务
| 方法 | 说明 | | --------------------- | ---------------- | | isShowOnDemand | 是否展示点播菜单 | | onDemandCategory | 查询点播分类列表 | | onDemandSearchalbum | 点播专辑列表 | | onDemandTracklist | 查询点播曲目列表 | | onDemandContentDetail | 获取点播内容详情 |
9. 记忆体对接
| 方法 | 说明 | | ------------------------ | -------------------- | | findListV2 | 查询记忆列表 | | findDeviceRoleVoiceRelV2 | 查询设备角色语音关系 | | deviceMessageV2 | 发送设备消息 | | getSummaryV2 | 查询记忆总结 | | editDeviceRoleVoiceV2 | 修改设备角色语音 | | deviceResetV2 | 恢复出厂设置 | | deviceShiftV2 | 设备迁移 |
10. 角色记忆
| 方法 | 说明 | | -------------- | ---------- | | deleteMemoryV2 | 长记忆删除 |
11. 情感交互&家长引导
| 方法 | 说明 | | --------------------------- | -------------------- | | addBabyInfo | 新增宝贝信息 | | updateBabyInfo | 更新宝贝信息 | | getBabyInfo | 获取宝贝信息 | | addBabyTask | 新增宝贝任务 | | updateBabyTask | 更新宝贝任务 | | deleteBabyTask | 删除宝贝任务 | | babyTaskList | 宝贝任务列表 | | taskListByAge | 根据年龄获取成长任务 | | getBabyTaskFinishStatistics | 获取宝贝任务完成情况 | | getBabyTaskWeekStatistics | 获取宝贝任务每周情况 | | listDeleteBabyTask | 删除宝贝成长任务 | | chatWarnList | 风险预警列表 | | chatWarnDetail | 风险预警详情 | | chatWarnResend | 重发聊天告警 | | uploadGuideVoice | 上传引导音频 |
12. 增值服务购买
| 方法 | 说明 | | --------------------- | ---------------- | | findPackageListV2 | 查询套餐列表 | | createContentBizOrder | 创建内容业务订单 | | createBizOrder | 创建业务订单 |
14. AI用量
| 方法 | 说明 | | --------------- | ---------------- | | findLicenseTime | 查询授权时间 | | aiChatPage | 查询聊天记录分页 | | aiChatCurrent | 查询当前用量 |
15. AI功能产品开关
| 方法 | 说明 | | -------------------- | ---------------------- | | isShowOnDemand | 查询是否展示点播入口 | | isShowSummaryAndTask | 查询是否展示总结与任务 |
API 详细说明
1. 角色/声音相关
1) 获取设备的当前角色
接口名称
findDevice功能描述
获取设备的当前角色。参数
| 属性 | 类型 | 默认值 | 必填 | 说明 | | -------- | -------- | ------ | ---- | -------- | | success | function | - | 是 | 成功回调 | | fail | function | - | 否 | 失败回调 | | complete | function | - | 否 | 结束回调 |
返回数据
- success(res):接口成功响应。
示例代码
plugin.ai.findDevice({
success(res) {
console.log(res)
},
fail(err) {
console.log(JSON.stringify(err))
},
complete() {}
})2) 可选角色列表
接口名称
roleFindPage功能描述
可选角色列表。参数
| 属性 | 类型 | 默认值 | 必填 | 说明 | | ---------- | -------- | ------ | ---- | ------------------------------------------------ | | productKey | string | - | 是 | 设备PK | | deviceKey | string | - | 是 | 设备DK | | pageNum | number | - | 是 | 页码 | | pageSize | number | - | 是 | 页大小 | | roleType | string | - | 是 | 角色类型 | | success | function | - | 是 | 接口调用成功的回调函数 | | fail | function | - | 否 | 接口调用失败的回调函数 | | complete | function | - | 否 | 接口调用结束的回调函数(调用成功、失败都会执行) |
返回数据
- success(res):接口成功响应。
示例代码
plugin.ai.roleFindPage({
productKey: '',
deviceKey: '',
pageNum: 1,
success(res) {
console.log(res)
},
fail(err) {
console.log(JSON.stringify(err))
},
complete() {}
})3) 可选声音列表
接口名称
queryAiBotVoiceList功能描述
可选声音列表。参数
| 属性 | 类型 | 默认值 | 必填 | 说明 | | ---------- | -------- | ------ | ---- | ------------------------------------------------ | | botRoleId | number | - | 是 | 角色ID | | productKey | string | - | 是 | 产品PK | | deviceKey | string | - | 是 | 设备DK | | pageNum | number | - | 是 | 页码 | | pageSize | number | - | 是 | 页大小 | | success | function | - | 是 | 接口调用成功的回调函数 | | fail | function | - | 否 | 接口调用失败的回调函数 | | complete | function | - | 否 | 接口调用结束的回调函数(调用成功、失败都会执行) |
返回数据
- success(res):接口成功响应。
示例代码
plugin.ai.queryAiBotVoiceList({
botRoleId: 1,
productKey: '',
deviceKey: '',
success(res) {
console.log(res)
},
fail(err) {
console.log(JSON.stringify(err))
},
complete() {}
})4) 切换角色/音色
接口名称
editDeviceRoleVoice功能描述
切换角色/音色。参数
| 属性 | 类型 | 默认值 | 必填 | 说明 | | -------- | -------- | ------ | ---- | ------------------------------------------------ | | arr | any | - | 是 | TODO 确认接口入参明细 | | success | function | - | 是 | 接口调用成功的回调函数 | | fail | function | - | 否 | 接口调用失败的回调函数 | | complete | function | - | 否 | 接口调用结束的回调函数(调用成功、失败都会执行) |
返回数据
- success(res):接口成功响应。
示例代码
plugin.ai.editDeviceRoleVoice({
arr: '',
success(res) {
console.log(res)
},
fail(err) {
console.log(JSON.stringify(err))
},
complete() {}
})5) 查询语速配置详情
接口名称
getSpeedConfig功能描述
查询语速配置详情。参数
| 属性 | 类型 | 默认值 | 必填 | 说明 | | ---------- | -------- | ------ | ---- | ------------------------------------------------ | | roleId | number | - | 是 | 角色ID | | configType | string | - | 是 | 配置类型:botSpeechRate | | success | function | - | 是 | 接口调用成功的回调函数 | | fail | function | - | 否 | 接口调用失败的回调函数 | | complete | function | - | 否 | 接口调用结束的回调函数(调用成功、失败都会执行) |
返回数据
- success(res):接口成功响应。
示例代码
plugin.ai.getSpeedConfig({
roleId: 1,
configType: '',
success(res) {
console.log(res)
},
fail(err) {
console.log(JSON.stringify(err))
},
complete() {}
})6) 设置语速配置
接口名称
setSpeedConfig功能描述
设置语速配置。参数
| 属性 | 类型 | 默认值 | 必填 | 说明 | | ------------- | -------- | ------ | ---- | ------------------------------------------------ | | roleId | number | - | 是 | 角色ID | | configType | string | - | 是 | 配置类型:botSpeechRate | | configContent | string | - | 是 | 语速值: fast 快速; normal 正常;slow 慢速 | | success | function | - | 是 | 接口调用成功的回调函数 | | fail | function | - | 否 | 接口调用失败的回调函数 | | complete | function | - | 否 | 接口调用结束的回调函数(调用成功、失败都会执行) |
返回数据
- success(res):接口成功响应。
示例代码
plugin.ai.setSpeedConfig({
roleId: 1,
configType: '',
configContent: '',
success(res) {
console.log(res)
},
fail(err) {
console.log(JSON.stringify(err))
},
complete() {}
})7) 查询给角色/音色的配置关系
接口名称
findDeviceRoleVoiceRel功能描述
查询给角色/音色的配置关系。参数
| 属性 | 类型 | 默认值 | 必填 | 说明 | | ---------- | -------- | ------ | ---- | ------------------------------------------------ | | deviceKey | string | - | 是 | 设备 DK | | productKey | string | - | 是 | 产品 PK | | success | function | - | 是 | 接口调用成功的回调函数 | | fail | function | - | 否 | 接口调用失败的回调函数 | | complete | function | - | 否 | 接口调用结束的回调函数(调用成功、失败都会执行) |
返回数据
- success(res):接口成功响应。
示例代码
plugin.ai.findDeviceRoleVoiceRel({
deviceKey: '',
productKey: '',
success(res) {
console.log(res)
},
fail(err) {
console.log(JSON.stringify(err))
},
complete() {}
})8) 批量设置智能体配置
接口名称
setBotConfigBatch功能描述
批量设置智能体配置。参数
| 属性 | 类型 | 默认值 | 必填 | 说明 | | ---------- | ------------------------- | ------ | ---- | ------------------------------------------------ | | configList | Array | - | 是 | - | | roleId | string | - | 是 | - | | success | function | - | 是 | 接口调用成功的回调函数 | | fail | function | - | 否 | 接口调用失败的回调函数 | | complete | function | - | 否 | 接口调用结束的回调函数(调用成功、失败都会执行) |
返回数据
- success(res):接口成功响应。
示例代码
plugin.ai.setBotConfigBatch({
configList: [],
roleId: '',
success(res) {
console.log(res)
},
fail(err) {
console.log(JSON.stringify(err))
},
complete() {}
})9) 查询连接配置
接口名称
findWsConnectConfig功能描述
查询连接配置。参数
| 属性 | 类型 | 默认值 | 必填 | 说明 | | ---------- | -------- | ------ | ---- | ------------------------------------------------ | | clientType | any | - | 是 | TODO clientType | | deviceKey | string | - | 是 | 设备 DK | | productKey | string | - | 是 | 产品 PK | | success | function | - | 是 | 接口调用成功的回调函数 | | fail | function | - | 否 | 接口调用失败的回调函数 | | complete | function | - | 否 | 接口调用结束的回调函数(调用成功、失败都会执行) |
返回数据
- success(res):接口成功响应。
示例代码
plugin.ai.findWsConnectConfig({
clientType: '',
deviceKey: '',
productKey: '',
success(res) {
console.log(res)
},
fail(err) {
console.log(JSON.stringify(err))
},
complete() {}
})2. 聊天记录
10) 获取设备历史聊天记录
接口名称
aiChatPage功能描述
获取设备历史聊天记录。参数
| 属性 | 类型 | 默认值 | 必填 | 说明 | | ---------- | -------- | ------ | ---- | ------------------------------------------------ | | productKey | string | - | 是 | 产品 PK | | deviceKey | string | - | 是 | 设备 DK | | endUserId | string | - | 是 | 终端用户 ID | | supplier | string | - | 否 | 供应商,默认coze, coze:扣子 | | pageNum | number | - | 是 | 当前页码 | | pageSize | number | - | 是 | 每页数量 | | success | function | - | 是 | 接口调用成功的回调函数 | | fail | function | - | 否 | 接口调用失败的回调函数 | | complete | function | - | 否 | 接口调用结束的回调函数(调用成功、失败都会执行) |
返回数据
- success(res):接口成功响应。
示例代码
plugin.ai.aiChatPage({
productKey: '',
deviceKey: '',
endUserId: '',
success(res) {
console.log(res)
},
fail(err) {
console.log(JSON.stringify(err))
},
complete() {}
})11) 聊天记录删除
接口名称
deleteHistoryV2功能描述
聊天记录删除。参数
| 属性 | 类型 | 默认值 | 必填 | 说明 | | ------------ | ------------- | ------ | ---- | ------------------------------------------------------------------- | | roleIds | Array | - | 是 | 角色ID列表 | | deviceInfoId | number | - | 否 | 设备信息ID(优先以deviceInfoId为主,没有的话处理pk、dk、endUserId) | | productKey | string | - | 否 | 产品PK | | deviceKey | string | - | 否 | 设备DK | | endUserId | string | - | 否 | 终端用户ID | | success | function | - | 是 | 接口调用成功的回调函数 | | fail | function | - | 否 | 接口调用失败的回调函数 | | complete | function | - | 否 | 接口调用结束的回调函数(调用成功、失败都会执行) |
返回数据
- success(res):接口成功响应。
示例代码
plugin.ai.deleteHistoryV2({
roleIds: 1,
deviceInfoId: 1,
productKey: '',
success(res) {
console.log(res)
},
fail(err) {
console.log(JSON.stringify(err))
},
complete() {}
})3. 设置唤醒词/聊天模式
12) 查询聊天告警状态
接口名称
aiChatWarnStatus功能描述
查询聊天告警状态。参数
| 属性 | 类型 | 默认值 | 必填 | 说明 | | ---------- | -------- | ------ | ---- | ------------------------------------------------ | | productKey | string | - | 是 | 产品 PK | | deviceKey | string | - | 是 | 设备 DK | | endUserId | string | - | 是 | 终端用户 ID | | supplier | string | - | 否 | 供应商,默认coze, coze:扣子 | | success | function | - | 是 | 接口调用成功的回调函数 | | fail | function | - | 否 | 接口调用失败的回调函数 | | complete | function | - | 否 | 接口调用结束的回调函数(调用成功、失败都会执行) |
返回数据
- success(res):接口成功响应。
示例代码
plugin.ai.aiChatWarnStatus({
productKey: '',
deviceKey: '',
endUserId: '',
success(res) {
console.log(res)
},
fail(err) {
console.log(JSON.stringify(err))
},
complete() {}
})13) 关闭聊天告警
接口名称
aiChatWarnDisable功能描述
关闭聊天告警。参数
| 属性 | 类型 | 默认值 | 必填 | 说明 | | ---------- | -------- | ------ | ---- | ------------------------------------------------------------------------------------- | | productKey | string | - | 是 | 产品 PK | | deviceKey | string | - | 是 | 设备 DK | | endUserId | string | - | 是 | 终端用户 ID | | supplier | string | - | 否 | 供应商,默认coze, coze:扣子 | | warnType | string | - | 是 | 告警类型: all_exhausted-所有套餐已用尽,has_expired-存在过期套餐,expired_soon-即将到期 | | success | function | - | 是 | 接口调用成功的回调函数 | | fail | function | - | 否 | 接口调用失败的回调函数 | | complete | function | - | 否 | 接口调用结束的回调函数(调用成功、失败都会执行) |
返回数据
- success(res):接口成功响应。
示例代码
plugin.ai.aiChatWarnDisable({
productKey: '',
deviceKey: '',
endUserId: '',
success(res) {
console.log(res)
},
fail(err) {
console.log(JSON.stringify(err))
},
complete() {}
})14) 查询当前展示状态
接口名称
aiChatCurrent功能描述
查询当前展示状态。参数
| 属性 | 类型 | 默认值 | 必填 | 说明 | | ---------- | -------- | ------ | ---- | ------------------------------------------------ | | productKey | string | - | 是 | 产品 PK | | deviceKey | string | - | 是 | 设备 DK | | endUserId | string | - | 是 | 终端用户 ID | | supplier | string | - | 否 | 供应商,默认coze, coze:扣子 | | success | function | - | 是 | 接口调用成功的回调函数 | | fail | function | - | 否 | 接口调用失败的回调函数 | | complete | function | - | 否 | 接口调用结束的回调函数(调用成功、失败都会执行) |
返回数据
- success(res):接口成功响应。
示例代码
plugin.ai.aiChatCurrent({
productKey: '',
deviceKey: '',
endUserId: '',
success(res) {
console.log(res)
},
fail(err) {
console.log(JSON.stringify(err))
},
complete() {}
})4. 自定义角色
15) 提示词模板列表
接口名称
promptTemplateList功能描述
提示词模板列表。参数
| 属性 | 类型 | 默认值 | 必填 | 说明 | | -------- | -------- | ------ | ---- | ------------------------------------------------ | | supplier | string | - | 是 | 供应商 | | tags | string | - | 否 | 模板标签,多个模板使用","分隔 | | success | function | - | 是 | 接口调用成功的回调函数 | | fail | function | - | 否 | 接口调用失败的回调函数 | | complete | function | - | 否 | 接口调用结束的回调函数(调用成功、失败都会执行) |
返回数据
- success(res):接口成功响应。
示例代码
plugin.ai.promptTemplateList({
supplier: '',
tags: '',
success(res) {
console.log(res)
},
fail(err) {
console.log(JSON.stringify(err))
},
complete() {}
})16) 提示词模板详情
接口名称
promptTemplateDetail功能描述
提示词模板详情。参数
| 属性 | 类型 | 默认值 | 必填 | 说明 | | -------- | -------- | ------ | ---- | ------------------------------------------------ | | ptcId | number | - | 是 | 模板ID | | success | function | - | 是 | 接口调用成功的回调函数 | | fail | function | - | 否 | 接口调用失败的回调函数 | | complete | function | - | 否 | 接口调用结束的回调函数(调用成功、失败都会执行) |
返回数据
- success(res):接口成功响应。
示例代码
plugin.ai.promptTemplateDetail({
ptcId: 1,
success(res) {
console.log(res)
},
fail(err) {
console.log(JSON.stringify(err))
},
complete() {}
})17) 润色提示词
接口名称
obtainPolishPrompt功能描述
润色提示词。参数
| 属性 | 类型 | 默认值 | 必填 | 说明 | | --------- | -------- | ------ | ---- | ------------------------------------------------ | | roleName | string | - | 是 | 角色名称 | | roleInput | string | - | 是 | 角色补充 | | roleDesc | string | - | 是 | 角色描述 | | success | function | - | 是 | 接口调用成功的回调函数 | | fail | function | - | 否 | 接口调用失败的回调函数 | | complete | function | - | 否 | 接口调用结束的回调函数(调用成功、失败都会执行) |
返回数据
- success(res):接口成功响应。
示例代码
plugin.ai.obtainPolishPrompt({
roleName: '',
roleInput: '',
roleDesc: '',
success(res) {
console.log(res)
},
fail(err) {
console.log(JSON.stringify(err))
},
complete() {}
})18) 新增角色
接口名称
roleAdd功能描述
新增角色。参数
| 属性 | 类型 | 默认值 | 必填 | 说明 | | ---------- | -------- | ------ | ---- | ------------------------------------------------ | | productKey | string | - | 是 | 设备PK | | deviceKey | string | - | 是 | 产品DK | | roleName | string | - | 是 | 角色名称 | | prompt | string | - | 否 | 角色提示文本 | | roleDesc | string | - | 否 | 角色描述 | | rolePicUrl | string | - | 否 | 角色图片地址 | | voiceId | number | - | 否 | 角色声音Id | | success | function | - | 是 | 接口调用成功的回调函数 | | fail | function | - | 否 | 接口调用失败的回调函数 | | complete | function | - | 否 | 接口调用结束的回调函数(调用成功、失败都会执行) |
返回数据
- success(res):接口成功响应。
示例代码
plugin.ai.roleAdd({
productKey: '',
deviceKey: '',
roleName: '',
success(res) {
console.log(res)
},
fail(err) {
console.log(JSON.stringify(err))
},
complete() {}
})19) 编辑角色
接口名称
roleEdit功能描述
编辑角色。参数
| 属性 | 类型 | 默认值 | 必填 | 说明 | | ---------- | -------- | ------ | ---- | ------------------------------------------------ | | productKey | string | - | 是 | 设备PK | | deviceKey | string | - | 是 | 设备DK | | roleName | string | - | 是 | 角色名称 | | roleId | number | - | 是 | 角色ID | | prompt | string | - | 否 | 角色提示文本 | | roleDesc | string | - | 否 | 角色描述 | | rolePicUrl | string | - | 否 | 角色图片地址 | | voiceId | number | - | 否 | 角色声音Id | | success | function | - | 是 | 接口调用成功的回调函数 | | fail | function | - | 否 | 接口调用失败的回调函数 | | complete | function | - | 否 | 接口调用结束的回调函数(调用成功、失败都会执行) |
返回数据
- success(res):接口成功响应。
示例代码
plugin.ai.roleEdit({
productKey: '',
deviceKey: '',
roleName: '',
success(res) {
console.log(res)
},
fail(err) {
console.log(JSON.stringify(err))
},
complete() {}
})20) 角色详情
接口名称
roleDetail功能描述
角色详情。参数
| 属性 | 类型 | 默认值 | 必填 | 说明 | | ---------- | -------- | ------ | ---- | ------------------------------------------------ | | productKey | string | - | 是 | 设备PK | | deviceKey | string | - | 是 | 设备DK | | roleId | number | - | 是 | 角色ID | | success | function | - | 是 | 接口调用成功的回调函数 | | fail | function | - | 否 | 接口调用失败的回调函数 | | complete | function | - | 否 | 接口调用结束的回调函数(调用成功、失败都会执行) |
返回数据
- success(res):接口成功响应。
示例代码
plugin.ai.roleDetail({
productKey: '',
deviceKey: '',
roleId: 1,
success(res) {
console.log(res)
},
fail(err) {
console.log(JSON.stringify(err))
},
complete() {}
})21) 角色删除
接口名称
roleDelete功能描述
角色删除。参数
| 属性 | 类型 | 默认值 | 必填 | 说明 | | ---------- | -------- | ------ | ---- | ------------------------------------------------ | | productKey | string | - | 是 | 设备PK | | deviceKey | string | - | 是 | 设备DK | | roleId | number | - | 是 | 角色ID | | success | function | - | 是 | 接口调用成功的回调函数 | | fail | function | - | 否 | 接口调用失败的回调函数 | | complete | function | - | 否 | 接口调用结束的回调函数(调用成功、失败都会执行) |
返回数据
- success(res):接口成功响应。
示例代码
plugin.ai.roleDelete({
productKey: '',
deviceKey: '',
roleId: 1,
success(res) {
console.log(res)
},
fail(err) {
console.log(JSON.stringify(err))
},
complete() {}
})5. 互动总结
22) 是否显示互动总结/任务
接口名称
isShowSummaryAndTask功能描述
是否显示互动总结/任务。参数
| 属性 | 类型 | 默认值 | 必填 | 说明 | | ---------- | ---------------------- | ------ | ---- | ------------------------------------------------ | | productKey | string | - | 是 | 设备 PK | | type | CommonStatusOptionType | - | 是 | 类型 | | success | function | - | 是 | 接口调用成功的回调函数 | | fail | function | - | 否 | 接口调用失败的回调函数 | | complete | function | - | 否 | 接口调用结束的回调函数(调用成功、失败都会执行) |
返回数据
- success(res):接口成功响应。
示例代码
plugin.ai.isShowSummaryAndTask({
productKey: '',
type: '',
success(res) {
console.log(res)
},
fail(err) {
console.log(JSON.stringify(err))
},
complete() {}
})23) 查询互动总结是否生成
接口名称
querySummaryGenerate功能描述
查询互动总结是否生成。参数
| 属性 | 类型 | 默认值 | 必填 | 说明 | | ------------ | -------- | ------ | ---- | -------------------------------------------------------------------------------------------------------------- | | productKey | string | - | 否 | 设备 PK | | deviceKey | string | - | 否 | 设备 DK | | endUserId | string | - | 否 | 终端用户 ID | | deviceInfoId | string | - | 否 | 设备信息 ID | | startTime | number | - | 是 | 开始时间,毫秒时间戳 | | endTime | number | - | 是 | 结束时间,毫秒时间戳 | | roleId | string | - | 否 | 角色ID | | dataDim | string | - | 否 | 数据维度:device(设备级别 pk、dk 必传); user(用户级别 pk、dk、endUserId 或 deviceInfoId 必传其一) 默认为device | | success | function | - | 是 | 接口调用成功的回调函数 | | fail | function | - | 否 | 接口调用失败的回调函数 | | complete | function | - | 否 | 接口调用结束的回调函数(调用成功、失败都会执行) |
返回数据
- success(res):接口成功响应。
示例代码
plugin.ai.querySummaryGenerate({
productKey: '',
deviceKey: '',
endUserId: '',
success(res) {
console.log(res)
},
fail(err) {
console.log(JSON.stringify(err))
},
complete() {}
})24) 查询互动总结内容
接口名称
summaryCommon功能描述
查询互动总结内容。参数
| 属性 | 类型 | 默认值 | 必填 | 说明 | | ------------ | -------- | ------ | ---- | -------------------------------------------------------------------------------------------------------------- | | day | number | - | 是 | 天数 | | deviceInfoId | string | - | 否 | 设备信息 ID | | productKey | string | - | 否 | 设备 PK | | deviceKey | string | - | 否 | 设备 DK | | endUserId | string | - | 否 | 终端用户 ID | | dataDim | string | - | 否 | 数据维度:device(设备级别 pk、dk 必传); user(用户级别 pk、dk、endUserId 或 deviceInfoId 必传其一) 默认为device | | success | function | - | 是 | 接口调用成功的回调函数 | | fail | function | - | 否 | 接口调用失败的回调函数 | | complete | function | - | 否 | 接口调用结束的回调函数(调用成功、失败都会执行) |
返回数据
- success(res):接口成功响应。
示例代码
plugin.ai.summaryCommon({
day: 1,
deviceInfoId: '',
productKey: '',
success(res) {
console.log(res)
},
fail(err) {
console.log(JSON.stringify(err))
},
complete() {}
})25) 查询总结
接口名称
getSummary功能描述
查询总结。参数
| 属性 | 类型 | 默认值 | 必填 | 说明 | | ---------- | -------- | ------ | ---- | ------------------------------------------------ | | productKey | string | - | 是 | 设备PK | | deviceKey | string | - | 是 | 设备DK | | day | string | - | 是 | 时间 格式: YYYYMMDD | | success | function | - | 是 | 接口调用成功的回调函数 | | fail | function | - | 否 | 接口调用失败的回调函数 | | complete | function | - | 否 | 接口调用结束的回调函数(调用成功、失败都会执行) |
返回数据
- success(res):接口成功响应。
示例代码
plugin.ai.getSummary({
productKey: '',
deviceKey: '',
day: '',
success(res) {
console.log(res)
},
fail(err) {
console.log(JSON.stringify(err))
},
complete() {}
})6. 声音复刻
26) 查询产品是否开启声音复刻
接口名称
getAiVoiceCopyStatus功能描述
查询产品是否开启声音复刻。参数
| 属性 | 类型 | 默认值 | 必填 | 说明 | | ---------- | -------- | ------ | ---- | ------------------------------------------------ | | productKey | string | - | 是 | 产品PK | | success | function | - | 是 | 接口调用成功的回调函数 | | fail | function | - | 否 | 接口调用失败的回调函数 | | complete | function | - | 否 | 接口调用结束的回调函数(调用成功、失败都会执行) |
返回数据
- success(res):接口成功响应。
示例代码
plugin.ai.getAiVoiceCopyStatus({
productKey: '',
success(res) {
console.log(res)
},
fail(err) {
console.log(JSON.stringify(err))
},
complete() {}
})27) 查询套餐列表
接口名称
findPackageList功能描述
查询套餐列表。参数
| 属性 | 类型 | 默认值 | 必填 | 说明 | | ------------ | -------- | ------ | ---- | ------------------------------------------------ | | merchantNo | string | - | 是 | 商户号 | | terminalCode | string | - | 否 | 终端应用 | | packageType | string | - | 否 | 套餐类型,默认 AI_VOICE_CLONE | | success | function | - | 是 | 接口调用成功的回调函数 | | fail | function | - | 否 | 接口调用失败的回调函数 | | complete | function | - | 否 | 接口调用结束的回调函数(调用成功、失败都会执行) |
返回数据
- success(res):接口成功响应。
示例代码
plugin.ai.findPackageList({
merchantNo: '',
terminalCode: '',
packageType: '',
success(res) {
console.log(res)
},
fail(err) {
console.log(JSON.stringify(err))
},
complete() {}
})28) 创建订单
接口名称
createBizOrder功能描述
创建订单。参数
| 属性 | 类型 | 默认值 | 必填 | 说明 | | ---------------- | -------- | ------ | ---- | ------------------------------------------------ | | merchantNo | string | - | 是 | 商户号 | | packageVersionId | number | - | 是 | 套餐版本id | | size | number | - | 是 | 购买份数 | | success | function | - | 是 | 接口调用成功的回调函数 | | fail | function | - | 否 | 接口调用失败的回调函数 | | complete | function | - | 否 | 接口调用结束的回调函数(调用成功、失败都会执行) |
返回数据
- success(res):接口成功响应。
示例代码
plugin.ai.createBizOrder({
merchantNo: '',
packageVersionId: 1,
size: 1,
success(res) {
console.log(res)
},
fail(err) {
console.log(JSON.stringify(err))
},
complete() {}
})29) 获取教育版语音复制音频
接口名称
getEduVoiceCopyAudio功能描述
获取教育版语音复制音频。参数
| 属性 | 类型 | 默认值 | 必填 | 说明 | | ---------- | -------- | ------ | ---- | ------------------------------------------------ | | botRoleId | number | - | 是 | 角色ID | | productKey | string | - | 是 | 产品PK | | deviceKey | string | - | 是 | 设备DK | | success | function | - | 是 | 接口调用成功的回调函数 | | fail | function | - | 否 | 接口调用失败的回调函数 | | complete | function | - | 否 | 接口调用结束的回调函数(调用成功、失败都会执行) |
返回数据
- success(res):接口成功响应。
示例代码
plugin.ai.getEduVoiceCopyAudio({
botRoleId: 1,
productKey: '',
deviceKey: '',
success(res) {
console.log(res)
},
fail(err) {
console.log(JSON.stringify(err))
},
complete() {}
})30) 设置语音名称音频
接口名称
setVoiceNameAudio功能描述
设置语音名称音频。参数
| 属性 | 类型 | 默认值 | 必填 | 说明 | | ---------- | -------- | ------ | ---- | ------------------------------------------------ | | productKey | string | - | 是 | 产品PK | | deviceKey | string | - | 是 | 设备DK | | voiceId | string | - | 是 | 声音id | | voiceName | string | - | 是 | 音色名称 | | success | function | - | 是 | 接口调用成功的回调函数 | | fail | function | - | 否 | 接口调用失败的回调函数 | | complete | function | - | 否 | 接口调用结束的回调函数(调用成功、失败都会执行) |
返回数据
- success(res):接口成功响应。
示例代码
plugin.ai.setVoiceNameAudio({
productKey: '',
deviceKey: '',
voiceId: '',
success(res) {
console.log(res)
},
fail(err) {
console.log(JSON.stringify(err))
},
complete() {}
})31) 修改发布状态
接口名称
changePublishStatus功能描述
修改发布状态。参数
| 属性 | 类型 | 默认值 | 必填 | 说明 | | ------------- | -------- | ------ | ---- | ------------------------------------------------ | | productKey | string | - | 是 | 产品PK | | deviceKey | string | - | 是 | 设备DK | | id | string | - | 是 | id | | publishStatus | boolean | - | 是 | 发布状态 | | success | function | - | 是 | 接口调用成功的回调函数 | | fail | function | - | 否 | 接口调用失败的回调函数 | | complete | function | - | 否 | 接口调用结束的回调函数(调用成功、失败都会执行) |
返回数据
- success(res):接口成功响应。
示例代码
plugin.ai.changePublishStatus({
productKey: '',
deviceKey: '',
id: '',
success(res) {
console.log(res)
},
fail(err) {
console.log(JSON.stringify(err))
},
complete() {}
})32) PCM 转 MP3
接口名称
pcmToMp3功能描述
PCM 转 MP3。参数
| 属性 | 类型 | 默认值 | 必填 | 说明 | | -------- | -------- | ------ | ---- | ------------------------------------------------ | | file | any | - | 是 | 文件 | | success | function | - | 是 | 接口调用成功的回调函数 | | fail | function | - | 否 | 接口调用失败的回调函数 | | complete | function | - | 否 | 接口调用结束的回调函数(调用成功、失败都会执行) |
返回数据
- success(res):接口成功响应。
示例代码
plugin.ai.pcmToMp3({
file: '',
success(res) {
console.log(res)
},
fail(err) {
console.log(JSON.stringify(err))
},
complete() {}
})33) 上传引导音频
接口名称
uploadGuideVoice功能描述
上传引导音频。参数
| 属性 | 类型 | 默认值 | 必填 | 说明 | | ------------ | -------- | ------ | ---- | ------------------------------------------------ | | id | string | - | 是 | 预警 ID | | productKey | string | - | 否 | 产品 PK | | deviceKey | string | - | 否 | 设备 DK | | endUserId | string | - | 否 | 终端用户 ID | | voiceFileUrl | string | - | 否 | 声音文件(plugin.ai.pcmToMp3 API 返回声音 Url) | | voiceTime | number | - | 否 | 语音时长 | | success | function | - | 是 | 接口调用成功的回调函数 | | fail | function | - | 否 | 接口调用失败的回调函数 | | complete | function | - | 否 | 接口调用结束的回调函数(调用成功、失败都会执行) |
返回数据
- success(res):接口成功响应。
示例代码
plugin.ai.uploadGuideVoice({
id: '',
productKey: '',
deviceKey: '',
success(res) {
console.log(res)
},
fail(err) {
console.log(JSON.stringify(err))
},
complete() {}
})34) 上传教育版复制语音音频
接口名称
eduUploadCopyVoiceAudio功能描述
上传教育版复制语音音频。参数
| 属性 | 类型 | 默认值 | 必填 | 说明 | | ---------- | -------- | ------ | ---- | ------------------------------------------------ | | file | any | - | 是 | 文件 | | productKey | string | - | 是 | 产品PK | | deviceKey | string | - | 是 | 设备DK | | voiceId | number | - | 是 | 声音id | | roleId | number | - | 是 | 角色id | | content | string | - | 是 | 录音文案 | | language | number | - | 是 | 语言 | | success | function | - | 是 | 接口调用成功的回调函数 | | fail | function | - | 否 | 接口调用失败的回调函数 | | complete | function | - | 否 | 接口调用结束的回调函数(调用成功、失败都会执行) |
返回数据
- success(res):接口成功响应。
示例代码
plugin.ai.eduUploadCopyVoiceAudio({
file: '',
productKey: '',
deviceKey: '',
success(res) {
console.log(res)
},
fail(err) {
console.log(JSON.stringify(err))
},
complete() {}
})7. 声纹识别
35) 查询产品是否开启声纹识别
接口名称
getVoicePrintStatus功能描述
查询产品是否开启声纹识别。参数
| 属性 | 类型 | 默认值 | 必填 | 说明 | | ---------- | -------- | ------ | ---- | ------------------------------------------------ | | productKey | string | - | 是 | 设备 PK | | success | function | - | 是 | 接口调用成功的回调函数 | | fail | function | - | 否 | 接口调用失败的回调函数 | | complete | function | - | 否 | 接口调用结束的回调函数(调用成功、失败都会执行) |
返回数据
- success(res):接口成功响应。
示例代码
plugin.ai.getVoicePrintStatus({
productKey: '',
success(res) {
console.log(res)
},
fail(err) {
console.log(JSON.stringify(err))
},
complete() {}
})36) 查询设备声纹详情
接口名称
getDeviceVoicePrintInfo功能描述
查询设备声纹详情。参数
| 属性 | 类型 | 默认值 | 必填 | 说明 | | ------------ | -------- | ------ | ---- | ---------------------------------------------------------------------- | | vpId | number | - | 是 | 声纹信息 ID | | deviceInfoId | number | - | 否 | 设备信息ID(优先以 deviceInfoId 为主,没有的话处理 pk、dk、endUserId) | | productKey | string | - | 否 | 设备PK | | deviceKey | string | - | 否 | 设备DK | | endUserId | string | - | 否 | 终端用户ID | | success | function | - | 是 | 接口调用成功的回调函数 | | fail | function | - | 否 | 接口调用失败的回调函数 | | complete | function | - | 否 | 接口调用结束的回调函数(调用成功、失败都会执行) |
返回数据
- success(res):接口成功响应。
示例代码
plugin.ai.getDeviceVoicePrintInfo({
vpId: 1,
deviceInfoId: 1,
productKey: '',
success(res) {
console.log(res)
},
fail(err) {
console.log(JSON.stringify(err))
},
complete() {}
})37) 添加声纹特征
接口名称
addFeature功能描述
添加声纹特征。参数
| 属性 | 类型 | 默认值 | 必填 | 说明 | | ----------- | -------- | ------ | ---- | ------------------------------------------------ | | vpId | number | - | 是 | 声纹信息ID | | featureName | string | - | 是 | 声纹特征名 | | featureDesc | string | - | 是 | 声纹特征描述 | | success | function | - | 是 | 接口调用成功的回调函数 | | fail | function | - | 否 | 接口调用失败的回调函数 | | complete | function | - | 否 | 接口调用结束的回调函数(调用成功、失败都会执行) |
返回数据
- success(res):接口成功响应。
示例代码
plugin.ai.addFeature({
vpId: 1,
featureName: '',
featureDesc: '',
success(res) {
console.log(res)
},
fail(err) {
console.log(JSON.stringify(err))
},
complete() {}
})38) 修改声纹特征
接口名称
updateFeature功能描述
修改声纹特征。参数
| 属性 | 类型 | 默认值 | 必填 | 说明 | | ----------- | -------- | ------ | ---- | ------------------------------------------------ | | vpfId | number | - | 是 | 声纹信息 ID | | featureName | string | - | 是 | 声纹特征名 | | featureDesc | string | - | 是 | 声纹特征描述 | | success | function | - | 是 | 接口调用成功的回调函数 | | fail | function | - | 否 | 接口调用失败的回调函数 | | complete | function | - | 否 | 接口调用结束的回调函数(调用成功、失败都会执行) |
返回数据
- success(res):接口成功响应。
示例代码
plugin.ai.updateFeature({
vpfId: 1,
featureName: '',
featureDesc: '',
success(res) {
console.log(res)
},
fail(err) {
console.log(JSON.stringify(err))
},
complete() {}
})39) 查询声纹特征
接口名称
getFeature功能描述
查询声纹特征。参数
| 属性 | 类型 | 默认值 | 必填 | 说明 | | -------- | -------- | ------ | ---- | ------------------------------------------------ | | vpfId | number | - | 是 | 声纹特征信息 ID | | success | function | - | 是 | 接口调用成功的回调函数 | | fail | function | - | 否 | 接口调用失败的回调函数 | | complete | function | - | 否 | 接口调用结束的回调函数(调用成功、失败都会执行) |
返回数据
- success(res):接口成功响应。
示例代码
plugin.ai.getFeature({
vpfId: 1,
success(res) {
console.log(res)
},
fail(err) {
console.log(JSON.stringify(err))
},
complete() {}
})40) 删除声纹特征
接口名称
deleteFeature功能描述
删除声纹特征。参数
| 属性 | 类型 | 默认值 | 必填 | 说明 | | -------- | -------- | ------ | ---- | ------------------------------------------------ | | vpfId | number | - | 是 | 声纹信息 ID | | success | function | - | 是 | 接口调用成功的回调函数 | | fail | function | - | 否 | 接口调用失败的回调函数 | | complete | function | - | 否 | 接口调用结束的回调函数(调用成功、失败都会执行) |
返回数据
- success(res):接口成功响应。
示例代码
plugin.ai.deleteFeature({
vpfId: 1,
success(res) {
console.log(res)
},
fail(err) {
console.log(JSON.stringify(err))
},
complete() {}
})41) 上传声纹特征
接口名称
uploadFeature功能描述
上传声纹特征。参数
| 属性 | 类型 | 默认值 | 必填 | 说明 | | ---------- | -------- | ------ | ---- | ------------------------------------------------------------------------- | | vpfId | number | - | 是 | 声纹信息 ID | | file | any | - | 是 | 声音文件 | | fileType | string | - | 是 | 文件类型: wav、 pcm | | sampleRate | number | - | 否 | 采样率,单位:Hz。当文件类型为 pcm 时需传入该参数。 默认为 16kHz 采样率。 | | channel | number | - | 否 | 声道数,当文件类型为 pcm 时需传入该参数。 默认为单声道。 | | success | function | - | 是 | 接口调用成功的回调函数 | | fail | function | - | 否 | 接口调用失败的回调函数 | | complete | function | - | 否 | 接口调用结束的回调函数(调用成功、失败都会执行) |
返回数据
- success(res):接口成功响应。
示例代码
plugin.ai.uploadFeature({
vpfId: 1,
file: '',
fileType: '',
success(res) {
console.log(res)
},
fail(err) {
console.log(JSON.stringify(err))
},
complete() {}
})42) 设置声纹状态变更
接口名称
updateDeviceVoicePrint功能描述
设置声纹状态变更。参数
| 属性 | 类型 | 默认值 | 必填 | 说明 | | --------------- | -------- | ------ | ---- | --------------------------------------------------------------------------------------------------------------------------------- | | diId | number | - | 是 | 设备信息表 ID | | vpId | number | - | 是 | 声纹信息 ID | | vpfIds | string | - | 否 | 启用的声纹特征表 ID,“,”分隔;当启用状态为 true 时,当前值不能为空;当启用状态为 false 时,当前值允许为空,为空时解除声纹特征关联 | | activeStatus | boolean | - | 是 | 启用状态:1 启用(当启用时,且无明细状态,默认全开) 0 关闭(当关闭时,且无明细状态,默认全关) | | identifyStatus | boolean | - | 否 | 识别状态开关:1 启用 - 0 关闭 | | wakeupStatus | boolean | - | 否 | 唤醒状态开关:1 启用 - 0 关闭 | | interruptStatus | boolean | - | 否 | 打断状态开关:1 启用 - 0 关闭 | | success | function | - | 是 | 接口调用成功的回调函数 | | fail | function | - | 否 | 接口调用失败的回调函数 | | complete | function | - | 否 | 接口调用结束的回调函数(调用成功、失败都会执行) |
返回数据
- success(res):接口成功响应。
示例代码
plugin.ai.updateDeviceVoicePrint({
diId: 1,
vpId: 1,
vpfIds: '',
success(res) {
console.log(res)
},
fail(err) {
console.log(JSON.stringify(err))
},
complete() {}
})8. 内容服务
43) 是否展示点播菜单
接口名称
isShowOnDemand功能描述
是否展示点播菜单。参数
| 属性 | 类型 | 默认值 | 必填 | 说明 | | ---------- | -------- | ------ | ---- | ------------------------------------------------ | | productKey | string | - | 是 | 设备 PK | | deviceKey | string | - | 是 | 设备 DK | | success | function | - | 是 | 接口调用成功的回调函数 | | fail | function | - | 否 | 接口调用失败的回调函数 | | complete | function | - | 否 | 接口调用结束的回调函数(调用成功、失败都会执行) |
返回数据
- success(res):接口成功响应。
示例代码
plugin.ai.isShowOnDemand({
productKey: '',
deviceKey: '',
success(res) {
console.log(res)
},
fail(err) {
console.log(JSON.stringify(err))
},
complete() {}
})44) 查询点播分类列表
接口名称
onDemandCategory功能描述
查询点播分类列表。参数
| 属性 | 类型 | 默认值 | 必填 | 说明 | | -------- | -------- | ------ | ---- | ------------------------------------------------ | | code | string | - | 是 | code | | success | function | - | 是 | 接口调用成功的回调函数 | | fail | function | - | 否 | 接口调用失败的回调函数 | | complete | function | - | 否 | 接口调用结束的回调函数(调用成功、失败都会执行) |
返回数据
- success(res):接口成功响应。
示例代码
plugin.ai.onDemandCategory({
code: '',
success(res) {
console.log(res)
},
fail(err) {
console.log(JSON.stringify(err))
},
complete() {}
})45) 点播专辑列表
接口名称
onDemandSearchalbum功能描述
点播专辑列表。参数
| 属性 | 类型 | 默认值 | 必填 | 说明 | | -------- | -------- | ------ | ---- | ------------------------------------------------ | | type | string | - | 是 | 类型 | | name | string | - | 是 | 名称 | | pageNum | string | - | 否 | 页码 | | pageSize | string | - | 否 | 页大小 | | success | function | - | 是 | 接口调用成功的回调函数 | | fail | function | - | 否 | 接口调用失败的回调函数 | | complete | function | - | 否 | 接口调用结束的回调函数(调用成功、失败都会执行) |
返回数据
- success(res):接口成功响应。
示例代码
plugin.ai.onDemandSearchalbum({
type: '',
name: '',
pageNum: '',
success(res) {
console.log(res)
},
fail(err) {
console.log(JSON.stringify(err))
},
complete() {}
})46) 查询点播曲目列表
接口名称
onDemandTracklist功能描述
查询点播曲目列表。参数
| 属性 | 类型 | 默认值 | 必填 | 说明 | | -------- | -------- | ------ | ---- | ------------------------------------------------ | | albumId | string | - | 是 | 专辑ID | | pageNum | string | - | 否 | 页码 | | pageSize | string | - | 否 | 页大小 | | success | function | - | 是 | 接口调用成功的回调函数 | | fail | function | - | 否 | 接口调用失败的回调函数 | | complete | function | - | 否 | 接口调用结束的回调函数(调用成功、失败都会执行) |
返回数据
- success(res):接口成功响应。
示例代码
plugin.ai.onDemandTracklist({
albumId: '',
pageNum: '',
pageSize: '',
success(res) {
console.log(res)
},
fail(err) {
console.log(JSON.stringify(err))
},
complete() {}
})47) 获取点播内容详情
接口名称
onDemandContentDetail功能描述
获取点播内容详情。参数
| 属性 | 类型 | 默认值 | 必填 | 说明 | | -------- | -------- | ------ | ---- | ------------------------------------------------------------------------------------------ | | albumId | string | - | 是 | 专辑id | | episode | string | - | 是 | 内容在专辑里的索引位,从1开始,上一首:episode = episode - 1 下一首:episode = episode + 1 | | success | function | - | 是 | 接口调用成功的回调函数 | | fail | function | - | 否 | 接口调用失败的回调函数 | | complete | function | - | 否 | 接口调用结束的回调函数(调用成功、失败都会执行) |
返回数据
- success(res):接口成功响应。
示例代码
plugin.ai.onDemandContentDetail({
albumId: '',
episode: '',
success(res) {
console.log(res)
},
fail(err) {
console.log(JSON.stringify(err))
},
complete() {}
})9. 记忆体对接
48) 查询记忆列表
接口名称
findListV2功能描述
查询记忆列表。参数
| 属性 | 类型 | 默认值 | 必填 | 说明 | | -------- | -------- | ------ | ---- | ------------------------------------------------ | | success | function | - | 是 | 接口调用成功的回调函数 | | fail | function | - | 否 | 接口调用失败的回调函数 | | complete | function | - | 否 | 接口调用结束的回调函数(调用成功、失败都会执行) |
返回数据
- success(res):接口成功响应。
示例代码
plugin.ai.findListV2({
success(res) {
console.log(res)
},
fail(err) {
console.log(JSON.stringify(err))
},
complete() {}
})49) 查询设备角色语音关系
接口名称
findDeviceRoleVoiceRelV2功能描述
查询设备角色语音关系。参数
| 属性 | 类型 | 默认值 | 必填 | 说明 | | ------------ | -------- | ------ | ---- | ------------------------------------------------------------------- | | deviceInfoId | number | - | 否 | 设备信息ID(优先以deviceInfoId为主,没有的话处理pk、dk、endUserId) | | productKey | string | - | 否 | 设备PK | | deviceKey | string | - | 否 | 设备DK | | endUserId | string | - | 否 | 终端用户ID | | success | function | - | 是 | 接口调用成功的回调函数 | | fail | function | - | 否 | 接口调用失败的回调函数 | | complete | function | - | 否 | 接口调用结束的回调函数(调用成功、失败都会执行) |
返回数据
- success(res):接口成功响应。
示例代码
plugin.ai.findDeviceRoleVoiceRelV2({
deviceInfoId: 1,
productKey: '',
deviceKey: '',
success(res) {
console.log(res)
},
fail(err) {
console.log(JSON.stringify(err))
},
complete() {}
})50) 发送设备消息
接口名称
deviceMessageV2功能描述
发送设备消息。参数
| 属性 | 类型 | 默认值 | 必填 | 说明 | | ------------ | -------- | ------ | ---- | ----------------------------------------------------------------------- | | roleId | number | - | 是 | 角色ID | | status | number | - | 是 | 刷新:0,加载:1 | | deviceInfoId | number | - | 否 | 设备信息ID(优先以deviceInfoId为主,没有的话处理pk、dk、endUserId) | | productKey | string | - | 否 | 设备PK | | deviceKey | string | - | 否 | 设备DK | | endUserId | string | - | 否 | 终端用户ID | | afterId | string | - | 否 | status=0:指定为返回结果中的 lastId;status=1:指定为返回结果中的 firstId | | limit | number | - | 否 | 每页条数 | | success | function | - | 是 | 接口调用成功的回调函数 | | fail | function | - | 否 | 接口调用失败的回调函数 | | complete | function | - | 否 | 接口调用结束的回调函数(调用成功、失败都会执行) |
返回数据
- success(res):接口成功响应。
示例代码
plugin.ai.deviceMessageV2({
roleId: 1,
status: 1,
deviceInfoId: 1,
success(res) {
console.log(res)
},
fail(err) {
console.log(JSON.stringify(err))
},
complete() {}
})51) 查询记忆总结
接口名称
getSummaryV2功能描述
查询记忆总结。参数
| 属性 | 类型 | 默认值 | 必填 | 说明 | | ------------ | -------- | ------ | ---- | ------------------------------------------------ | | day | string | - | 是 | 时间格式:(YYYYMMDD)如:20250606 | | deviceInfoId | number | - | 否 | 设备信息ID | | productKey | string | - | 否 | 设备PK | | deviceKey | string | - | 否 | 设备DK | | endUserId | string | - | 否 | 终端用户ID | | success | function | - | 是 | 接口调用成功的回调函数 | | fail | function | - | 否 | 接口调用失败的回调函数 | | complete | function | - | 否 | 接口调用结束的回调函数(调用成功、失败都会执行) |
返回数据
- success(res):接口成功响应。
示例代码
plugin.ai.getSummaryV2({
day: '',
deviceInfoId: 1,
productKey: '',
success(res) {
console.log(res)
},
fail(err) {
console.log(JSON.stringify(err))
},
complete() {}
})52) 修改设备角色语音
接口名称
editDeviceRoleVoiceV2功能描述
修改设备角色语音。参数
| 属性 | 类型 | 默认值 | 必填 | 说明 | | ------------ | -------- | ------ | ---- | -----------------------------------
