Re:Improved Gemini 2.5 Flash and Flash-Lite
by behnamoh on Thursday September 25, 2025 @11:14PM
(#45382216)
Does any other provider allow that? what use cases are there for JSON + tool calling at the same time?
[ Parent
| on HN ]
Re:Improved Gemini 2.5 Flash and Flash-Lite
by chrisweekly on Thursday September 25, 2025 @11:41PM
(#45382378)
Please correct my likely misunderstanding here, but on the surface, it seems to me that "call some tools then return JSON" has some pretty common use cases.
Re:Improved Gemini 2.5 Flash and Flash-Lite
by wahnfrieden on Thursday September 25, 2025 @11:41PM
(#45382381)
OpenAI
Re:Improved Gemini 2.5 Flash and Flash-Lite
by ayende on Friday September 26, 2025 @01:39AM
(#45383055)
OpenAI, Ollama, DeepSeek all do that.
And wanting to programmatically work with the result + allow tool calls is super common.
Re:Improved Gemini 2.5 Flash and Flash-Lite
by victorbjorklund on Friday September 26, 2025 @03:56AM
(#45383942)
Let's say you wanna build an app that gives back structured data after a web search. First a tool call to a search api. Then do some reasoning/summar/etc on the data returned by the tool. And finally return JSON.
Re:Improved Gemini 2.5 Flash and Flash-Lite
by shijithpk on Tuesday September 30, 2025 @02:05PM
(#45428947)
Suppose there's a pdf with lots of tables i want to scrape. I mention the pdf url in my message and with gemini's url context tool, i now have access to the pdf.
I can ask gemini to give me the pdf's content as a json and it complies most of the time. But at times, there's an introductory line like "Here's your json:". Those introductory lines interfere with programmatically using the output. They're sometimes there, sometimes not.
If I could have structured output at the same time as tool use, I can reliably use what gemini spits out as it'll be in a json, no annoying intro lines.