Access to Google and Gemini #5
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Currently
web_searchinsrc/agent/tools/web.rsuseshttps://html.duckduckgo.com/html/?q={}and that should work (they shouldn't mind if it's low traffic and potentially good publicity for them); if it doesn't work there are other alternatives likehttps://www.startpage.com/sp/search?q={}(andhttps://www.bing.com/search?q=but Bing seems to have a "monoculture" problem in its results).The market leader in the Western world is Google but it puts up CAPTCHAs if it doesn't detect a full-strength desktop browser (and sometimes even if it does, which is really annoying if you have any kind of visual impairment).
But you can obtain a free-tier rate-limited API key to access Google search indirectly via API queries to Gemini. This worked for me just now:
and test:
Like all search results it's not necessarily a source of truth but a source of what people are seeing (which can still be useful information in some circumstances); in this case it seems to have inferred negative comments on Reddit deserve near parity (that's probably done by Google's search ranking system; the model just summarised what it saw). You can get links to its sources via
response.candidates[0].grounding_metadata.grounding_chunks(each list item has.titleand.uri) andresponse.candidates[0].grounding_metadata.grounding_supports(each has.grounding_chunk_indicesindexing into thegrounding_chunkslist and possibly.start_index,.end_indexpointing to the part of the response that's "grounded" by these sources and.segment.textcontaining the actual text the model extracted from the sources.There is a Rust version of
google-genaibut I haven't tried it.