mirror of
https://github.com/lobehub/lobehub.git
synced 2026-03-27 13:29:15 +07:00
🐛 fix: 修正搜索引擎插件的实现问题
This commit is contained in:
@@ -20,7 +20,7 @@ export default async function handler(req: Request) {
|
||||
if (func) {
|
||||
const result = await func.runner(args as any);
|
||||
|
||||
console.log(`[${name}]`, 'args:', args, `Result:`, JSON.stringify(result, null, 2));
|
||||
console.log(`[${name}]`, args, `result:`, JSON.stringify(result, null, 2));
|
||||
|
||||
const newMessages = createFunctionCallMessages(result) as ChatCompletionRequestMessage[];
|
||||
|
||||
|
||||
@@ -76,9 +76,14 @@ export interface DetectedExtensions {
|
||||
month_ago: number;
|
||||
}
|
||||
|
||||
const fetchResult = async (keywords: string) => {
|
||||
const fetchResult = async ({ keywords }: { keywords: string }) => {
|
||||
const params = {
|
||||
api_key: API_KEY,
|
||||
engine: 'google',
|
||||
gl: 'cn',
|
||||
google_domain: 'google.com',
|
||||
hl: 'zh-cn',
|
||||
location: 'China',
|
||||
q: keywords,
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user