Files
firebase-js-sdk/docs-devsite/ai.languagemodelcreatecoreoptions.md

3.0 KiB

Project: /docs/reference/js/_project.yaml Book: /docs/reference/_book.yaml page_type: reference

{% comment %} DO NOT EDIT THIS FILE! This is generated by the JS SDK team, and any local changes will be overwritten. Changes should be made in the source code at https://github.com/firebase/firebase-js-sdk {% endcomment %}

LanguageModelCreateCoreOptions interface

Configures the creation of an on-device language model session.

Signature:

export interface LanguageModelCreateCoreOptions 

Properties

Property Type Description
expectedInputs LanguageModelExpected[] Defaults to image input and English text input if not overriden.
expectedOutputs LanguageModelExpected[] Defaults to English text output if not overriden.
monitor (monitor: LanguageModelDownloadMonitor) => void The native download monitor provided by the Chrome API. This provides direct access to the monitor object and is only needed for advanced cases. For a simpler download monitoring interface, provide an onDownloadProgress callback to GenerativeModel.initializeDeviceModel() instead.
temperature number
topK number

LanguageModelCreateCoreOptions.expectedInputs

Defaults to image input and English text input if not overriden.

Signature:

expectedInputs?: LanguageModelExpected[];

LanguageModelCreateCoreOptions.expectedOutputs

Defaults to English text output if not overriden.

Signature:

expectedOutputs?: LanguageModelExpected[];

LanguageModelCreateCoreOptions.monitor

The native download monitor provided by the Chrome API. This provides direct access to the monitor object and is only needed for advanced cases. For a simpler download monitoring interface, provide an onDownloadProgress callback to GenerativeModel.initializeDeviceModel() instead.

Signature:

monitor?: (monitor: LanguageModelDownloadMonitor) => void;

LanguageModelCreateCoreOptions.temperature

Warning: This API is now obsolete.

Signature:

temperature?: number;

LanguageModelCreateCoreOptions.topK

Warning: This API is now obsolete.

Signature:

topK?: number;