Rewriter API
import AI from '@aibrow/web'
const rewriter = await AI.AIBrow.Rewriter.create({
tone: "more-formal",
length: "as-is"
})
// Prompt the model and wait for the whole result to come back.
const result = await rewriter.rewrite("An article comparing Vim vs Emacs as the best text editor")
// Prompt the model and stream the result:
const stream = await rewriter.rewriteStreaming("An article comparing Vim vs Emacs as the best text editor")
for await (const chunk of stream) {
console.log(chunk)
}Last updated