Skip to content

Commit

Permalink
🐛 fix: Revert "Enable googleSearch Tool for gemini-2.0-flash-exp (lob…
Browse files Browse the repository at this point in the history
…ehub#4997)" (lobehub#5003)

This reverts commit cde0d1a.
  • Loading branch information
sxjeru authored Dec 13, 2024
1 parent c7b04d1 commit d5df725
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/libs/agent-runtime/google/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit d5df725

Please sign in to comment.