DEV Community

Cover image for Chrome Built-in AI Doesn't Require The Internet
0xkoji
0xkoji

Posted on

5 1

Chrome Built-in AI Doesn't Require The Internet

I tried out the Built-in AI that apparently works on Chrome Dev or Canary v127+.
https://developer.chrome.com/docs/ai/built-in

Enable the flag

chrome://flags/
Prompt API for Gemini Nano: enable
Enables optimization guide on device: enable BypassPrefRequirements
flags

Download the model

chrome://components/
After enabling the above flags and restarting the browser, you can access the components and download the model.
before download

The model download itself takes a bit of time. (It took about 1-2 minutes for me.)

after download

Try it from the console.

jsCopywindow.ai
const ts = ai.createTextSession()
const gemi = await ts
const output = gemi.prompt('can you tell me the capital of Japan?')
Enter fullscreen mode Exit fullscreen mode

output

output

also, it worked as expected in Japanese
japanese

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay