Homer, your homie is a content writing browser extension that utilizes Gemini APIs to generate and translate content for users on the go
Ensure your system meets the following specifications to utilize Chrome AI effectively:
- Browser: Chromium-based (Google Chrome, Brave, Microsoft Edge) version 127 or higher.
- Install Chrome: Required version 127 or above.
- Enable Prompt API: In Chrome, navigate to
chrome://flags/#prompt-api-for-gemini-nano
and set it to "Enabled". - Enable Summarization API: In Chrome, navigate to
chrome://flags/#summarization-api-for-gemini-nano
and set it to "Enabled". - Enable Optimization Guide: Navigate to
chrome://flags/#optimization-guide-on-device-model
, setting it to "Enabled BypassPerfRequirement". - Restart Browser: Necessary for changes to take effect.
- Download Model: Navigate to
chrome://components/
, locate "Optimization Guide On Device Model", and click "Check for update" if it shows "0.0.0.0".
Open any webpage, press F12
to open the console, and type window.ai
to check the setup.
const session = await window.ai.createTextSession();
await session.prompt("What can you do?");
If you encounter issues accessing window.ai
or missing "Optimization Guide On Device Model" option:
- Try disabling and re-enabling the aforementioned options in
chrome://flags
. - Restart your computer completely and then attempt to access
window.ai
again.
- Clone this repository.
- Make sure get your own trial tokens by following this documentation
- Update the obatined trial_tokens in manifest.json
- Load the cloned project directory in Chrome as an unpacked extension.
- Go to any webpage, select a block of text and right click.
- In the context menu, click on "Homer - AI actions for this text".
- The extension popup will appear with options to Rewrite, Summarize and Translate (from english to chinese, spanish, japanese).
- Have fun and play around with the extension.
This extension utilizes Gemini Nano which runs locally on your device. Action output might take time depending on your machine's GPU/CPU capabilities.