5 ms·
See https://developer.chrome.com/docs/ai/built-in https://developer.chrome.com/docs/ai/built-in https://github.com/jeasonstudio/chrome-ai https://github.com/j
by oefrha 2y ago
See
https://developer.chrome.com/docs/ai/built-in https://developer.chrome.com/docs/ai/built-in
https://github.com/jeasonstudio/chrome-ai https://github.com/jeasonstudio/chrome-ai
I can’t seem to find public documentation for the API with a cursory search, so https://github.com/jeasonstudio/chrome-ai/blob/ec9e334253713e08314bb2dcde3aa124f4f40a68/src/language-model.ts#L75 https://github.com/jeasonstudio/chrome-ai/blob/ec9e334253713... might be the best documentation (other than directly inspecting the window.ai object in console) at the moment.
It’s not really clear if the Gemini Nano here is Nano-1 (1.8B) or Nano-2 (3.25B) or selected based on device.
- saurik 2y agohttps://browsernative.com/chrome-google-ai-gemini-nano/ https://browsernative.com/chrome-google-ai-gemini-nano/ https://medium.com/@saga_view/integrate-nearly-real-time-free-multi-language-translation-in-the-application-based-on-chrome-ai-dca1af9686de https://medium.com/@saga_view/integrate-nearly-real-time-fre... https://qiita.com/shinonome_taku/items/358ec398fe871e3e8472 https://qiita.com/shinonome_taku/items/358ec398fe871e3e8472 https://blog.devgenius.io/the-importance-of-large-language-models-and-privacy-with-local-ai-on-device-389521936e8d?gi=8a11d7666f30 https://blog.devgenius.io/the-importance-of-large-language-m...
- mikeqq2024 2y ago1.8B/3.25B is still too much for edge devices. Ideally tens or hundreds mega would be ok. Is there an option to change the builtin Gemini Nano to other smaller models? By the way, haven't touch the lastest JS code for a while, what does this new syntax mean: "import { chromeai } " Also not get the textStream code: for await (const textPart of textStream) { result = textPart; } does result get override for each loop step?
- dchest 2y agoThat's just some supplemental code. The actual API is: const session = await window.ai.createTextSession() const outputText = await session.prompt(inputText) That's all there is for now (createGenericSession does the same at this time, and there are canCreateTextSession/canCreateGenericSession).
- dchest 2y agoUpdate: there's actually quite a lot more: https://github.com/explainers-by-googlers/prompt-api https://github.com/explainers-by-googlers/prompt-api
- oefrha 2y agoThese are 4-bit models.
- zecg 2y agoMade by a by a two-bit company that...
- kevindamm 2y ago`import { chromeai } from ...` is doing destructuring of the exported symbols of the module being imported. So, here it only imports the variable or type or function named chromeai.
- deleted 2y ago[deleted]