Skip to content

Commit

Permalink
移除搜索工具支持
Browse files Browse the repository at this point in the history
  • Loading branch information
Thinker-Joe authored Feb 10, 2025
1 parent be7b5dc commit bc6300c
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions src/worker.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -330,18 +330,6 @@ const transformRequest = async (req) => {
safetySettings,
generationConfig: transformConfig(req)
};

// 检查模型是否以 gemini-2.0-flash-exp 开头
if (req.model?.startsWith('gemini-2.0-flash-exp')) {
// 为 gemini-2.0-flash 模型添加 tools
return {
...baseRequest,
tools: [{
"google_search": {}
}]
};
}

// 其他模型返回原始请求
return baseRequest;
};
Expand Down

0 comments on commit bc6300c

Please sign in to comment.