fix: gen obj retry

This commit is contained in:
Han Xiao 2025-03-20 09:56:21 +08:00
parent 2cf9061a39
commit 8fa9aaa151
2 changed files with 9 additions and 6 deletions

View File

@ -34,20 +34,20 @@
"models": {
"gemini": {
"default": {
"model": "gemini-2.0-flash-lite",
"model": "gemini-2.0-flash",
"temperature": 0.6,
"maxTokens": 8000
},
"tools": {
"coder": { "maxTokens": 2000 },
"searchGrounding": { },
"coder": { "maxTokens": 2000, "model": "gemini-2.0-flash-lite" },
"searchGrounding": {},
"dedup": { },
"evaluator": {"maxTokens": 2000 },
"errorAnalyzer": {"maxTokens": 1000},
"queryRewriter": {"maxTokens": 2000},
"agent": {"model": "gemini-2.0-flash" },
"agent": {},
"agentBeastMode": {},
"fallback": {"maxTokens": 8000}
"fallback": {"maxTokens": 8000, "model": "gemini-2.0-flash-lite"}
}
},
"openai": {

View File

@ -508,7 +508,7 @@ export async function getResponse(question?: string,
allowReflect = true;
allowRead = true;
allowSearch = true;
// allowCoding = true;
allowCoding = true;
// execute the step and action
if (thisStep.action === 'answer' && thisStep.answer) {
@ -562,6 +562,9 @@ export async function getResponse(question?: string,
}
if (currentQuestion.trim() === question) {
// disable coding for preventing answer degradation
allowCoding = false;
if (evaluation.pass) {
diaryContext.push(`
At step ${step}, you took **answer** action and finally found the answer to the original question: