Files
Sebastian Benz 85f721f5a9 Improve Gemini samples (#1611)
* Migrate to latest version of the language model

* Update readme to better describe the sample.

* More readme updates

* Consistent API naming and format lists
2026-01-15 13:38:00 +01:00
..
2024-07-25 12:08:13 +02:00
2026-01-15 13:38:00 +01:00
2024-07-25 12:08:13 +02:00
2024-07-25 12:08:13 +02:00
2024-07-25 12:08:13 +02:00
2026-01-15 13:38:00 +01:00

Using the Gemini API in a Chrome Extension.

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

  1. Clone this repository.
  2. Download the Gemini API client by running:
    npm install
    
  3. Retrieve an API key and update functional-samples/ai.gemini-in-the-cloud/sidepanel/index.js (only for testing).
  4. Compile the JS bundle for the sidepanel implementation by running:
    npm run build
    
  5. Load this directory in Chrome as an unpacked extension.
  6. Click the extension icon.
  7. Interact with the prompt API in the sidebar.