class

OpenAI::RealtimeConversationItemMessageSystem

Inherits JSON::Serializable < Reference < Object

A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation's behavior, use instructions, but for smaller updates (e.g. "the user is now asking about a different topic"), use system messages.

Constructors

new(id : String | Nil = nil, object : RealtimeConversationItemMessageSystemObject | Nil = nil, type_value : RealtimeConversationItemMessageSystemType = RealtimeConversationItemMessageSystemType::Message, status : RealtimeConversationItemMessageSystemStatus | Nil = nil, role : RealtimeConversationItemMessageSystemRole = RealtimeConversationItemMessageSystemRole::System, content : Array(RealtimeConversationItemMessageSystemContentItem) = [] of RealtimeConversationItemMessageSystemContentItem)
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Instance methods

content

The content of the message.

Source
content=(content : Array(RealtimeConversationItemMessageSystemContentItem))

The content of the message.

Source
id

The unique ID of the item. This may be provided by the client or generated by the server.

Source
id=(id : String | Nil)

The unique ID of the item. This may be provided by the client or generated by the server.

Source
object

Identifier for the API object being returned - always realtime.item. Optional when creating a new item.

Source
object=(object : RealtimeConversationItemMessageSystemObject | Nil)

Identifier for the API object being returned - always realtime.item. Optional when creating a new item.

Source
role

The role of the message sender. Always system.

Source
role=(role : RealtimeConversationItemMessageSystemRole)

The role of the message sender. Always system.

Source
status

The status of the item. Has no effect on the conversation.

Source
status=(status : RealtimeConversationItemMessageSystemStatus | Nil)

The status of the item. Has no effect on the conversation.

Source
type_value

The type of the item. Always message.

Source
type_value=(type_value : RealtimeConversationItemMessageSystemType)

The type of the item. Always message.

Source