Class: Anthropic::Models::Beta::BetaFallbackBlock

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

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, 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

#initializeObject



23
# File 'sig/anthropic/models/beta/beta_fallback_block.rbs', line 23

def initialize: (

Instance Attribute Details

#fromAnthropic::Models::Beta::BetaFallbackInfo

The model whose output ends at this point — the model that declined at this hop. When the declining hop is the requested model, its model echoes the top-level model string the caller sent (alias or canonical); when the declining hop is a fallback model, its model is that model's canonical id.

Parameters:

  • value (Anthropic::Beta::BetaFallbackInfo)

Returns:



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

required :from, -> { Anthropic::Beta::BetaFallbackInfo }

#toAnthropic::Models::Beta::BetaFallbackInfo

The fallback model producing the content that follows this block. Its model is always the canonical id.

Parameters:

  • value (Anthropic::Beta::BetaFallbackInfo)

Returns:



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

required :to, -> { Anthropic::Beta::BetaFallbackInfo }

#triggerAnthropic::Models::Beta::BetaFallbackRefusalTrigger

What caused the from model to hand over at this hop.

Parameters:

  • value (Anthropic::Beta::BetaFallbackRefusalTrigger)

Returns:



27
# File 'lib/anthropic/models/beta/beta_fallback_block.rb', line 27

required :trigger, -> { Anthropic::Beta::BetaFallbackRefusalTrigger }

#typeSymbol, :fallback

Parameters:

  • value (:fallback)

Returns:

  • (Symbol, :fallback)


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

required :type, const: :fallback

Instance Method Details

#to_hash{

Returns:

  • ({)


30
# File 'sig/anthropic/models/beta/beta_fallback_block.rbs', line 30

def to_hash: -> {