Hello,
i would like to get my results from Gemini-Calls back as a JSON. I know that the Gemini API can be configured to be forced to send results back in a certain json format. But how do i configure this in the Gemini-Make-Connection?
Thanks a lot!
I would be also interested in this. anyone can help?
Did you solve this problem? How did you do that?
Hi @Carlos11 Let me help!
Follow the steps below to get Gemini output in JSON.
-
First setup your Gemini module with desired model with User message and System prompt. Try with minimal test first to understand the logic here. System prompt can contain your JSON schema and example response.
-
Enable Advanced Settings option below in bottom left corner. Use Json Option from Response MIME type.
-
Run the Module to see the response. It will output both Raw JSON as well in response mapped pre parsed JSON object.
-
Further you can use JSON parser too for Raw JSON to check and test if Json schema is complex.
-
Latest module version also supports custom response schema creation. Here no need to use deprecate JSON response schema if already added in system prompt.
I hope this helps!
Best,
@Prem_Patel



