You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I get the following error in the grounding web sample with Gemini Flash 2.0. How can I make this request with C# .Net 8?
Thank you for your time.
Error message: Status(StatusCode="InvalidArgument", Detail="Unable to submit request because Please use google_search field instead of google_search_retrieval field.. Learn more: https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/gemini")
var generateContentRequest = new GenerateContentRequest
{
Model = $"projects/{projectId}/locations/{location}/publishers/{publisher}/models/{model}",
GenerationConfig = new GenerationConfig
{
Temperature = 0.0f
},
Contents =
{
new Content
{
Role = "USER",
Parts = { new Part { Text = "When is the next total solar eclipse in US?" } }
}
},
Tools =
{
new Tool
{
GoogleSearchRetrieval = new GoogleSearchRetrieval()
}
}
};
The text was updated successfully, but these errors were encountered:
Hello,
I get the following error in the grounding web sample with Gemini Flash 2.0. How can I make this request with C# .Net 8?
Thank you for your time.
Error message:
Status(StatusCode="InvalidArgument", Detail="Unable to submit request because Please use google_search field instead of google_search_retrieval field.. Learn more: https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/gemini")
Sample:
https://github.com/GoogleCloudPlatform/dotnet-docs-samples/blob/main/aiplatform/api/AIPlatform.Samples/GroundingWebSample.cs#L57
The text was updated successfully, but these errors were encountered: