LanguageModelUtility
Properties
Functions
Link copied to clipboard
external fun append(input: ReadonlyArray<LanguageModelMessage>, options: LanguageModelAppendOptions): Promise<Nothing?>
Append a message without prompting for a response.
Link copied to clipboard
Clones the LanguageModelUtility such that the context and initial prompt should be preserved.
Link copied to clipboard
external fun measureContextUsage(input: ReadonlyArray<LanguageModelMessage>, options: LanguageModelPromptOptions): Promise<Double>
Measure how many tokens the input would use.
Link copied to clipboard
external fun prompt(input: ReadonlyArray<LanguageModelMessage>, options: LanguageModelPromptOptions): Any
Prompt the model for a response.