LanguageModelFactory
Last updated
Last updated
async capabilities(options) =>
LanguageModelCapabilities
Get the capabilities of the on-device language model.
Options (optional) |
---|
Returns a new capabilities object
async create(options) =>
LanguageModel
Creates a new language model session
Options (optional) |
---|
Returns a new LanguageModel session that can be prompted with the pre-provided configuration
model optional string
The id of the model to use, undefined to use the default
model optional string
gpuEngine: optional
AICapabilityGpuEngine
systemPrompt optional string
initialPrompts optional InitialPrompt[]
An array of prompts each in the format
topK optional number
topP optional number
temperature optional number
repeatPenality optional number
flashAttention optional boolean
contextSize optional number
maxTokens optional number
grammar optional any
signal optional AbortSignal
monitor optional
AICreateMonitor