Vitor Pamplona on Nostr: Chrome just added `window.ai` that redirects JavaScript calls to Gemini Nano, running ...
Chrome just added `window.ai` that redirects JavaScript calls to Gemini Nano, running locally, inside the browser. 😳
```
const model = await window.ai.createTextSession();
await model.prompt("Who are you?");
```
Published at
2024-06-30 01:35:09Event JSON
{
"id": "0bbbe8ccad3232ed0299316eb9458bcbf3170e33ca1d9264c75257d225b76089",
"pubkey": "460c25e682fda7832b52d1f22d3d22b3176d972f60dcdc3212ed8c92ef85065c",
"created_at": 1719711309,
"kind": 1,
"tags": [
[
"r",
"window.ai.createTextSession"
],
[
"r",
"model.prompt"
]
],
"content": "Chrome just added `window.ai` that redirects JavaScript calls to Gemini Nano, running locally, inside the browser. 😳 \n\n```\nconst model = await window.ai.createTextSession();\nawait model.prompt(\"Who are you?\");\n```",
"sig": "60981ea4911e7f012b9be15739dc68c93145b751de10e0a7d5fbb0d5f9b47d8689179a639be3da005bf3e1c9a7cec0b27fc13150d85f3390aa1ae6281b091a32"
}