fix: 修正学习流程中的证据、复习与进度问题
- 独立尝试按课程要求校验内容,不再任意输入即算独立成功 - 复习节点改为学后第 1/3/7/14 天,之后每 30 天抽查;复习轮换情境 - 掌握状态按作答记录推导:需认识、可回忆、跨情境使用及最近两次无帮助 - 课程证据按实际用到的目标记录;跟读与课程对话只算辅助练习 - 复习成功不再降低已有状态 - 学完课程后进入下一节未完成课程;全部学完后引导巩固与阶段评估 - 新增 3 题基础定位,按结果设置起始课程 - 新增按课程开放的对话场景,首页推荐最少练习的场景 - 切换课程时清空上一课的步骤进度 - AI 返回 JSON 格式并按 JSON 回放历史;拼写校验忽略大小写与连字符;移除学习目标选择 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -382,12 +382,19 @@ class AiService {
|
||||
// with a small token cap, so reasoning only adds cost and can exhaust the
|
||||
// cap before the JSON is written. Other providers may reject these
|
||||
// DeepSeek-specific switches, so they keep the original payload.
|
||||
//
|
||||
// Every prompt asks for JSON, but without JSON Output DeepSeek copies the
|
||||
// plain-text assistant turns in a dialogue history and answers in plain
|
||||
// text about half the time, which the app then treats as a failed call.
|
||||
if (_isDeepSeek(uri)) {
|
||||
return isResponses
|
||||
? {
|
||||
'model': model,
|
||||
'input': messages,
|
||||
'reasoning': {'effort': 'none'},
|
||||
'text': {
|
||||
'format': {'type': 'json_object'},
|
||||
},
|
||||
'temperature': ?temperature,
|
||||
'max_output_tokens': ?maxTokens,
|
||||
}
|
||||
@@ -395,6 +402,7 @@ class AiService {
|
||||
'model': model,
|
||||
'messages': messages,
|
||||
'thinking': {'type': 'disabled'},
|
||||
'response_format': {'type': 'json_object'},
|
||||
'temperature': ?temperature,
|
||||
'max_tokens': ?maxTokens,
|
||||
};
|
||||
@@ -787,7 +795,18 @@ class AiService {
|
||||
endpoint: endpoint,
|
||||
model: model,
|
||||
system: system,
|
||||
messages: history,
|
||||
// Earlier AI lines are stored as plain English. Sent that way they teach
|
||||
// the model to answer in plain text (or, in JSON mode, with blanks), so
|
||||
// they are replayed in the JSON shape the system prompt asks for.
|
||||
messages: [
|
||||
for (final message in history)
|
||||
message['role'] == 'assistant'
|
||||
? {
|
||||
'role': 'assistant',
|
||||
'content': jsonEncode({'reply': message['content']}),
|
||||
}
|
||||
: message,
|
||||
],
|
||||
temperature: 0.3,
|
||||
maxTokens: 300,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user