Skip to content

Instantly share code, notes, and snippets.

View tanaikech's full-sized avatar

Kanshi TANAIKE tanaikech

View GitHub Profile
@tanaikech
tanaikech / submit.md
Last active September 19, 2024 03:10
Flexible Labeling for Gmail using Gemini API with Google Apps Script Part 3

Flexible Labeling for Gmail using Gemini API with Google Apps Script Part 3

Abstract

This report improves Gmail email labeling with Gemini API using JSON schema and leverages advancements in Gemini 1.5 Flash for faster processing.

Introduction

@tanaikech
tanaikech / submit.md
Created September 17, 2024 02:09
Simplifying Spreadsheet Management: Introducing a Google Apps Script Automation

Simplifying Spreadsheet Management: Introducing a Google Apps Script Automation

Abstract

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.

Introduction

@tanaikech
tanaikech / submit.md
Last active February 1, 2025 14:52
Gemini-Powered Dynamic Pseudo-RAG for Efficient Script Generation

Gemini-Powered Dynamic Pseudo-RAG for Efficient Script Generation

Abstract

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.

Introduction

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.

@tanaikech
tanaikech / submit.md
Last active August 24, 2024 07:17
Web App Log Visibility for Google Apps Script

Web App Log Visibility for Google Apps Script

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:

Steps

  1. Create a new Google Apps Script project.
  2. Add the following script: function doGet(e) { Logger.log(JSON.stringify(e)); return HtmlService.createHtmlOutput('<b>Hello world!</b>'); }
  3. Deploy Web Apps as Execute as: Me and Who has access to the app: Anyone .
@tanaikech
tanaikech / submit.md
Last active February 1, 2025 14:53
A Versatile Approach to Uploading Files with Node.js: Integrating Gemini, Drive, YouTube, and Other APIs

A Versatile Approach to Uploading Files with Node.js: Integrating Gemini, Drive, YouTube, and Other APIs

Abstract

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.

Description

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

@tanaikech
tanaikech / submit.md
Created August 23, 2024 02:36
Expanding Gemini API's Capabilities: A Practical Solution for Web Content Summarization

Expanding Gemini API's Capabilities: A Practical Solution for Web Content Summarization

Abstract

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.

Introduction

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.

@tanaikech
tanaikech / submit.md
Created August 18, 2024 06:09
Leveraging GCP for Seamless Google Apps Script Log Export and Analysis with Gemini API

Leveraging GCP for Seamless Google Apps Script Log Export and Analysis with Gemini API

Abstract

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.

Introduction

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

@tanaikech
tanaikech / submit.md
Last active January 5, 2025 05:22
Uploading Multiple Files with Split Asynchronous Processes and Resumable Upload in Google Spreadsheets

Uploading Multiple Files with Split Asynchronous Processes and Resumable Upload in Google Spreadsheets

Overview

This sample script demonstrates uploading multiple files using split asynchronous processes with resumable upload. It leverages JavaScript and HTML within Google Spreadsheets.

Description

In my previous report, "Resumable Upload of Multiple Files with Asynchronous Process for Google Drive", I presented an approach for uploading files asynchronously.

@tanaikech
tanaikech / submit.md
Last active February 1, 2025 14:53
A Novel Approach to Learning: Combining Gemini with Google Apps Script for Automated Q&A

A Novel Approach to Learning: Combining Gemini with Google Apps Script for Automated Q&A

Abstract

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.

Introduction

@tanaikech
tanaikech / submit.md
Last active February 1, 2025 14:53
Gemini API: Revolutionizing Content Generation with Direct PDF Input

Gemini API: Revolutionizing Content Generation with Direct PDF Input

Abstract

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.

Introduction