fix: url datetime guessing

This commit is contained in:
Han Xiao
2025-03-06 17:38:13 +08:00
parent 1604013788
commit c06565532f

View File

@@ -816,10 +816,13 @@ But unfortunately, you failed to solve the issue. You need to think out of the b
console.log(thisStep) console.log(thisStep)
await storeContext(system, schema, {allContext, allKeywords, allQuestions, allKnowledge, weightedURLs}, totalStep); await storeContext(system, schema, {allContext, allKeywords, allQuestions, allKnowledge, weightedURLs}, totalStep);
// max return 300 urls
const returnedURLs = weightedURLs.slice(0, 300).map(r => r.url)
return { return {
result: thisStep, result: thisStep,
context, context,
visitedURLs: [...new Set([...visitedURLs, ...Object.keys(allURLs)])], visitedURLs: returnedURLs,
readURLs: visitedURLs, readURLs: visitedURLs,
}; };