class

OpenAI::RealtimeServerEventConversationItemAdded

Inherits JSON::Serializable < Reference < Object

Sent by the server when an Item is added to the default Conversation. This can happen in several cases:

  • When the client sends a conversation.item.create event.
  • When the input audio buffer is committed. In this case the item will be a user message containing the audio from the buffer.
  • When the model is generating a Response. In this case the conversation.item.added event will be sent when the model starts generating a specific Item, and thus it will not yet have any content (and status will be in_progress).

The event will include the full content of the Item (except when model is generating a Response) except for audio data, which can be retrieved separately with a conversation.item.retrieve event if necessary.

Constructors

new(event_id : String = "", type_value : Hash(String, JSON::Any) = Hash(String, JSON::Any).new, previous_item_id : RealtimeServerEventConversationItemAddedPreviousItemId | Nil = nil, item : RealtimeConversationItem = RealtimeConversationItemMessageSystem.new)
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Instance methods

event_id

The unique ID of the server event.

Source
event_id=(event_id : String)

The unique ID of the server event.

Source
item
Source
item=(item : RealtimeConversationItem)
Source
previous_item_id
Source
previous_item_id=(previous_item_id : RealtimeServerEventConversationItemAddedPreviousItemId | Nil)
Source
type_value

The event type, must be conversation.item.added.

Source
type_value=(type_value : Hash(String, JSON::Any))

The event type, must be conversation.item.added.

Source