This report improves Gmail email labeling with Gemini API using JSON schema and leverages advancements in Gemini 1.5 Flash for faster processing.
This post introduces a Google Apps Script solution that automates the creation, sharing, and monitoring of multiple Google Spreadsheets, providing a more efficient and streamlined approach to managing user data.
This report presents a method to optimize AI-generated scripts for processing costs using Gemini and Google Apps Script. By incorporating external knowledge from sources like StackOverflow, we demonstrate the effective generation of efficient scripts that minimize overhead while maintaining desired outcomes. This approach can be considered a dynamic pseudo-RAG technique.
The proliferation of generative AI, exemplified by Google Gemini, has led to a surge in AI-generated scripts. This trend is evident in the growing number of questions on platforms like StackOverflow that involve AI-generated scripts. While this indicates a significant improvement in AI performance, it's crucial to note that AI-generated scripts may not always be optimized for processing costs, especially when the prompt fails to provide sufficient context.
In order to determine whether the log of Web Apps created by Google Apps Script can be shown in the log, the following steps were performed:
- Create a new Google Apps Script project.
- Add the following script:
function doGet(e) { Logger.log(JSON.stringify(e)); return HtmlService.createHtmlOutput('<b>Hello world!</b>'); }
- Deploy Web Apps as
Execute as: Me
andWho has access to the app: Anyone
.
A Versatile Approach to Uploading Files with Node.js: Integrating Gemini, Drive, YouTube, and Other APIs
A script using resumable upload with file streams is proposed to enhance file handling within the Gemini Generative AI API for Node.js. This script allows uploading from web URLs and local storage, efficiently handles large files, and offers potential reusability with other Google APIs.
The @google/generative-ai
library provides a powerful way to interact with the Gemini Generative AI API using Node.js. This enables developers to programmatically generate creative text formats, translate languages, write different kinds of creative content, and answer your questions in an informative way, all powered by Gemini's advanced AI models. Ref
This study proposes a workaround to address the Gemini API's current inability to directly process web content from URLs. By utilizing Google Apps Script, the method extracts relevant information from a specified URL and feeds it into the API for summarization. This approach offers a solution for generating comprehensive summaries from web-based content until the API's limitations are resolved.
While Gemini API offers powerful text generation capabilities, it currently faces limitations in directly accessing and processing web content from URLs. When prompted to summarize an article at a specific URL like Summarize the article at the following URL. https://###
, the API often returns an error message indicating its inability to retrieve the necessary information. This limitation arises from the API's current design, which may not be equipped to handle web requests and parse HTML content.
Linking a Google Apps Script project to a GCP project enables you to export logs from the Class console to Logs Explorer for simplified analysis and debugging. By overcoming the limitations of in-script logging methods, this report outlines a method for exporting logs using the Cloud Logging API with Google Apps Script.
While developing applications with Google Apps Script, the Class console is a valuable tool for debugging individual components. Ref However, a key limitation exists: by default, Google Apps Script projects on Google Drive are not linked to Google Cloud Platform (GCP) projects. In this unlinked scenario, logs from the Class console are only visible within the script editor, requiring manual copying for export.
Linking a Google Apps Script project to a GCP project unlocks the power of Logs Explorer. [Ref](https
Uploading Multiple Files with Split Asynchronous Processes and Resumable Upload in Google Spreadsheets
This sample script demonstrates uploading multiple files using split asynchronous processes with resumable upload. It leverages JavaScript and HTML within Google Spreadsheets.
In my previous report, "Resumable Upload of Multiple Files with Asynchronous Process for Google Drive", I presented an approach for uploading files asynchronously.
This report proposes a novel learning method using Gemini to automate Q&A generation, addressing the challenges of manual Q&A creation. By integrating with Google tools, this approach aims to enhance learning efficiency, accessibility, and personalization while reducing costs.
Gemini API now enables direct PDF processing for content generation, eliminating image conversion and reducing costs. This report provides a sample script to demonstrate this new capability and its potential applications.