Module: Anthropic::Models::Beta::BetaContentBlock
- Extended by:
- Internal::Type::Union
- Defined in:
- lib/anthropic/models/beta/beta_content_block.rb
Overview
Response model for a file uploaded to the container.
Class Method Summary collapse
-
.new(type:, **args) ⇒ Anthropic::Models::Beta::BetaTextBlock, ...
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::BetaTextBlock, Anthropic::Models::Beta::BetaThinkingBlock, Anthropic::Models::Beta::BetaRedactedThinkingBlock, Anthropic::Models::Beta::BetaToolUseBlock, Anthropic::Models::Beta::BetaServerToolUseBlock, Anthropic::Models::Beta::BetaWebSearchToolResultBlock, Anthropic::Models::Beta::BetaWebFetchToolResultBlock, Anthropic::Models::Beta::BetaAdvisorToolResultBlock, Anthropic::Models::Beta::BetaCodeExecutionToolResultBlock, Anthropic::Models::Beta::BetaBashCodeExecutionToolResultBlock, Anthropic::Models::Beta::BetaTextEditorCodeExecutionToolResultBlock, Anthropic::Models::Beta::BetaToolSearchToolResultBlock, Anthropic::Models::Beta::BetaMCPToolUseBlock, Anthropic::Models::Beta::BetaMCPToolResultBlock, Anthropic::Models::Beta::BetaContainerUploadBlock, Anthropic::Models::Beta::BetaCompactionBlock, Anthropic::Models::Beta::BetaFallbackBlock)
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::BetaTextBlock, ...
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::BetaContentBlock for more details.
115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 |
# File 'lib/anthropic/models/beta/beta_content_block.rb', line 115 def self.new(type:, **args) case type.to_sym when :text Anthropic::Beta::BetaTextBlock.new(**args) when :thinking Anthropic::Beta::BetaThinkingBlock.new(**args) when :redacted_thinking Anthropic::Beta::BetaRedactedThinkingBlock.new(**args) when :tool_use Anthropic::Beta::BetaToolUseBlock.new(**args) when :server_tool_use Anthropic::Beta::BetaServerToolUseBlock.new(**args) when :web_search_tool_result Anthropic::Beta::BetaWebSearchToolResultBlock.new(**args) when :web_fetch_tool_result Anthropic::Beta::BetaWebFetchToolResultBlock.new(**args) when :advisor_tool_result Anthropic::Beta::BetaAdvisorToolResultBlock.new(**args) when :code_execution_tool_result Anthropic::Beta::BetaCodeExecutionToolResultBlock.new(**args) when :bash_code_execution_tool_result Anthropic::Beta::BetaBashCodeExecutionToolResultBlock.new(**args) when :text_editor_code_execution_tool_result Anthropic::Beta::BetaTextEditorCodeExecutionToolResultBlock.new(**args) when :tool_search_tool_result Anthropic::Beta::BetaToolSearchToolResultBlock.new(**args) when :mcp_tool_use Anthropic::Beta::BetaMCPToolUseBlock.new(**args) when :mcp_tool_result Anthropic::Beta::BetaMCPToolResultBlock.new(**args) when :container_upload Anthropic::Beta::BetaContainerUploadBlock.new(**args) when :compaction Anthropic::Beta::BetaCompactionBlock.new(**args) when :fallback Anthropic::Beta::BetaFallbackBlock.new(**args) else raise ArgumentError, "unknown type: #{type}" end end |
.variants ⇒ Array(Anthropic::Models::Beta::BetaTextBlock, Anthropic::Models::Beta::BetaThinkingBlock, Anthropic::Models::Beta::BetaRedactedThinkingBlock, Anthropic::Models::Beta::BetaToolUseBlock, Anthropic::Models::Beta::BetaServerToolUseBlock, Anthropic::Models::Beta::BetaWebSearchToolResultBlock, Anthropic::Models::Beta::BetaWebFetchToolResultBlock, Anthropic::Models::Beta::BetaAdvisorToolResultBlock, Anthropic::Models::Beta::BetaCodeExecutionToolResultBlock, Anthropic::Models::Beta::BetaBashCodeExecutionToolResultBlock, Anthropic::Models::Beta::BetaTextEditorCodeExecutionToolResultBlock, Anthropic::Models::Beta::BetaToolSearchToolResultBlock, Anthropic::Models::Beta::BetaMCPToolUseBlock, Anthropic::Models::Beta::BetaMCPToolResultBlock, Anthropic::Models::Beta::BetaContainerUploadBlock, Anthropic::Models::Beta::BetaCompactionBlock, Anthropic::Models::Beta::BetaFallbackBlock)
|
|
# File 'lib/anthropic/models/beta/beta_content_block.rb', line 64
|