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

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

Defined Under Namespace

Modules: Content

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, 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, #dump, dump, #inspect, inspect, 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

Some parameter documentations has been truncated, see OpenAI::Models::Chat::ChatCompletionDeveloperMessageParam for more details.

Developer-provided instructions that the model should follow, regardless of messages sent by the user. With o1 models and newer, ‘developer` messages replace the previous `system` messages.

Parameters:

  • content (String, Array<OpenAI::Models::Chat::ChatCompletionContentPartText>) (defaults to: )

    The contents of the developer message.

  • name (String) (defaults to: nil)

    An optional name for the participant. Provides the model information to differen

  • role (Symbol, :developer) (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

#contentString, Array<OpenAI::Models::Chat::ChatCompletionContentPartText>

The contents of the developer message.



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

#roleSymbol, :developer

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

Returns:

  • (Symbol, :developer)


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

required :role, const: :developer