AI chatbot demo using Google's Gemini Nano, running entirely in Chrome without server dependencies.
Explore Features · Setup Guide · Local Deployment
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 Canary: Required version 127 or above. Download here.
- Enable Prompt API: In Chrome, navigate to
chrome://flags/#prompt-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.
To run this project locally, follow these steps:
git clone git@github.com:ADROITAKASH/chrome-ai.git
cd chrome-ai
yarn
yarn dev
Learn more about the capabilities of in-browser AI by reading our detailed blog post on Medium.
Your contributions can help this project grow. Feel free to submit feature enhancements, bug fixes, or new ideas through our GitHub repository.
This project is open-sourced under the MIT License. Review the LICENSE for more details.