// **DEPRECATED**: This method is only available in extension contexts.
Promise<double> measureInputUsage(
LanguageModelPrompt input,
optional LanguageModelPromptOptions options = {}
); // **DEPRECATED**: This attribute is only available in extension contexts.
readonly attribute double inputUsage; // **DEPRECATED**: This attribute is only available in extension contexts.
readonly attribute unrestricted double inputQuota; // **DEPRECATED**: This attribute is only available in extension contexts.
attribute EventHandler onquotaoverflow;
// **EXPERIMENTAL**: Only available in extension and experimental contexts.
readonly attribute unsignedlong topK; // **EXPERIMENTAL**: Only available in extension and experimental contexts.
readonly attribute float temperature;
Promise<LanguageModel> clone(optional LanguageModelCloneOptions options = {});
};
LanguageModel includes DestroyableModel;
// **EXPERIMENTAL**: Only available in extension and experimental contexts.
[Exposed=Window, SecureContext]
interface LanguageModelParams {
readonly attribute unsignedlong defaultTopK;
readonly attribute unsignedlong maxTopK;
readonly attribute float defaultTemperature;
readonly attribute float maxTemperature;
};
// A description of a tool call that a language model can invoke.
dictionary LanguageModelTool {
required DOMString name;
required DOMString description; // JSON schema for the input parameters.
required object inputSchema; // The function to be invoked by user agent on behalf of language model.
required LanguageModelToolFunction execute;
};
dictionary LanguageModelCreateCoreOptions { // Note: these two have custom out-of-range handling behavior, not in the IDL layer. // They are unrestricted double so as to allow +Infinity without failing. // **EXPERIMENTAL**: Only available in extension and experimental contexts.
unrestricted double topK; // **EXPERIMENTAL**: Only available in extension and experimental contexts.
unrestricted double temperature;
// The DOMString branch is shorthand for `[{ type: "text", value: providedValue }]`
required (DOMString or sequence<LanguageModelMessageContent>) content;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.