Module: Anthropic::Models::Beta::BetaSystemMessageParam::Content::Block
- Extended by:
- Internal::Type::Union
- Defined in:
- lib/anthropic/models/beta/beta_system_message_param.rb,
sig/anthropic/models/beta/beta_system_message_param.rbs
Defined Under Namespace
Modules: Type
Class Method Summary collapse
-
.new(type:, **args) ⇒ Anthropic::Models::Beta::BetaTextBlockParam, ...
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::BetaTextBlockParam, Anthropic::Models::Beta::BetaRequestToolAdditionBlock, Anthropic::Models::Beta::BetaRequestToolRemovalBlock)
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:, text:, cache_control:, citations:) ⇒ Anthropic::Beta::BetaTextBlockParam .new(type:, tool:, cache_control:) ⇒ Anthropic::Beta::BetaRequestToolAdditionBlock .new(type:, tool:, cache_control:) ⇒ Anthropic::Beta::BetaRequestToolRemovalBlock .new(type:, text:, cache_control:, citations:, tool:) ⇒ Anthropic::Models::Beta::BetaSystemMessageParam::Content::block
Creates a new instance of the variant class whose type matches the given
value, passing the remaining arguments to its constructor.
132 133 134 135 136 137 138 139 140 141 142 143 |
# File 'lib/anthropic/models/beta/beta_system_message_param.rb', line 132 def self.new(type:, **args) case type.to_sym when :text Anthropic::Beta::BetaTextBlockParam.new(**args) when :tool_addition Anthropic::Beta::BetaRequestToolAdditionBlock.new(**args) when :tool_removal Anthropic::Beta::BetaRequestToolRemovalBlock.new(**args) else raise ArgumentError, "unknown type: #{type}" end end |
.values ⇒ Array<Symbol>
|
|
# File 'lib/anthropic/models/beta/beta_system_message_param.rb', line 108
|
.variants ⇒ Array(Anthropic::Models::Beta::BetaTextBlockParam, Anthropic::Models::Beta::BetaRequestToolAdditionBlock, Anthropic::Models::Beta::BetaRequestToolRemovalBlock)
|
|
# File 'lib/anthropic/models/beta/beta_system_message_param.rb', line 112
|