Message interface

A message object sent to or received from an LLM.

Properties

content

Text of the message.

context

The context used for the message.

function_call

Optional. A named function to call.

name

Optional. Name of the function that was called.

role

The messages role. Typically 'system', 'user', 'assistant', 'function'.

Property Details

content

Text of the message.

content: undefined | TContent

Property Value

undefined | TContent

context

The context used for the message.

context?: MessageContext

Property Value

function_call

Optional. A named function to call.

function_call?: FunctionCall

Property Value

name

Optional. Name of the function that was called.

name?: string

Property Value

string

role

The messages role. Typically 'system', 'user', 'assistant', 'function'.

role: string

Property Value

string