This is a test page for the built-in AI model in Chrome. It is a simple page that allows you to test the model's performance on your device.
Using React, TypeScript, Tailwind CSS, shadcn-ui.
- Latest version of Google Chrome (127+).
- Make sure you have more than 22GB of free space on your system.
- Install Chrome Canary: Ensure you have version 127. Download Chrome Canary.
- Enable Prompt API: Open
chrome://flags/#prompt-api-for-gemini-nano
, set it to "Enabled". - Enable Optimization Guide: Open
chrome://flags/#optimization-guide-on-device-model
, set it to "Enabled BypassPerfRequirement". Restart the browser. - Login to Google: Make sure you are logged in to Chrome. For now, Incognito and Guest mode are not supported.
- Download Model: Go to
chrome://components/
, and open DevTools(F12), runawait window.ai.createTextSession()
in the console. After a while, you could find "Optimization Guide On Device Model" in the list, ensure it’s fully downloaded. If the version is "0.0.0.0", click "Check for update". - Troubleshoot: If the "Optimization Guide On Device Model" is not displayed, disable the settings in steps 2 and 3, restart your browser and re-enable it.
- Verify Setup: Open a webpage, press F12, and check
window.ai
in the console.