Skip to content

Commit c065655

Browse files
committed
fix: url datetime guessing
1 parent 1604013 commit c065655

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/agent.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -816,10 +816,13 @@ But unfortunately, you failed to solve the issue. You need to think out of the b
816816
console.log(thisStep)
817817

818818
await storeContext(system, schema, {allContext, allKeywords, allQuestions, allKnowledge, weightedURLs}, totalStep);
819+
820+
// max return 300 urls
821+
const returnedURLs = weightedURLs.slice(0, 300).map(r => r.url)
819822
return {
820823
result: thisStep,
821824
context,
822-
visitedURLs: [...new Set([...visitedURLs, ...Object.keys(allURLs)])],
825+
visitedURLs: returnedURLs,
823826
readURLs: visitedURLs,
824827
};
825828

0 commit comments

Comments
 (0)