Class: OpenAI::Models::Live::InitialItem::User
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- OpenAI::Models::Live::InitialItem::User
- Defined in:
- lib/openai/models/live/initial_item.rb,
sig/openai/models/live/initial_item.rbs
Defined Under Namespace
Modules: Status, Type Classes: Content
Instance Attribute Summary collapse
-
#content ⇒ Array<OpenAI::Models::Live::InitialItem::User::Content>
The message content.
-
#id ⇒ String?
An optional identifier for the supplied history message.
-
#role ⇒ Symbol, :user
The author of this history message.
-
#status ⇒ Symbol, ...
The supplied message’s status.
-
#type ⇒ Symbol, ...
The history item type.
Attributes inherited from Internal::Type::BaseModel
Class Method Summary collapse
Instance Method Summary collapse
- #initialize ⇒ 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 ⇒ Object
134 |
# File 'sig/openai/models/live/initial_item.rbs', line 134
def initialize: (
|
Instance Attribute Details
#content ⇒ Array<OpenAI::Models::Live::InitialItem::User::Content>
The message content. Supply exactly one text part for the initial Live conversation history.
144 |
# File 'lib/openai/models/live/initial_item.rb', line 144 required :content, -> { OpenAI::Internal::Type::ArrayOf[OpenAI::Live::InitialItem::User::Content] } |
#id ⇒ String?
An optional identifier for the supplied history message. Live uses the message’s role and text to initialize the conversation.
157 |
# File 'lib/openai/models/live/initial_item.rb', line 157 optional :id, String, nil?: true |
#role ⇒ Symbol, :user
The author of this history message. Always user.
150 |
# File 'lib/openai/models/live/initial_item.rb', line 150 required :role, const: :user |
#status ⇒ Symbol, ...
The supplied message’s status. Live uses its text as history and does not resume an incomplete message.
164 |
# File 'lib/openai/models/live/initial_item.rb', line 164 optional :status, enum: -> { OpenAI::Live::InitialItem::User::Status }, nil?: true |
#type ⇒ Symbol, ...
The history item type. Always message.
170 |
# File 'lib/openai/models/live/initial_item.rb', line 170 optional :type, enum: -> { OpenAI::Live::InitialItem::User::Type } |
Class Method Details
.values ⇒ Array<Symbol>
|
|
# File 'lib/openai/models/live/initial_item.rb', line 222
|
Instance Method Details
#to_hash ⇒ {
142 |
# File 'sig/openai/models/live/initial_item.rbs', line 142
def to_hash: -> {
|