fix: 智障吧我是

This commit is contained in:
ikechan8370 2025-02-15 19:20:52 +08:00
parent 83c481a4bc
commit 870eba51d2

View file

@ -18,12 +18,12 @@ export class SerpImageTool extends AbstractTool {
description: 'search source, bing or yandex' description: 'search source, bing or yandex'
} }
}, },
required: ['q'] required: ['q', 'source']
} }
func = async function (opts) { func = async function (opts) {
let { q, limit = 2, source = 'bing' } = opts let { q, limit = 2, source = 'bing' } = opts
let serpRes = await fetch(`https://serp.ikechan8370.com/${source}/bing?q=${encodeURIComponent(q)}&limit=${limit}`, { let serpRes = await fetch(`https://serp.ikechan8370.com/image/${source}?q=${encodeURIComponent(q)}&limit=${limit}`, {
headers: { headers: {
'X-From-Library': 'ikechan8370' 'X-From-Library': 'ikechan8370'
} }