拓展练习对话主要针对较为开放的交流场景。在练习过程中,虽然AI提出的问题没有预设答案,但用户仍需在相关话题内进行回答。若用户回答偏离主题,AI会尝试引导其回归话题。如果用户连续两次跑题,AI将引导其继续下一个话题。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
aicontent:AITeacherExecuteExpansionPractice |
create |
*全部资源
|
无 | 无 |
请求语法
POST /api/v1/aiteacher/expansionPractice/executeExpansionTraining HTTP/1.1
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| body |
object |
否 |
请求 body 参数 |
|
| records |
array<object> |
否 |
对话记录集合 |
|
|
object |
否 |
对话记录结构体 |
||
| content |
string |
是 |
对话内容 |
Ask Mark if he has thought about what his dream job might be. |
| role |
string |
是 |
角色身份 枚举值:
|
AI:assistant;用户:user |
| isOnTopic |
boolean |
否 |
是否扣题 |
扣题:true, 不扣题:false |
| isOffTopicControl |
boolean |
否 |
是否跑题,带流程控制作用。 反映了学生的回答是否符合对话任务的设定,该参数的值来源于之前轮次的对话返回结果。此外,该参数还具有流程控制的作用。 跑题超过两次,取值会强制置为 true,用于强制切换任务。 |
跑题:true, 不跑题:false |
| order |
integer |
是 |
排序编号 |
1 |
| dialogueTasks |
array<object> |
是 |
对话任务对话内容集合 |
|
|
object |
是 |
|||
| assistant |
string |
是 |
AI 对话内容 |
Why might some people think dog walking is a great job? |
| assistantTranslate |
string |
否 |
AI 对话内容翻译 |
为什么有些人认为遛狗是份好差事? |
| user |
string |
是 |
用户对话内容 |
They think it's great because they won't be stuck in an office. |
| order |
integer |
是 |
排序编号 |
1 |
| languageCode |
string |
否 |
语言编码 枚举值:
|
en-gb |
| background |
string |
是 |
对话背景描述 |
In a career counseling session, we are going to discuss our dream jobs and the responsibilities associated with them. Alex, who dreams of becoming a professional travel blogger, will share the tasks and skills required for this role, while Jamie, aspiring to be a wildlife photographer, will outline the responsibilities and challenges of capturing nature's moments. Both will explore how their interests align with the practical aspects of their chosen careers, discussing the potential for travel, creativity, and the impact of their work on society and the environment. |
| roleInfo |
object |
是 |
角色设置 |
|
| assistant |
string |
是 |
AI 的名字 |
Alex |
| user |
string |
是 |
用户的名字 |
Jamie |
| topic |
string |
是 |
主题 |
Let's talk about traffic rules. |
| startSentence |
string |
否 |
开场语 |
Hello Lily, could you please come to the kitchen for a moment? |
| userId |
string |
是 |
用户 Id |
886eba3702xxxxxxxxx4ba52a87a525 |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
OpenApiSingleResponse |
||
| requestId |
string |
请求编号 |
xxxx-xxxx-xxxx-xxxxxxxx |
| success |
boolean |
是否成功 |
true |
| errCode |
string |
错误信息编码 |
UNKNOWN_ERROR |
| errMessage |
string |
错误信息 |
未知错误 |
| httpStatusCode |
integer |
http 状态码 |
200 |
| data |
object |
数据对象 |
[] |
| englishResult |
string |
AI 老师的英文回复 |
1 |
| chineseResult |
string |
AI 老师的中文回复 |
1 |
| isFinish |
boolean |
是否完成对话 |
true |
| isOffTopicControl |
boolean |
是否跑题 |
true |
| isOnTopic |
boolean |
是否扣题 |
true |
| questionIndex |
integer |
当前作答的问题编号 |
2 |
示例
正常返回示例
JSON格式
{
"requestId": "xxxx-xxxx-xxxx-xxxxxxxx",
"success": true,
"errCode": "UNKNOWN_ERROR",
"errMessage": "未知错误",
"httpStatusCode": 200,
"data": {
"englishResult": "1",
"chineseResult": "1",
"isFinish": true,
"isOffTopicControl": true,
"isOnTopic": true,
"questionIndex": 2
}
}
错误码
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。