Skip to content

Commit c9a310d

Browse files
committed
Grounding Web with Gemini Flash 2.0 - google_search field instead of google_search_retrieval GoogleCloudPlatform#2914
1 parent 283ac79 commit c9a310d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

aiplatform/api/AIPlatform.Samples/GroundingWebSample.cs

+3-2
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,15 @@
1919
using Google.Cloud.AIPlatform.V1;
2020
using System;
2121
using System.Threading.Tasks;
22+
using static Google.Cloud.AIPlatform.V1.Tool.Types;
2223

2324
public class GroundingWebSample
2425
{
2526
public async Task<string> GenerateTextWithGroundingWeb(
2627
string projectId = "your-project-id",
2728
string location = "us-central1",
2829
string publisher = "google",
29-
string model = "gemini-1.5-flash-001"
30+
string model = "gemini-2.0-flash-001"
3031
)
3132
{
3233
var predictionServiceClient = new PredictionServiceClientBuilder
@@ -54,7 +55,7 @@ public async Task<string> GenerateTextWithGroundingWeb(
5455
{
5556
new Tool
5657
{
57-
GoogleSearchRetrieval = new GoogleSearchRetrieval()
58+
GoogleSearch = new GoogleSearch()
5859
}
5960
}
6061
};

0 commit comments

Comments
 (0)