fix: s dot jina

This commit is contained in:
Han Xiao
2025-03-13 07:47:47 +08:00
parent 4d76f146d0
commit 4fc4fa8fa9

View File

@@ -13,13 +13,12 @@ export function search(query: string, tracker?: TokenTracker): Promise<{ respons
const options = { const options = {
hostname: 's.jina.ai', hostname: 's.jina.ai',
port: 443, port: 443,
path: `/${encodeURIComponent(query)}?count=10`, path: `/?q=${encodeURIComponent(query)}`,
method: 'GET', method: 'GET',
headers: { headers: {
'Accept': 'application/json', 'Accept': 'application/json',
'Authorization': `Bearer ${JINA_API_KEY}`, 'Authorization': `Bearer ${JINA_API_KEY}`,
'X-Respond-With': 'no-content', 'X-Respond-With': 'no-content',
'X-Retain-Images': 'none'
} }
}; };