Module: Anthropic::Models::Beta::BetaRawContentBlockDelta
- Extended by:
- Internal::Type::Union
- Defined in:
- lib/anthropic/models/beta/beta_raw_content_block_delta.rb
Class Method Summary collapse
-
.new(type:, **args) ⇒ Anthropic::Models::Beta::BetaTextDelta, ...
Creates a new instance of the variant class whose
typematches the given value, passing the remaining arguments to its constructor. - .variants ⇒ Array(Anthropic::Models::Beta::BetaTextDelta, Anthropic::Models::Beta::BetaInputJSONDelta, Anthropic::Models::Beta::BetaCitationsDelta, Anthropic::Models::Beta::BetaThinkingDelta, Anthropic::Models::Beta::BetaSignatureDelta, Anthropic::Models::Beta::BetaCompactionContentBlockDelta)
Methods included from Internal::Type::Union
==, ===, coerce, derefed_variants, dump, hash, inspect, to_sorbet_type, variants
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:, **args) ⇒ Anthropic::Models::Beta::BetaTextDelta, ...
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::BetaRawContentBlockDelta for more details.
54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 |
# File 'lib/anthropic/models/beta/beta_raw_content_block_delta.rb', line 54 def self.new(type:, **args) case type.to_sym when :text_delta Anthropic::Beta::BetaTextDelta.new(**args) when :input_json_delta Anthropic::Beta::BetaInputJSONDelta.new(**args) when :citations_delta Anthropic::Beta::BetaCitationsDelta.new(**args) when :thinking_delta Anthropic::Beta::BetaThinkingDelta.new(**args) when :signature_delta Anthropic::Beta::BetaSignatureDelta.new(**args) when :compaction_delta Anthropic::Beta::BetaCompactionContentBlockDelta.new(**args) else raise ArgumentError, "unknown type: #{type}" end end |
.variants ⇒ Array(Anthropic::Models::Beta::BetaTextDelta, Anthropic::Models::Beta::BetaInputJSONDelta, Anthropic::Models::Beta::BetaCitationsDelta, Anthropic::Models::Beta::BetaThinkingDelta, Anthropic::Models::Beta::BetaSignatureDelta, Anthropic::Models::Beta::BetaCompactionContentBlockDelta)
|
|
# File 'lib/anthropic/models/beta/beta_raw_content_block_delta.rb', line 23
|