mirror of
https://github.com/GoogleChrome/chrome-extensions-samples.git
synced 2026-03-26 13:19:49 +07:00
Calendar Mate: On-device AI with Gemini Nano
This sample demonstrates how to use the Gemini Nano prompt API for Chrome Extensions. To learn more about the API, head over to Built-in AI on developer.chrome.com.
Overview
The extension provides a chat interface using the Prompt API with Chrome's built-in Gemini Nano model.
Running this extension
- Clone this repository.
- Run
npm installin the project directory. - Run
npm run buildin the project directory to build the extension. - Load the newly created
distdirectory in Chrome as an unpacked extension. - Click the extension icon.
- Interact with the Prompt API in the sidebar.
Creating your own extension
If you use this sample as the foundation for your own extension, be sure to update the "trial_tokens" field with your own origin trial token and to remove the "key" field in manifest.json.