SummarizerFactory

Methods

capabilities

async capabilities(options) => SummarizerCapabilities

Get the capabilities of the on-device language model.

Options (optional)

model optional string The id of the model to use, undefined to use the default

Returns a new capabilities object


create

async create(options) => Summarizer

Creates a summarizer model session

Options (optional)

model optional string

gpuEngine: optional AICapabilityGpuEngine

topK optional number

topP optional number

maxTokens optional number

grammar optional any

temperature optional number

repeatPenality optional number

flashAttention optional boolean

contextSize optional number

type optional AISummarizerType

format optional AISummarizerFormat

length optional AISummarizerLength

signal optional AbortSignal

monitor optional AICreateMonitor

Returns a new Summarizer session that can be prompted with the pre-provided configuration

Last updated