CoreModelFactory
Last updated
Last updated
async capabilities(options) =>
Get the capabilities of the on-device language model.
model extension web optional string
The id of the model to use, undefined to use the default. The extension version also accepts a direct link to a HuggingFace GGUF file. The web version also accepts the repo & name of a HuggingFace ONNX repo.
Returns a new capabilities object
async create(options) =>
Creates a new language model session
model extension web optional string
topK optional number
topP optional number
maxTokens optional number
grammar extension optional any
temperature optional number
repeatPenality optional number
flashAttention optional boolean
contextSize optional number
signal optional AbortSignal
Returns a new CoreModel session that can be prompted with the pre-provided configuration
gpuEngine extension web optional
dtype web optional
monitor optional