Class: Anthropic::Models::Beta::BetaFallbackParam

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

Defined Under Namespace

Modules: Speed, Thinking

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(model:, max_tokens: nil, output_config: nil, speed: nil, thinking: nil) ⇒ Object

One entry in the fallbacks chain on a /v1/messages request.

model is required. The override fields (max_tokens, thinking, output_config, and speed) set the corresponding parameter for this attempt only and are validated as if the request were made to model. Any other key is rejected at parse time.

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

Parameters:



# File 'lib/anthropic/models/beta/beta_fallback_param.rb', line 39

Instance Attribute Details

#max_tokensInteger?

Parameters:

  • value (Integer, nil)

Returns:

  • (Integer, nil)


19
# File 'lib/anthropic/models/beta/beta_fallback_param.rb', line 19

optional :max_tokens, Integer, nil?: true

#modelSymbol, ...

The model that will complete your prompt.

See models for additional details and options.

Parameters:

  • value (Anthropic::Models::model)

Returns:



14
# File 'lib/anthropic/models/beta/beta_fallback_param.rb', line 14

required :model, union: -> { Anthropic::Model }

#output_configAnthropic::Models::Beta::BetaOutputConfig?

Parameters:

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

Returns:



24
# File 'lib/anthropic/models/beta/beta_fallback_param.rb', line 24

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

#speedSymbol, ...

Inference speed mode. fast provides significantly faster output token generation at premium pricing. Not all models support fast; invalid combinations are rejected at create time.

Parameters:

  • value (Anthropic::Models::Beta::BetaFallbackParam::speed, nil)

Returns:



32
# File 'lib/anthropic/models/beta/beta_fallback_param.rb', line 32

optional :speed, enum: -> { Anthropic::Beta::BetaFallbackParam::Speed }, nil?: true

#thinkingAnthropic::Models::Beta::BetaThinkingConfigEnabled, ...



37
# File 'lib/anthropic/models/beta/beta_fallback_param.rb', line 37

optional :thinking, union: -> { Anthropic::Beta::BetaFallbackParam::Thinking }, nil?: true

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/anthropic/models/beta/beta_fallback_param.rb', line 71

Instance Method Details

#to_hash{

Returns:

  • ({)


34
# File 'sig/anthropic/models/beta/beta_fallback_param.rbs', line 34

def to_hash: -> {