LanguageModelCreateOptions interface
Stay organized with collections
Save and categorize content based on your preferences.
(EXPERIMENTAL) Configures the creation of an on-device language model session.
Signature:
export interface LanguageModelCreateOptions extends LanguageModelCreateCoreOptions
Extends: LanguageModelCreateCoreOptions
Properties
LanguageModelCreateOptions.initialPrompts
Signature:
initialPrompts?: LanguageModelMessage[];
LanguageModelCreateOptions.signal
Signature:
signal?: AbortSignal;
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-07 UTC.
[null,null,["Last updated 2025-08-07 UTC."],[],[],null,["# LanguageModelCreateOptions interface\n\n**(EXPERIMENTAL)** Configures the creation of an on-device language model session.\n\n**Signature:** \n\n export interface LanguageModelCreateOptions extends LanguageModelCreateCoreOptions \n\n**Extends:** [LanguageModelCreateCoreOptions](./ai.languagemodelcreatecoreoptions.md#languagemodelcreatecoreoptions_interface)\n\nProperties\n----------\n\n| Property | Type | Description |\n|-----------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------|-------------|\n| [initialPrompts](./ai.languagemodelcreateoptions.md#languagemodelcreateoptionsinitialprompts) | [LanguageModelMessage](./ai.languagemodelmessage.md#languagemodelmessage_interface)\\[\\] | |\n| [signal](./ai.languagemodelcreateoptions.md#languagemodelcreateoptionssignal) | AbortSignal | |\n\nLanguageModelCreateOptions.initialPrompts\n-----------------------------------------\n\n**Signature:** \n\n initialPrompts?: LanguageModelMessage[];\n\nLanguageModelCreateOptions.signal\n---------------------------------\n\n**Signature:** \n\n signal?: AbortSignal;"]]