diff --git a/src/agent.ts b/src/agent.ts index 64c946f..517a315 100644 --- a/src/agent.ts +++ b/src/agent.ts @@ -799,7 +799,11 @@ But unfortunately, you failed to solve the issue. You need to think out of the b console.log(thisStep) await storeContext(system, schema, [allContext, allKeywords, allQuestions, allKnowledge], totalStep); - return {result: thisStep, context, visitedURLs: [...visitedURLs, ...Object.keys(allURLs)]}; + return { + result: thisStep, + context, + visitedURLs: [...new Set([...visitedURLs, ...Object.keys(allURLs)])] + }; }