Skip to content
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

🐛 [firebase_vertexai] Support google search retrieval grounding tool #16843

Open
MaggieThomann opened this issue Dec 6, 2024 · 0 comments
Labels
Needs Attention This issue needs maintainer attention. platform: all Issues / PRs which are for all platforms. plugin: vertexai label issues for vertexai plugin type: enhancement New feature or request

Comments

@MaggieThomann
Copy link

Support google search retrieval grounding tool

Google released grounding with Google Search for the Gemini API. I'd like to be able to simply specify google_search_retrieval as the tool name when creating my GenerativeModel in order to be able to use it. Similar to how it's done in the API docs here:

model = genai.GenerativeModel('models/gemini-1.5-pro-002')
response = model.generate_content(contents="Who won Wimbledon this year?",
                                  tools='google_search_retrieval')
print(response)

Right now, if I try to set it up, I need to do something like this:

final googleSearchGrounding = FunctionDeclaration(
        'google_search_retrieval'
      );

And pass it like this:

model = vertexAI.generativeModel(
        tools: [Tool.functionDeclarations([googleSearchGrounding])],

But that's not working because FunctionDeclaration also expects parameters. I'd like to avoid having to declare a function declaration for it and just be able to pass the name google_search_retrieval directly somehow.

@MaggieThomann MaggieThomann added Needs Attention This issue needs maintainer attention. type: enhancement New feature or request labels Dec 6, 2024
@SelaseKay SelaseKay added platform: all Issues / PRs which are for all platforms. plugin: vertexai label issues for vertexai plugin labels Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Attention This issue needs maintainer attention. platform: all Issues / PRs which are for all platforms. plugin: vertexai label issues for vertexai plugin type: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants