Class: OpenAI::Models::Realtime::ConversationItemTruncateEvent

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/openai/models/realtime/conversation_item_truncate_event.rb,
sig/openai/models/realtime/conversation_item_truncate_event.rbs

Instance Attribute Summary collapse

Attributes inherited from Internal::Type::BaseModel

#last_response

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], #_request_id, #_set_last_response, coerce, #deconstruct_keys, #deep_to_h, dump, #encode_with, 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, coerce_with_error, 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(audio_end_ms:, content_index:, item_id:, event_id: nil, type: :"conversation.item.truncate") ⇒ Object

Parameters:

  • audio_end_ms —

    Inclusive duration up to which audio is truncated, in milliseconds. If the audio_end_ms is greater than the actual audio duration, the server will respond with an error.

  • content_index —

    The index of the content part to truncate. Set this to 0.

  • item_id —

    The ID of the assistant message item to truncate. Only assistant message items can be truncated.

  • event_id (defaults to: nil) —

    Optional client-generated ID used to identify this event.

  • type (defaults to: :"conversation.item.truncate") —

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



# File 'lib/openai/models/realtime/conversation_item_truncate_event.rb', line 40

Instance Attribute Details

#audio_end_ms ⇒ Integer

Inclusive duration up to which audio is truncated, in milliseconds. If the audio_end_ms is greater than the actual audio duration, the server will respond with an error.

Returns:

  • (Integer)


13
# File 'lib/openai/models/realtime/conversation_item_truncate_event.rb', line 13

required :audio_end_ms, Integer

#content_index ⇒ Integer

The index of the content part to truncate. Set this to 0.

Returns:

  • (Integer)


19
# File 'lib/openai/models/realtime/conversation_item_truncate_event.rb', line 19

required :content_index, Integer

#event_id ⇒ String?

Optional client-generated ID used to identify this event.

Returns:

  • (String, nil)


38
# File 'lib/openai/models/realtime/conversation_item_truncate_event.rb', line 38

optional :event_id, String

#item_id ⇒ String

The ID of the assistant message item to truncate. Only assistant message items can be truncated.

Returns:

  • (String)


26
# File 'lib/openai/models/realtime/conversation_item_truncate_event.rb', line 26

required :item_id, String

#type ⇒ :"conversation.item.truncate"

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

Returns:

  • (:"conversation.item.truncate")


32
# File 'lib/openai/models/realtime/conversation_item_truncate_event.rb', line 32

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

Instance Method Details

#to_hash ⇒ {

Returns:

  • ({)


56
# File 'sig/openai/models/realtime/conversation_item_truncate_event.rbs', line 56

def to_hash: -> {