From d5df72515862d4fd415c7c982e8826e041fd0154 Mon Sep 17 00:00:00 2001 From: sxjeru Date: Fri, 13 Dec 2024 12:03:44 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix:=20Revert=20"Enable=20google?= =?UTF-8?q?Search=20Tool=20for=20gemini-2.0-flash-exp=20(#4997)"=20(#5003)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit cde0d1a6c13b3d27ef472301715406e829eaa7bd. --- src/libs/agent-runtime/google/index.ts | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/libs/agent-runtime/google/index.ts b/src/libs/agent-runtime/google/index.ts index 45c2d42b01a0..24fc6852b878 100644 --- a/src/libs/agent-runtime/google/index.ts +++ b/src/libs/agent-runtime/google/index.ts @@ -91,12 +91,7 @@ export class LobeGoogleAI implements LobeRuntimeAI { .generateContentStream({ contents, systemInstruction: payload.system as string, - tools: (() => { - if (!payload.tools && model.startsWith('gemini-2.0')) { - return [{ googleSearch: {} } as GoogleFunctionCallTool]; - } - return this.buildGoogleTools(payload.tools); - })(), + tools: this.buildGoogleTools(payload.tools), }); const googleStream = convertIterableToStream(geminiStreamResult.stream);