Class: OpenAI::Models::Live::DecisionDeveloperMessage

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

Defined Under Namespace

Modules: Content, 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_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(content:, id: nil, type: nil, role: :developer) ⇒ DecisionDeveloperMessage

Returns a new instance of DecisionDeveloperMessage.

Parameters:

  • content —

    The text input to the model.

  • id (defaults to: nil) —

    The unique ID of this message item.

  • content: (OpenAI::Models::Live::DecisionDeveloperMessage::content)
  • id: (String, nil) (defaults to: nil)
  • type: (OpenAI::Models::Live::DecisionDeveloperMessage::type_) (defaults to: nil)
  • role: (:developer) (defaults to: :developer)


# File 'lib/openai/models/live/decision_developer_message.rb', line 29


Instance Attribute Details

#content ⇒ OpenAI::Models::Live::DecisionDeveloperMessage::content

The text input to the model.

Returns:

  • (OpenAI::Models::Live::DecisionDeveloperMessage::content)


11
# File 'lib/openai/models/live/decision_developer_message.rb', line 11

required :content, union: -> { OpenAI::Live::DecisionDeveloperMessage::Content }

#id ⇒ String?

The unique ID of this message item.

Returns:

  • (String, nil)


22
# File 'lib/openai/models/live/decision_developer_message.rb', line 22

optional :id, String, nil?: true

#role ⇒ Symbol, :developer

Parameters:

  • value (:developer)

Returns:

  • (Symbol, :developer)


16
# File 'lib/openai/models/live/decision_developer_message.rb', line 16

required :role, const: :developer

#type ⇒ Symbol, ...

Parameters:

  • (OpenAI::Models::Live::DecisionDeveloperMessage::type_)

Returns:



27
# File 'lib/openai/models/live/decision_developer_message.rb', line 27

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

Instance Method Details

#to_hash ⇒ { content: OpenAI::Models::Live::DecisionDeveloperMessage::content, ?role: :developer, ?id: String?, ?type: OpenAI::Models::Live::DecisionDeveloperMessage::type_ }

Returns:

  • ({ content: OpenAI::Models::Live::DecisionDeveloperMessage::content, ?role: :developer, ?id: String?, ?type: OpenAI::Models::Live::DecisionDeveloperMessage::type_ })


38
39
40
41
42
43
# File 'sig/openai/models/live/decision_developer_message.rbs', line 38

def to_hash: -> {
  content: OpenAI::Models::Live::DecisionDeveloperMessage::content,
  ?role: :developer,
  ?id: String?,
  ?type: OpenAI::Models::Live::DecisionDeveloperMessage::type_
}