fix(aihr): add semantic daily drill scoring fallback
This commit is contained in:
@@ -370,7 +370,8 @@ const assignmentDesc = (item: PracticeAssignment) => {
|
||||
if (item.source === 'daily' && item.status !== '已完成') return '提交后显示反馈与参考答案';
|
||||
if (item.source === 'daily' && item.status === '已完成') {
|
||||
const score = typeof item.score === 'number' ? `得分 ${item.score} 分` : '';
|
||||
return [score, item.feedback || item.reason].filter(Boolean).join(' · ');
|
||||
const mode = item.scoreMode === 'LLM' ? 'AI语义评估' : '规则兜底';
|
||||
return [score, mode, item.feedback || item.reason].filter(Boolean).join(' · ');
|
||||
}
|
||||
return item.feedback || item.reason;
|
||||
};
|
||||
@@ -682,12 +683,14 @@ const submitDaily = async (item: PracticeAssignment) => {
|
||||
feedback: result.feedback,
|
||||
referenceAnswer: result.referenceAnswer,
|
||||
correct: result.correct,
|
||||
score: result.score,
|
||||
scoreMode: result.scoreMode,
|
||||
audioUrl: result.audioUrl || audioUrl,
|
||||
audioOssId: result.audioOssId || audioOssId
|
||||
}
|
||||
: row
|
||||
);
|
||||
message.value = `每日三题得分 ${result.score}`;
|
||||
message.value = `每日三题得分 ${result.score}(${result.scoreMode === 'LLM' ? 'AI语义评估' : '规则兜底'})`;
|
||||
} catch (error) {
|
||||
handleError(error, '每日三题提交失败');
|
||||
} finally {
|
||||
|
||||
@@ -310,6 +310,7 @@ export interface PracticeAssignment {
|
||||
feedback?: string;
|
||||
correct?: boolean | null;
|
||||
score?: number | null;
|
||||
scoreMode?: string;
|
||||
audioUrl?: string;
|
||||
audioOssId?: number | string;
|
||||
}
|
||||
@@ -330,6 +331,7 @@ export interface DailyDrillAnswerResponse {
|
||||
score: number;
|
||||
feedback: string;
|
||||
referenceAnswer: string;
|
||||
scoreMode?: string;
|
||||
audioUrl?: string;
|
||||
audioOssId?: number | string;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user