class

OpenAI::MessageObject

Inherits JSON::Serializable < Reference < Object

Represents a message within a thread.

Constructors

new(id : String = "", object : MessageObjectObject = MessageObjectObject::ThreadMessage, created_at : Int64 = 0, thread_id : String = "", status : MessageObjectStatus = MessageObjectStatus::InProgress, incomplete_details : MessageObjectIncompleteDetails = nil, completed_at : MessageObjectCompletedAt = nil, incomplete_at : MessageObjectIncompleteAt = nil, role : MessageObjectRole = MessageObjectRole::User, content : Array(MessageContent) = [] of MessageContent, assistant_id : MessageObjectAssistantId = nil, run_id : MessageObjectRunId = nil, attachments : MessageObjectAttachments = nil, metadata : Metadata = nil)
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Instance methods

assistant_id
Source
assistant_id=(assistant_id : MessageObjectAssistantId)
Source
attachments
Source
attachments=(attachments : MessageObjectAttachments)
Source
completed_at
Source
completed_at=(completed_at : MessageObjectCompletedAt)
Source
content

The content of the message in array of text and/or images.

Source
content=(content : Array(MessageContent))

The content of the message in array of text and/or images.

Source
created_at

The Unix timestamp (in seconds) for when the message was created.

Source
created_at=(created_at : Int64)

The Unix timestamp (in seconds) for when the message was created.

Source
id

The identifier, which can be referenced in API endpoints.

Source
id=(id : String)

The identifier, which can be referenced in API endpoints.

Source
incomplete_at
Source
incomplete_at=(incomplete_at : MessageObjectIncompleteAt)
Source
incomplete_details
Source
incomplete_details=(incomplete_details : MessageObjectIncompleteDetails)
Source
metadata
Source
metadata=(metadata : Metadata)
Source
object

The object type, which is always thread.message.

Source
object=(object : MessageObjectObject)

The object type, which is always thread.message.

Source
role

The entity that produced the message. One of user or assistant.

Source
role=(role : MessageObjectRole)

The entity that produced the message. One of user or assistant.

Source
run_id
Source
run_id=(run_id : MessageObjectRunId)
Source
status

The status of the message, which can be either in_progress, incomplete, or completed.

Source
status=(status : MessageObjectStatus)

The status of the message, which can be either in_progress, incomplete, or completed.

Source
thread_id

The thread ID that this message belongs to.

Source
thread_id=(thread_id : String)

The thread ID that this message belongs to.

Source