mirror of
https://github.com/GoogleChrome/chrome-extensions-samples.git
synced 2026-03-26 13:19:49 +07:00
* add Gemini API sample * Simplify configuration and fix response formatting * Update wording for gemini nano sample
973 B
973 B
On-device AI with Gemini Nano
This sample demonstrates how to use the Gemini Cloud API in a Chrome Extension.
Overview
The extension provides a chat interface for the Gemini API. To learn more about the API head over to https://ai.google.dev/.
Running this extension
- Clone this repository.
- Download the Gemini API client by running:
npm install - Retrieve an API key and update functional-samples/ai.gemini-in-the-cloud/sidepanel/index.js (only for testing).
- Compile the JS bundle for the sidepanel implementation by running:
npm run build - Load this directory in Chrome as an unpacked extension.
- Click the extension icon.
- Interact with the prompt API in the sidebar.