fix: adjust reduction ratio threshold and update logging in reducer

This commit is contained in:
Han Xiao 2025-06-12 19:24:56 -07:00
parent c74911ee58
commit 7621f589b2

View File

@ -89,8 +89,8 @@ export async function reduceAnswers(
const reductionRatio = reducedLength / totalLength;
if (reductionRatio < 0.5) {
logWarning(`reduce content length ${reducedLength} is significantly shorter than original content ${totalLength}, return original content instead.`, {
if (reductionRatio < 0.6) {
logWarning(`reducer content length ${reducedLength} is significantly shorter than original content ${totalLength}, return original content instead.`, {
originalContent: answers,
repairedContent: result.text
});