GeminiApp Gets a Major Upgrade: Seamless Transition Between Google AI Studio and Vertex AI, Enhanced Functionality, Multimodal Input, and More!
The GeminiApp library, a solution I created for integrating Google's Gemini AI models into your Google Apps Script projects, has had a major update!
Since its publication last year it has been great to hear and see how GeminiApp is being used by the community, including members of Google's DevRel team highlighting it as an option. This new release introduces significant enhancements, expanding the library's capabilities for building sophisticated AI-powered applications directly within Google Workspace.
This post will explore the key enhancements included in the 2025.01 version bump, focusing on how these changes empower you to do even more with Gemini and Apps Script.
What's New?
The latest update to the GeminiApp library is a significant leap forward in terms of functionality, flexibility, and ease of deployment. The library now boasts enhanced capabilities that allow for more intricate interactions with the Gemini API, and perhaps more importantly, it facilitates a smooth transition from the Google AI Studio environment to Vertex AI.
Enhanced Functionality and Control
Beyond cross-compatibility, the GeminiApp library has also evolved to offer enhanced control over how you interact with Gemini models. This includes the following new features:
Easier Copy/Paste Programming
One of the other small enhancements in this update is making it easier to copy/paste code generated with Google AI Studio. To make it easier to transition from Google AI Studio and other examples published for the Javascript client library, GeminiApp now supports initialization using both new GeminiApp() and new GoogleGenerativeAI(). This means you can use Google AI Studio to experiment with prompts and Gemini API advanced features then use the ‘Get code’ output in your Apps Script project. For example, if you explore the Google Gemini Generate AI JS sample, you’ll see most of them are used in the GeminiApp tests/tests.js.
Key Code Changes
The 2025.01 version bump isn't just about the new features outlined above and if you dig into the commit there are over 1.5K new lines of code mostly across three key files:
Recommended by LinkedIn
Updating existing GeminiApp projects
If you have existing projects using the older version of the GeminiApp library you should be able to replace your existing GeminiApp.gs code with the updated library, with no additional changes, but if you have projects in production I would recommend testing before redeploying.
Getting Started
If you are new to the GeminiApp library it supports multiple setup options. To start using the new features, you can refer to the updated examples and test cases in the README.md file.
Important Considerations
While these updates bring significant enhancements, there are a few points to keep in mind:
A Step Forward for Google Workspace AI
The 2025.01 update to the GeminiApp library marks a significant step forward for developers looking to integrate the power of Gemini into their Google Workspace applications. With the ability to seamlessly transition from Google AI Studio to Vertex AI, along with new features like code execution, JSON-controlled generation, system instructions and enhanced multimodal input, the possibilities are endless. This release provides developers with the tools they need to create more powerful, efficient, and user-friendly AI solutions.
By using these new capabilities and the cross-compatibility between Google AI Studio and Vertex AI, you can create more robust and versatile applications. This update not only improves functionality but also gives developers a broader set of tools to create more personalized and efficient workflows. As the Gemini API evolves, libraries like GeminiApp will continue to bridge the gap between powerful AI models and Google Workspace users. The easy transition between environments means that your projects can grow with your needs, starting with simple prototypes and evolving into full-fledged production applications.
If you have interesting use cases for the GeminiApp, code improvements or feature requests, please feel free to get in touch!
Real Martin Hawksey is back in action!
Awesome work Martin 💪