class

OpenAI::RealtimeBetaServerEventConversationItemCreated

Inherits JSON::Serializable < Reference < Object

Returned when a conversation item is created. There are several scenarios that produce this event:

  • The server is generating a Response, which if successful will produce either one or two Items, which will be of type message (role assistant) or type function_call.
  • The input audio buffer has been committed, either by the client or the server (in server_vad mode). The server will take the content of the input audio buffer and add it to a new user message Item.
  • The client has sent a conversation.item.create event to add a new Item to the Conversation.

Constructors

new(event_id : String = "", type_value : Hash(String, JSON::Any) = Hash(String, JSON::Any).new, previous_item_id : RealtimeBetaServerEventConversationItemCreatedPreviousItemId | 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 : RealtimeBetaServerEventConversationItemCreatedPreviousItemId | Nil)
Source
type_value

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

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

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

Source