mirror of
https://github.com/jina-ai/node-DeepResearch.git
synced 2026-03-22 07:29:35 +08:00
fix: gen obj retry
This commit is contained in:
@@ -34,20 +34,20 @@
|
|||||||
"models": {
|
"models": {
|
||||||
"gemini": {
|
"gemini": {
|
||||||
"default": {
|
"default": {
|
||||||
"model": "gemini-2.0-flash-lite",
|
"model": "gemini-2.0-flash",
|
||||||
"temperature": 0.6,
|
"temperature": 0.6,
|
||||||
"maxTokens": 8000
|
"maxTokens": 8000
|
||||||
},
|
},
|
||||||
"tools": {
|
"tools": {
|
||||||
"coder": { "maxTokens": 2000 },
|
"coder": { "maxTokens": 2000, "model": "gemini-2.0-flash-lite" },
|
||||||
"searchGrounding": { },
|
"searchGrounding": {},
|
||||||
"dedup": { },
|
"dedup": { },
|
||||||
"evaluator": {"maxTokens": 2000 },
|
"evaluator": {"maxTokens": 2000 },
|
||||||
"errorAnalyzer": {"maxTokens": 1000},
|
"errorAnalyzer": {"maxTokens": 1000},
|
||||||
"queryRewriter": {"maxTokens": 2000},
|
"queryRewriter": {"maxTokens": 2000},
|
||||||
"agent": {"model": "gemini-2.0-flash" },
|
"agent": {},
|
||||||
"agentBeastMode": {},
|
"agentBeastMode": {},
|
||||||
"fallback": {"maxTokens": 8000}
|
"fallback": {"maxTokens": 8000, "model": "gemini-2.0-flash-lite"}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"openai": {
|
"openai": {
|
||||||
|
|||||||
@@ -508,7 +508,7 @@ export async function getResponse(question?: string,
|
|||||||
allowReflect = true;
|
allowReflect = true;
|
||||||
allowRead = true;
|
allowRead = true;
|
||||||
allowSearch = true;
|
allowSearch = true;
|
||||||
// allowCoding = true;
|
allowCoding = true;
|
||||||
|
|
||||||
// execute the step and action
|
// execute the step and action
|
||||||
if (thisStep.action === 'answer' && thisStep.answer) {
|
if (thisStep.action === 'answer' && thisStep.answer) {
|
||||||
@@ -562,6 +562,9 @@ export async function getResponse(question?: string,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (currentQuestion.trim() === question) {
|
if (currentQuestion.trim() === question) {
|
||||||
|
// disable coding for preventing answer degradation
|
||||||
|
allowCoding = false;
|
||||||
|
|
||||||
if (evaluation.pass) {
|
if (evaluation.pass) {
|
||||||
diaryContext.push(`
|
diaryContext.push(`
|
||||||
At step ${step}, you took **answer** action and finally found the answer to the original question:
|
At step ${step}, you took **answer** action and finally found the answer to the original question:
|
||||||
|
|||||||
Reference in New Issue
Block a user