LanguageModelUtility

Constructors

Link copied to clipboard
constructor(initialState: InitialState)

LanguageModelUtility

Types

Link copied to clipboard
external object Companion

Properties

Link copied to clipboard
external var contextUsage: Double

A number representing how many tokens are currently in the context window.

Link copied to clipboard
external var contextWindow: Double

A number representing the size of the context window, in tokens.

Functions

Link copied to clipboard

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 destroy()

Destroys the model, and any ongoing executions are aborted.

Link copied to clipboard

Measure how many tokens the input would use.

Link copied to clipboard

Prompt the model for a response.