functional-samples/ai.gemini-on-device-summarization/README.md
This sample demonstrates how to use Chrome's built-in Summarizer API to generate AI-powered summaries of web pages directly on the user's device. The summarization runs entirely locally using Gemini Nano, ensuring privacy and fast performance without requiring an internet connection or API keys.
To learn more about the Summarizer API, head over to the Summarizer API guide on developer.chrome.com.
This extension adds a side panel that automatically displays AI-generated summaries of any web page you visit. It uses Mozilla's Readability library to extract the main content from web pages (stripping away navigation, ads, and other clutter), then passes that content to Chrome's built-in Summarizer API.
npm install in this folder to install all dependencies.npm run build to build the extension.dist directory in Chrome as an unpacked 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.