Class: Anthropic::Models::Beta::BetaSystemMessageParam

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/anthropic/models/beta/beta_system_message_param.rb,
sig/anthropic/models/beta/beta_system_message_param.rbs

Defined Under Namespace

Modules: ClearAt, Content

Instance Attribute Summary collapse

Class Method 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, 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(clear_at: nil, content: nil, output_config: nil, role: :system) ⇒ BetaSystemMessageParam

Some parameter documentations has been truncated, see Anthropic::Models::Beta::BetaSystemMessageParam for more details.

Parameters:



# File 'lib/anthropic/models/beta/beta_system_message_param.rb', line 38

Instance Attribute Details

#clear_at ⇒ Symbol, ...

How long this system message's text stays in front of the model. "never" (the default) renders it on every request that includes it. "next_user_message" renders it only for the user turn it follows: once a later role: "user" message exists in messages the message stays in the array (send it unchanged) but is no longer shown to the model. Only permitted on role: "system" messages.

Parameters:

  • value (Anthropic::Models::Beta::BetaSystemMessageParam::clear_at, nil)

Returns:



21
# File 'lib/anthropic/models/beta/beta_system_message_param.rb', line 21

optional :clear_at, enum: -> { Anthropic::Beta::BetaSystemMessageParam::ClearAt }, nil?: true

#content ⇒ String, ...

Parameters:

  • (Anthropic::Models::Beta::BetaSystemMessageParam::content)

Returns:



26
# File 'lib/anthropic/models/beta/beta_system_message_param.rb', line 26

optional :content, union: -> { Anthropic::Beta::BetaSystemMessageParam::Content }

#output_config ⇒ Anthropic::Models::Beta::BetaSystemMessageOutputConfig?

Per-message output configuration on a role:"system" input message.

Fields here apply per-turn; format remains top-level only. An empty {} is accepted on a message that carries content; a message with neither content nor output_config fields is rejected.

Parameters:

  • value (Anthropic::Beta::BetaSystemMessageOutputConfig, nil)

Returns:



36
# File 'lib/anthropic/models/beta/beta_system_message_param.rb', line 36

optional :output_config, -> { Anthropic::Beta::BetaSystemMessageOutputConfig }, nil?: true

#role ⇒ Symbol, :system

Parameters:

  • value (:system)

Returns:

  • (Symbol, :system)


10
# File 'lib/anthropic/models/beta/beta_system_message_param.rb', line 10

required :role, const: :system

Class Method Details

.values ⇒ Array<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/anthropic/models/beta/beta_system_message_param.rb', line 64

Instance Method Details

#to_hash ⇒ { role: :system, clear_at: Anthropic::Models::Beta::BetaSystemMessageParam::clear_at?, content: Anthropic::Models::Beta::BetaSystemMessageParam::content, output_config: Anthropic::Beta::BetaSystemMessageOutputConfig? }

Returns:

  • ({ role: :system, clear_at: Anthropic::Models::Beta::BetaSystemMessageParam::clear_at?, content: Anthropic::Models::Beta::BetaSystemMessageParam::content, output_config: Anthropic::Beta::BetaSystemMessageOutputConfig? })


34
35
36
37
38
39
# File 'sig/anthropic/models/beta/beta_system_message_param.rbs', line 34

def to_hash: -> {
  role: :system,
  clear_at: Anthropic::Models::Beta::BetaSystemMessageParam::clear_at?,
  content: Anthropic::Models::Beta::BetaSystemMessageParam::content,
  output_config: Anthropic::Beta::BetaSystemMessageOutputConfig?
}