nanobot is a simple chat interface built on top off chrome's new ai feature
chrome has recently added a new ai feature, where it can run a local llm model (gemini nano).
const textSession = await window.ai.createTextSession();
const response = await textSession.prompt("Hi there!");
console.log(response);
Please make sure you are using Chrome (Dev / Canary) version 127 or higher
Once your browser is installed, ensure the following flags are set:
chrome://flags/#prompt-api-for-gemini-nano
- SelectEnabled
chrome://flags/#optimization-guide-on-device-model
- SelectEnabled BypassPrefRequirement
chrome://components
- ClickCheck for Update
on Optimization Guide On Device Model to download the model. If you don't see Optimization Guide, ensure you have set the flags correctly above, relaunch your browser, and refresh the page.
demo: nanobot.rdsx.dev