tanaike

The Thinker

Gemini API with JSON schema

Gists Overview These are sample scripts in Python and Node.js for controlling the output format of the Gemini API using JSON schemas. Description In a previous report, “Taming the Wild Output: Effective Control of Gemini API Response Formats with response_mime_type,” I presented sample scripts created with Google Apps Script. Ref Following its publication, I received requests for sample scripts using Python and Node.js. This report addresses those requests by providing sample scripts in both languages.

Updated: GAS Library - GeminiWithFiles

GeminiWithFiles was updated to v1.0.2. v1.0.2 (May 7, 2024) For generating content, parts was added. From this version, you can select one of q, jsonSchema, and parts. From this version, systemInstruction can be used. In order to call the function call, toolConfig was added to the request body. You can see the detail information here https://github.com/tanaikech/GeminiWithFiles

Inserting Animated GIFs over Cells on Google Sheets using Google Apps Script

Gists Overview This script demonstrates how to insert an animated GIF over cells in a Google Sheet using Google Apps Script. Description I recently received a request to create a Google Apps Script for inserting animated GIFs into cells on a Google Sheet. I previously published a sample script on my blog on June 6, 2017. Ref In that script, the animation GIF was inserted using a public link. This new script leverages data URLs, which simplifies the process for using GIFs stored in Google Drive.