Class: OpenAI::Models::Realtime::ConversationItemWithReference::Content
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- OpenAI::Models::Realtime::ConversationItemWithReference::Content
- Defined in:
- lib/openai/models/realtime/conversation_item_with_reference.rb,
sig/openai/models/realtime/conversation_item_with_reference.rbs
Defined Under Namespace
Modules: Type
Instance Attribute Summary collapse
-
#audio ⇒ String?
Base64-encoded audio bytes, used for
input_audiocontent type. -
#id ⇒ String?
ID of a previous conversation item to reference (for
item_referencecontent types inresponse.createevents). -
#text ⇒ String?
The text content, used for
input_textandtextcontent types. -
#transcript ⇒ String?
The transcript of the audio, used for
input_audiocontent type. -
#type ⇒ OpenAI::Models::Realtime::ConversationItemWithReference::Content::type_?
The content type (
input_text,input_audio,item_reference,text).
Attributes inherited from Internal::Type::BaseModel
Instance Method Summary collapse
- #initialize(id: nil, audio: nil, text: nil, transcript: nil, type: nil) ⇒ Object constructor
- #to_hash ⇒ {
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(id: nil, audio: nil, text: nil, transcript: nil, type: nil) ⇒ Object
132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 |
# File 'lib/openai/models/realtime/conversation_item_with_reference.rb', line 132 class Content < OpenAI::Internal::Type::BaseModel # @!attribute id # ID of a previous conversation item to reference (for `item_reference` content # types in `response.create` events). These can reference both client and server # created items. # # @return [String, nil] optional :id, String # @!attribute audio # Base64-encoded audio bytes, used for `input_audio` content type. # # @return [String, nil] optional :audio, String # @!attribute text # The text content, used for `input_text` and `text` content types. # # @return [String, nil] optional :text, String # @!attribute transcript # The transcript of the audio, used for `input_audio` content type. # # @return [String, nil] optional :transcript, String # @!attribute type # The content type (`input_text`, `input_audio`, `item_reference`, `text`). # # @return [Symbol, OpenAI::Models::Realtime::ConversationItemWithReference::Content::Type, nil] optional :type, enum: -> { OpenAI::Realtime::ConversationItemWithReference::Content::Type } # @!method initialize(id: nil, audio: nil, text: nil, transcript: nil, type: nil) # @param id [String] # ID of a previous conversation item to reference (for `item_reference` content # types in `response.create` events). These can reference both client and server # created items. # # @param audio [String] # Base64-encoded audio bytes, used for `input_audio` content type. # # @param text [String] # The text content, used for `input_text` and `text` content types. # # @param transcript [String] # The transcript of the audio, used for `input_audio` content type. # # @param type [Symbol, OpenAI::Models::Realtime::ConversationItemWithReference::Content::Type] # The content type (`input_text`, `input_audio`, `item_reference`, `text`). # The content type (`input_text`, `input_audio`, `item_reference`, `text`). # # @see OpenAI::Models::Realtime::ConversationItemWithReference::Content#type module Type extend OpenAI::Internal::Type::Enum INPUT_TEXT = :input_text INPUT_AUDIO = :input_audio ITEM_REFERENCE = :item_reference TEXT = :text # @!method self.values # @return [Array<Symbol>] end end |
Instance Attribute Details
#audio ⇒ String?
Base64-encoded audio bytes, used for input_audio content type.
145 |
# File 'lib/openai/models/realtime/conversation_item_with_reference.rb', line 145 optional :audio, String |
#id ⇒ String?
ID of a previous conversation item to reference (for item_reference content
types in response.create events). These can reference both client and server
created items.
139 |
# File 'lib/openai/models/realtime/conversation_item_with_reference.rb', line 139 optional :id, String |
#text ⇒ String?
The text content, used for input_text and text content types.
151 |
# File 'lib/openai/models/realtime/conversation_item_with_reference.rb', line 151 optional :text, String |
#transcript ⇒ String?
The transcript of the audio, used for input_audio content type.
157 |
# File 'lib/openai/models/realtime/conversation_item_with_reference.rb', line 157 optional :transcript, String |
#type ⇒ OpenAI::Models::Realtime::ConversationItemWithReference::Content::type_?
The content type (input_text, input_audio, item_reference, text).
163 |
# File 'lib/openai/models/realtime/conversation_item_with_reference.rb', line 163 optional :type, enum: -> { OpenAI::Realtime::ConversationItemWithReference::Content::Type } |
Instance Method Details
#to_hash ⇒ {
246 |
# File 'sig/openai/models/realtime/conversation_item_with_reference.rbs', line 246
def to_hash: -> {
|