-
Notifications
You must be signed in to change notification settings - Fork 4k
.Net: Introduce Grounding with Google Search configuration #11804
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
@microsoft-github-policy-service agree |
Are there any blockers to merge this? |
{ | ||
request.Tools.Add(new GeminiTool()); | ||
} | ||
request.Tools[0].GoogleSearch = new GeminiTool.GoogleSearchProperties(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not fully sure of this behavior here, in theory this adds the configuration to existing tools as well, and just the first of them?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@RogerBarreto Actually, according to their documentation combining search with function calling isn't yet supported. Ref: https://ai.google.dev/gemini-api/docs/grounding?lang=rest#configure-search
So from what I've tested, this configuration overrides the function call declaration. But I believe we could adjust to add this tool to the array instead of setting to the first one, wdyt?
Motivation and Context
This PR is enables the configuration of Grouding with Google Search in the Gemini API.
Description
grounding_config
that receivesgoogle_search
objectgoogleSearch
under tools object if configured.Contribution Checklist
[Y] The code builds clean without any errors or warnings
[Y] The PR follows the SK Contribution Guidelines and the pre-submission formatting script raises no violations
[Y] All unit tests pass, and I have added new tests where possible
[Y] I didn't break anyone 😄
Resolves .Net: New Feature: Gemini Grounding with Google Search #11735