Class: Anthropic::Models::Beta::BetaThinkingBlockBinding

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/anthropic/models/beta/beta_thinking_block_binding.rb,
sig/anthropic/models/beta/beta_thinking_block_binding.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

#initialize ⇒ BetaThinkingBlockBinding

Returns a new instance of BetaThinkingBlockBinding.

Parameters:

  • prefix_mismatch_behavior: (Anthropic::Models::Beta::beta_thinking_prefix_mismatch_behavior, nil)


14
15
16
# File 'sig/anthropic/models/beta/beta_thinking_block_binding.rbs', line 14

def initialize: (
  ?prefix_mismatch_behavior: Anthropic::Models::Beta::beta_thinking_prefix_mismatch_behavior?
) -> void

Instance Attribute Details

#prefix_mismatch_behavior ⇒ Symbol, ...

"error" (default) | "drop_block". What happens when a thinking block in messages fails the conversation check (it was created in a different conversation, or the messages before it have changed since). "error" fails the request with a 400 error. "drop_block" removes the failing blocks and the request proceeds; each removal is reported in input_transformations.

Parameters:

  • value (Anthropic::Models::Beta::beta_thinking_prefix_mismatch_behavior, nil)

Returns:



15
16
17
# File 'lib/anthropic/models/beta/beta_thinking_block_binding.rb', line 15

optional :prefix_mismatch_behavior,
enum: -> { Anthropic::Beta::BetaThinkingPrefixMismatchBehavior },
nil?: true

Instance Method Details

#to_hash ⇒ { prefix_mismatch_behavior: Anthropic::Models::Beta::beta_thinking_prefix_mismatch_behavior? }

Returns:

  • ({ prefix_mismatch_behavior: Anthropic::Models::Beta::beta_thinking_prefix_mismatch_behavior? })


18
19
20
# File 'sig/anthropic/models/beta/beta_thinking_block_binding.rbs', line 18

def to_hash: -> {
  prefix_mismatch_behavior: Anthropic::Models::Beta::beta_thinking_prefix_mismatch_behavior?
}