This sample demonstrates how to use the experimental Gemini Nano API available in the context of an origin trial in Chrome with Chrome Extensions. To learn more about the API and how to sign-up for the origin trial, head over to Built-in AI on developer.chrome.com.
The extension provides a chat interface using the Prompt API with Chrome's built-in Gemini Nano model.
- Clone this repository.
- Run
npm install
in the project directory. - Run
npm run build
in the project directory to build the extension. - Load the newly created
dist
directory in Chrome as an unpacked extension. - Click the extension icon.
- Interact with the Prompt API in the sidebar.
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
.