fix: preserve complete consultation replies and recover retained history
This commit is contained in:
@@ -62,12 +62,12 @@ export function teacherHistoryMessages(history: TeacherRequest[]): TeacherSource
|
||||
id: 'teacher:' + request.id + ':user', role: 'user' as const,
|
||||
text: [...request.references.map(ref => '明确引用:\n' + ref.text), request.text].join('\n\n'),
|
||||
}]),
|
||||
{
|
||||
...(request.replyIncomplete ? [] : [{
|
||||
id: 'teacher:' + request.id + ':assistant', role: 'assistant' as const,
|
||||
text: [request.response, ...(request.suggestedQuestions?.length
|
||||
? ['可以接着聊的问题:\n' + request.suggestedQuestions.map(text => '- ' + text).join('\n')]
|
||||
: [])].join('\n\n'),
|
||||
},
|
||||
}]),
|
||||
]);
|
||||
}
|
||||
// A bounded text estimate for the native model path, not an exact tokenizer or
|
||||
|
||||
Reference in New Issue
Block a user