The Thinker

Adding Page Numbers to PDF using Google Apps Script

Gists Description This is a simple sample script for adding the page numbers to PDF data using Google Apps Script. When you use this script, please copy and paste the following script to the script editor of Google Apps Script. And, please set the file ID of the PDF file. Sample script In this script, pdf-lib is used. /** * ### Description * Add page numbers to PDF. * * @param {Object} blob PDF blob.

Leveraging Gemini 1.5 API for Automated Test Case Generation in Google Apps Script Reverse Engineering

Gists Abstract This report examines leveraging Gemini 1.5 API with Google Apps Script to automate sample input creation during script reverse engineering. Traditionally, this process is manual and time-consuming, especially for functions with numerous test cases. Gemini 1.5 API’s potential to streamline development by automating input generation is explored through applying reverse engineering techniques to Google Apps Script samples. Introduction With the release of Gemini 1.5 API, users gained the ability to process more complex data, opening doors for various application developments.

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