This is a test for the Built-in AI feature in Chrome Canary v127. It ships with a Gemini Nano model taking up ~2GB of space.
The page is entirely built by ChatGPT 4o in 10 minutes, which in itself is nuts.
To get this running you need to enable the experimental feature in Chrome Canary:
- Download Chrome Canary v127
- Set Prompt API For Gemini Nano to "Enabled":
chrome://flags/#prompt-api-for-gemini-nano
- Set Enables optimization guide on device to Enabled BypassPerfRequirement:
chrome://flags/#optimization-guide-on-device-model
- Restart the browser
- Open a Console and write this:
await window.ai.createTextSession()
once to trigger Chrome to download the model - Go to
chrome://components/
, find "Optimization Guide On Device Model" and ensure it's fully downloaded. The model should not be "0.0.0.0". If it is, click "Check for updates". If this doesn't show up, try disabling the flags, restart the browser, and try again
Open a Console and write this:
const model = await window.ai.createTextSession();
await model.prompt("Where is Copenhagen?");
Clone this repo and run it:
git clone [email protected]:markhougaard/gemini-nano-test.git
cd gemini-nano-test
npm i
npm run dev
Open http://localhost:3000 and start writing.
- chromeai by @lightning-joyce
- Morten Just on Threads: https://www.threads.net/@mortenjust/post/C8m11QDNVY-?xmt