LanguageModelChatMessage

Represents a message in a chat. Can assume different roles, like user or assistant.

Online Documentation

Constructors

Link copied to clipboard
constructor(role: LanguageModelChatMessageRole, content: JsAny, name: String = definedExternally)

Create a new user message.

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

A string or heterogeneous array of things that a message can contain as content. Some parts may be message-type specific for some models.

Link copied to clipboard
var name: String?

The optional name of a user for this message.

Link copied to clipboard

The role of this message.