Skip to content

Commit b53a3a6

Browse files
committed
fix: Update Google Search example
1 parent 477b268 commit b53a3a6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

generative-ai/snippets/grounding/groundingPublicDataBasic.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,13 @@ async function generateContentWithGoogleSearchGrounding(
3131
generationConfig: {maxOutputTokens: 256},
3232
});
3333

34-
const googleSearchRetrievalTool = {
35-
googleSearchRetrieval: {},
34+
const googleSearchTool = {
35+
googleSearch: {},
3636
};
3737

3838
const request = {
3939
contents: [{role: 'user', parts: [{text: 'Why is the sky blue?'}]}],
40-
tools: [googleSearchRetrievalTool],
40+
tools: [googleSearchTool],
4141
};
4242

4343
const result = await generativeModelPreview.generateContent(request);

0 commit comments

Comments
 (0)