Files
chrome-extensions-samples/functional-samples/ai.gemini-in-the-cloud
dependabot[bot] 51c16f6b7a Bump rollup in /functional-samples/ai.gemini-in-the-cloud (#1320)
Bumps [rollup](https://github.com/rollup/rollup) from 4.19.0 to 4.22.4.
- [Release notes](https://github.com/rollup/rollup/releases)
- [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rollup/rollup/compare/v4.19.0...v4.22.4)

---
updated-dependencies:
- dependency-name: rollup
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-15 12:26:27 +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
2024-07-25 12:08:13 +02:00
2024-07-25 12:08:13 +02: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.