Module: Anthropic::Models::Beta::BetaIterationsUsageItem
- Extended by:
- Internal::Type::Union
- Defined in:
- lib/anthropic/models/beta/beta_iterations_usage.rb,
sig/anthropic/models/beta/beta_iterations_usage.rbs
Defined Under Namespace
Modules: Type
Class Method Summary collapse
-
.new(type:, **args) ⇒ Anthropic::Models::Beta::BetaMessageIterationUsage, ...
Creates a new instance of the variant class whose
typematches the given value, passing the remaining arguments to its constructor. - .values ⇒ Array<Symbol>
- .variants ⇒ Array(Anthropic::Models::Beta::BetaMessageIterationUsage, Anthropic::Models::Beta::BetaCompactionIterationUsage, Anthropic::Models::Beta::BetaAdvisorMessageIterationUsage, Anthropic::Models::Beta::BetaFallbackMessageIterationUsage)
Methods included from Internal::Type::Union
==, ===, coerce, derefed_variants, dump, hash, inspect, to_sorbet_type
Methods included from Internal::Util::SorbetRuntimeSupport
#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type
Methods included from Internal::Type::Converter
#coerce, coerce, #dump, dump, inspect, #inspect, meta_info, new_coerce_state, type_info
Class Method Details
.new(type:, cache_creation:, cache_creation_input_tokens:, cache_read_input_tokens:, input_tokens:, model:, output_tokens:) ⇒ Anthropic::Beta::BetaMessageIterationUsage .new(type:, cache_creation:, cache_creation_input_tokens:, cache_read_input_tokens:, input_tokens:, output_tokens:) ⇒ Anthropic::Beta::BetaCompactionIterationUsage .new(type:, cache_creation:, cache_creation_input_tokens:, cache_read_input_tokens:, input_tokens:, model:, output_tokens:) ⇒ Anthropic::Beta::BetaAdvisorMessageIterationUsage .new(type:, cache_creation:, cache_creation_input_tokens:, cache_read_input_tokens:, input_tokens:, model:, output_tokens:) ⇒ Anthropic::Beta::BetaFallbackMessageIterationUsage .new(type:, cache_creation:, cache_creation_input_tokens:, cache_read_input_tokens:, input_tokens:, output_tokens:, model:) ⇒ Anthropic::Models::Beta::beta_iterations_usage_item
Creates a new instance of the variant class whose type matches the given
value, passing the remaining arguments to its constructor.
Some parameter documentations has been truncated, see Anthropic::Models::Beta::BetaIterationsUsageItem for more details.
69 70 71 72 73 74 75 76 77 78 79 80 81 82 |
# File 'lib/anthropic/models/beta/beta_iterations_usage.rb', line 69 def self.new(type:, **args) case type.to_sym when :message Anthropic::Beta::BetaMessageIterationUsage.new(**args) when :compaction Anthropic::Beta::BetaCompactionIterationUsage.new(**args) when :advisor_message Anthropic::Beta::BetaAdvisorMessageIterationUsage.new(**args) when :fallback_message Anthropic::Beta::BetaFallbackMessageIterationUsage.new(**args) else raise ArgumentError, "unknown type: #{type}" end end |
.values ⇒ Array<Symbol>
|
|
# File 'lib/anthropic/models/beta/beta_iterations_usage.rb', line 38
|
.variants ⇒ Array(Anthropic::Models::Beta::BetaMessageIterationUsage, Anthropic::Models::Beta::BetaCompactionIterationUsage, Anthropic::Models::Beta::BetaAdvisorMessageIterationUsage, Anthropic::Models::Beta::BetaFallbackMessageIterationUsage)
|
|
# File 'lib/anthropic/models/beta/beta_iterations_usage.rb', line 42
|