feat: use s.jina.ai for search

This commit is contained in:
Han Xiao
2025-02-05 16:11:12 +08:00
parent 5e7dce3add
commit 36722eacaa

View File

@@ -339,7 +339,7 @@ export async function getResponse(question: string, tokenBudget: number = 1_000_
const currentQuestion = gaps.length > 0 ? gaps.shift()! : question;
// update all urls with buildURLMap
allowRead = allowRead && (Object.keys(allURLs).length > 0);
allowSearch = allowSearch && (Object.keys(allURLs).length < 20); // disable search when too many urls already
allowSearch = allowSearch && (Object.keys(allURLs).length < 50); // disable search when too many urls already
// generate prompt for this step
prompt = getPrompt(