Skip to content

Commit 061090d

Browse files
authored
Enable Grounding with Google Search tool
Signed-off-by: Mohab Mohie <[email protected]>
1 parent 483ca60 commit 061090d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

netlify/functions/gemini-proxy.mjs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,11 @@ export default async (req) => {
9898
const model = genAI.getGenerativeModel({
9999
model: modelName,
100100
systemInstruction: systemInstruction,
101+
tools: [
102+
{
103+
googleSearch: {}, // This one line enables Grounding
104+
},
105+
],
101106
});
102107

103108
const chat = model.startChat({

0 commit comments

Comments
 (0)