Using different models
Use a different model
import AI from '@aibrow/web'
// All the top-level APIs support the model field, such as
// * AI.AIBrow.LanguageModel({ ... })
// * window.aibrow.LanguageModel({ ... })
// * AI.AIBrow.Summarizer.create({ ... })
// * window.aibrow.Summarizer.create({ ... })
// * AI.AIBrow.Writer.create({ ... })
// * window.aibrow.Writer.create({ ... })
const session = await AI.AIBrow.LanguageModel.create({
model: "phi-3-5-mini-instruct-q4-k-m"
})
const stream = await session.promptStreaming("write a long poem");
for await (const chunk of stream) {
console.log(chunk)
}Last updated