class

OpenAI::Message

Inherits JSON::Serializable < Reference < Object

A message to or from the model.

Constructors

new(type_value : MessageType = MessageType::Message, id : String = "", status : MessageStatus = MessageStatus::InProgress, role : MessageRole = MessageRole::Unknown, content : Array(MessageContentItem) = [] of MessageContentItem)
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Instance methods

content

The content of the message

Source
content=(content : Array(MessageContentItem))

The content of the message

Source
id

The unique ID of the message.

Source
id=(id : String)

The unique ID of the message.

Source
role

The role of the message. One of unknown, user, assistant, system, critic, discriminator, developer, or tool.

Source
role=(role : MessageRole)

The role of the message. One of unknown, user, assistant, system, critic, discriminator, developer, or tool.

Source
status

The status of item. One of in_progress, completed, or incomplete. Populated when items are returned via API.

Source
status=(status : MessageStatus)

The status of item. One of in_progress, completed, or incomplete. Populated when items are returned via API.

Source
type_value

The type of the message. Always set to message.

Source
type_value=(type_value : MessageType)

The type of the message. Always set to message.

Source