Skip to content

Native Tools Response metadata missing #907

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

Open
philschmid opened this issue May 8, 2025 · 0 comments
Open

Native Tools Response metadata missing #907

philschmid opened this issue May 8, 2025 · 0 comments

Comments

@philschmid
Copy link

I am trying to use the native google_search tool with:

from google.ai.generativelanguage_v1beta.types import Tool as GenAITool

resp = llm.invoke(
    "When is the next total solar eclipse in US?",
    tools=[GenAITool(google_search={})],
)

print(resp.content)

It correctly works but the response is missing all information about the grounding from which urls where used to citations options. The google-genai sdk returns grounding_metadata.grounding_supports and grounding_metadata.grounding_chunks, which detail what part is backed by a search, e.g.

{'start_index': 0, 'end_index': 81, 'segments': ['[0](https://en.wikipedia.org/wiki/UEFA_Euro_2024)',
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant