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

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: Status, Type Classes: Content

Instance Attribute Summary collapse

Attributes inherited from Internal::Type::BaseModel

#last_response

Class Method Summary collapse

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

#initializeObject



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

def initialize: (

Instance Attribute Details

#contentArray<OpenAI::Models::Live::InitialItem::Developer::Content>

The message content. Supply exactly one text part for the initial Live conversation history.

Parameters:

  • value (::Array[OpenAI::Live::InitialItem::Developer::Content])

Returns:



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

required :content, -> { OpenAI::Internal::Type::ArrayOf[OpenAI::Live::InitialItem::Developer::Content] }

#idString?

An optional identifier for the supplied history message. Live uses the message’s role and text to initialize the conversation.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


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

optional :id, String, nil?: true

#roleSymbol, :developer

The author of this history message. Always developer.

Parameters:

  • value (:developer)

Returns:

  • (Symbol, :developer)


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

required :role, const: :developer

#statusSymbol, ...

The supplied message’s status. Live uses its text as history and does not resume an incomplete message.

Parameters:

  • value (OpenAI::Models::Live::InitialItem::Developer::status, nil)

Returns:



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

optional :status, enum: -> { OpenAI::Live::InitialItem::Developer::Status }, nil?: true

#typeSymbol, ...

The history item type. Always message.



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

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

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


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

Instance Method Details

#to_hash{

Returns:

  • ({)


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

def to_hash: -> {