Getting started
Using AiBrow from a webpage
if (window.aibrow) {
const { helper } = await window.aibrow.capabilities()
if (helper) {
const session = await window.aibrow.LanguageModel.create()
const stream = await sess.promptStreaming('Write a poem about AI in the browser')
for await (const chunk of stream) {
console.log(chunk)
}
} else {
console.log('Aibrow helper not installed')
}
} else {
console.log('Aibrow not installed')
}Typescript types
Using AiBrow from another extension
Last updated