Class: OpenAI::Models::Realtime::ConversationItemCreateEvent

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/openai/models/realtime/conversation_item_create_event.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, inspect, #inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(item:, event_id: nil, previous_item_id: nil, type: :"conversation.item.create") ⇒ Object

Some parameter documentations has been truncated, see OpenAI::Models::Realtime::ConversationItemCreateEvent for more details.

Add a new Item to the Conversation’s context, including messages, function calls, and function call responses. This event can be used both to populate a “history” of the conversation and to add new items mid-stream, but has the current limitation that it cannot populate assistant audio messages.

If successful, the server will respond with a ‘conversation.item.created` event, otherwise an `error` event will be sent.

Parameters:



# File 'lib/openai/models/realtime/conversation_item_create_event.rb', line 35

Instance Attribute Details

#event_idString?

Optional client-generated ID used to identify this event.

Returns:

  • (String, nil)


23
# File 'lib/openai/models/realtime/conversation_item_create_event.rb', line 23

optional :event_id, String

#itemOpenAI::Models::Realtime::RealtimeConversationItemSystemMessage, ...

A single item within a Realtime conversation.



11
# File 'lib/openai/models/realtime/conversation_item_create_event.rb', line 11

required :item, union: -> { OpenAI::Realtime::ConversationItem }

#previous_item_idString?

The ID of the preceding item after which the new item will be inserted. If not set, the new item will be appended to the end of the conversation. If set to ‘root`, the new item will be added to the beginning of the conversation. If set to an existing ID, it allows an item to be inserted mid-conversation. If the ID cannot be found, an error will be returned and the item will not be added.

Returns:

  • (String, nil)


33
# File 'lib/openai/models/realtime/conversation_item_create_event.rb', line 33

optional :previous_item_id, String

#typeSymbol, :"conversation.item.create"

The event type, must be ‘conversation.item.create`.

Returns:

  • (Symbol, :"conversation.item.create")


17
# File 'lib/openai/models/realtime/conversation_item_create_event.rb', line 17

required :type, const: :"conversation.item.create"