Class: OpenAI::Models::Realtime::ConversationItemWithReference::Content

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

Defined Under Namespace

Modules: Type

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(id: nil, audio: nil, text: nil, transcript: nil, type: nil) ⇒ Object

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

Parameters:

  • id (String) (defaults to: nil)

    ID of a previous conversation item to reference (for ‘item_reference`

  • audio (String) (defaults to: nil)

    Base64-encoded audio bytes, used for ‘input_audio` content type.

  • text (String) (defaults to: nil)

    The text content, used for ‘input_text` and `text` content types.

  • transcript (String) (defaults to: nil)

    The transcript of the audio, used for ‘input_audio` content type.

  • type (Symbol, OpenAI::Models::Realtime::ConversationItemWithReference::Content::Type) (defaults to: nil)

    The content type (‘input_text`, `input_audio`, `item_reference`, `text`).



110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
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
# File 'lib/openai/models/realtime/conversation_item_with_reference.rb', line 110

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)
  #   Some parameter documentations has been truncated, see
  #   {OpenAI::Models::Realtime::ConversationItemWithReference::Content} for more
  #   details.
  #
  #   @param id [String] ID of a previous conversation item to reference (for `item_reference`
  #
  #   @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

#audioString?

Base64-encoded audio bytes, used for ‘input_audio` content type.

Returns:

  • (String, nil)


123
# File 'lib/openai/models/realtime/conversation_item_with_reference.rb', line 123

optional :audio, String

#idString?

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.

Returns:

  • (String, nil)


117
# File 'lib/openai/models/realtime/conversation_item_with_reference.rb', line 117

optional :id, String

#textString?

The text content, used for ‘input_text` and `text` content types.

Returns:

  • (String, nil)


129
# File 'lib/openai/models/realtime/conversation_item_with_reference.rb', line 129

optional :text, String

#transcriptString?

The transcript of the audio, used for ‘input_audio` content type.

Returns:

  • (String, nil)


135
# File 'lib/openai/models/realtime/conversation_item_with_reference.rb', line 135

optional :transcript, String

#typeSymbol, ...

The content type (‘input_text`, `input_audio`, `item_reference`, `text`).



141
# File 'lib/openai/models/realtime/conversation_item_with_reference.rb', line 141

optional :type, enum: -> { OpenAI::Realtime::ConversationItemWithReference::Content::Type }