chore: first commit

This commit is contained in:
Han Xiao 2025-02-02 21:02:29 +08:00
parent c793cb9bbc
commit cbd7445806

View File

@ -266,7 +266,7 @@ async function getResponse(question: string, tokenBudget: number = 1_000_000, ma
await sleep(STEP_SLEEP);
step++;
totalStep++;
console.log(`Step ${totalStep}`);
console.log(`Step ${totalStep} / Budget used ${(tokenTracker.getTotalUsage() / tokenBudget * 100).toFixed(2)}%`);
console.log('Gaps:', gaps);
allowReflect = allowReflect && (gaps.length <= 1);
const currentQuestion = gaps.length > 0 ? gaps.shift()! : question;
@ -587,7 +587,8 @@ You decided to think out of the box or cut from a completely different angle.`);
await storeContext(prompt, [allContext, allKeywords, allQuestions, allKnowledge], totalStep);
}
step++;
totalStep++;
await storeContext(prompt, [allContext, allKeywords, allQuestions, allKnowledge], totalStep);
if (isAnswered) {
return thisStep;