AiBrow
  • Welcome
  • AiBrow web API
    • Getting started
    • Feature comparison
  • AiBrow Extension
    • Getting started
    • Web polyfill
    • Helping users install the AiBrow extension
    • Remove the on-device helper or models
  • Examples
    • CoreModel API
    • Embedding API
    • LanguageDetector API
    • LanguageModel API
    • Rewriter API
    • Summarizer API
    • Translator API
    • Writer API
    • Using different models
    • Model download feedback
    • Getting JSON output
  • API Reference
    • AI
      • AiBrowAI
      • BrowserAI
      • WebAI
    • AiBrow
      • CoreModelFactory
        • CoreModel
        • CoreModelCapabilities
      • EmbeddingFactory
        • Embedding
        • EmbeddingCapabilities
      • LanguageDetectorFactory
        • LanguageDetector
        • LanguageDectectorCapabilities
      • LanguageModelFactory
        • LanguageModel
        • LanguageModelCapabilities
      • RewriterFactory
        • Rewriter
        • RewriterCapabilities
      • SummarizerFactory
        • Summarizer
        • SummarizerCapabilities
      • TranslatorFactory
        • Translator
        • TranslatorCapabilities
      • WriterFactory
        • Writer
        • WriterCapabilities
    • Types
      • AICapabilityAvailability
      • AICapabilityGpuEngine
      • AICreateMonitor
      • AILanguageDetectorDetectResult
      • AIRewriterFormat
      • AIRewriterLength
      • AIRewriterTone
      • AISummarizerFormat
      • AISummarizerLength
      • AISummarizerType
      • AIWriterFormat
      • AIWriterLength
      • AIWriterTone
      • AIModelDtype
    • Models
Powered by GitBook
On this page
  • Properties
  • topK
  • topP
  • temperature
  • repeatPenality
  • flashAttention
  • contextSize
  • sharedContext
  • tone
  • format
  • length
  • Methods
  • write
  • writeStreaming
  1. API Reference
  2. AiBrow
  3. WriterFactory

Writer

Properties

topK

number

topP

number

temperature

number

repeatPenality

number

flashAttention

boolean

contextSize

number

sharedContext

string

tone

format

length


Methods

write

async (input, options) => string

writeStreaming

(input, options) => ReadableStream

This prompts the language model to write the given input and session options.

Input

A stringcontaining information about what the text should write

Options (optional)

signal optional AbortSignal

context optional string

Returns a readable stream that updates each time new tokens are available from the language model

PreviousWriterFactoryNextWriterCapabilities

Last updated 6 months ago

See

AIWriterTone
AIWriterFormat
AIWriterLength
writeStreaming