Class: OpenAI::Models::Live::InitialItem::Developer::Content

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

Defined Under Namespace

Modules: Type

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

Text supplied in a developer or user message when starting a Live session.

Parameters:



76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
# File 'lib/openai/models/live/initial_item.rb', line 76

class Content < OpenAI::Internal::Type::BaseModel
  # @!attribute text
  #   The message text to include in the Live session’s initial conversation history.
  #
  #   @return [String]
  required :text, String

  # @!attribute type
  #   The text content type. Always `input_text`.
  #
  #   @return [Symbol, OpenAI::Models::Live::InitialItem::Developer::Content::Type, nil]
  optional :type, enum: -> { OpenAI::Live::InitialItem::Developer::Content::Type }

  # @!method initialize(text:, type: nil)
  #   Text supplied in a developer or user message when starting a Live session.
  #
  #   @param text [String]
  #     The message text to include in the Live session’s initial conversation history.
  #
  #   @param type [Symbol, OpenAI::Models::Live::InitialItem::Developer::Content::Type]
  #     The text content type. Always `input_text`.

  # The text content type. Always `input_text`.
  #
  # @see OpenAI::Models::Live::InitialItem::Developer::Content#type
  module Type
    extend OpenAI::Internal::Type::Enum

    INPUT_TEXT = :input_text

    # @!method self.values
    #   @return [Array<Symbol>]
  end
end

Instance Attribute Details

#textString

The message text to include in the Live session’s initial conversation history.

Parameters:

  • value (String)

Returns:

  • (String)


81
# File 'lib/openai/models/live/initial_item.rb', line 81

required :text, String

#typeSymbol, ...

The text content type. Always input_text.



87
# File 'lib/openai/models/live/initial_item.rb', line 87

optional :type, enum: -> { OpenAI::Live::InitialItem::Developer::Content::Type }

Instance Method Details

#to_hash{

Returns:

  • ({)


72
# File 'sig/openai/models/live/initial_item.rbs', line 72

def to_hash: -> {