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::Live::InitialItem::User::Content]
The message content.
-
#id ⇒ String?
An optional identifier for the supplied history message.
-
#role ⇒ :user
The author of this history message.
-
#status ⇒ OpenAI::Models::Live::InitialItem::User::status?
The supplied message’s status.
-
#type ⇒ OpenAI::Models::Live::InitialItem::User::type_?
The history item type.
Attributes inherited from Internal::Type::BaseModel
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ User
constructor
A new instance of User.
- #to_hash ⇒ { content: ::Array[OpenAI::Live::InitialItem::User::Content], ?role: :user, ?id: String?, ?status: OpenAI::Models::Live::InitialItem::User::status?, ?type: OpenAI::Models::Live::InitialItem::User::type_ }
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_cached, coerce_with_error, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, resolve_type, 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 ⇒ User
Returns a new instance of User.
185 186 187 188 189 190 191 |
# File 'sig/openai/models/live/initial_item.rbs', line 185
def initialize: (
content: ::Array[OpenAI::Live::InitialItem::User::Content],
?id: String?,
?status: OpenAI::Models::Live::InitialItem::User::status?,
?type: OpenAI::Models::Live::InitialItem::User::type_,
?role: :user
) -> void
|
Instance Attribute Details
#content ⇒ ::Array[OpenAI::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 ⇒ :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 ⇒ OpenAI::Models::Live::InitialItem::User::status?
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 ⇒ OpenAI::Models::Live::InitialItem::User::type_?
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 ⇒ { content: ::Array[OpenAI::Live::InitialItem::User::Content], ?role: :user, ?id: String?, ?status: OpenAI::Models::Live::InitialItem::User::status?, ?type: OpenAI::Models::Live::InitialItem::User::type_ }
193 194 195 196 197 198 199 |
# File 'sig/openai/models/live/initial_item.rbs', line 193
def to_hash: -> {
content: ::Array[OpenAI::Live::InitialItem::User::Content],
?role: :user,
?id: String?,
?status: OpenAI::Models::Live::InitialItem::User::status?,
?type: OpenAI::Models::Live::InitialItem::User::type_
}
|