Class: OpenAI::Models::Chat::ChatCompletionDeveloperMessageParam

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

Defined Under Namespace

Modules: Content

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(content:, name: nil, role: :developer) ⇒ Object

Parameters:

  • content

    The contents of the developer message.

  • name (defaults to: nil)

    An optional name for the participant. Provides the model information to differentiate between participants of the same role.

  • role (defaults to: :developer)

    The role of the messages author, in this case developer.



# File 'lib/openai/models/chat/chat_completion_developer_message_param.rb', line 26

Instance Attribute Details

#contentOpenAI::Models::Chat::ChatCompletionDeveloperMessageParam::content

The contents of the developer message.

Returns:

  • (OpenAI::Models::Chat::ChatCompletionDeveloperMessageParam::content)


11
# File 'lib/openai/models/chat/chat_completion_developer_message_param.rb', line 11

required :content, union: -> { OpenAI::Chat::ChatCompletionDeveloperMessageParam::Content }

#nameString?

An optional name for the participant. Provides the model information to differentiate between participants of the same role.

Returns:

  • (String, nil)


24
# File 'lib/openai/models/chat/chat_completion_developer_message_param.rb', line 24

optional :name, String

#role:developer

The role of the messages author, in this case developer.

Returns:

  • (:developer)


17
# File 'lib/openai/models/chat/chat_completion_developer_message_param.rb', line 17

required :role, const: :developer

Instance Method Details

#to_hash{

Returns:

  • ({)


41
# File 'sig/openai/models/chat/chat_completion_developer_message_param.rbs', line 41

def to_hash: -> {