Class: Anthropic::Models::EncryptedCodeExecutionResultBlock

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/anthropic/models/encrypted_code_execution_result_block.rb,
sig/anthropic/models/encrypted_code_execution_result_block.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(content:, encrypted_stdout:, return_code:, stderr:, type: :encrypted_code_execution_result) ⇒ EncryptedCodeExecutionResultBlock

The output and exit code of Python code that Claude ran with the code execution tool, with standard output in encrypted form.

The API returns this block in place of code_execution_result when the code called the web search tool.

See the programmatic tool calling guide to learn more about programmatic tool calling.

Parameters:

  • content (Array<Anthropic::Models::CodeExecutionOutputBlock>)
  • encrypted_stdout (String)
  • return_code (Integer)
  • stderr (String)
  • type (Symbol, :encrypted_code_execution_result) (defaults to: :encrypted_code_execution_result)
  • content: (::Array[Anthropic::CodeExecutionOutputBlock])
  • encrypted_stdout: (String)
  • return_code: (Integer)
  • stderr: (String)
  • type: (:encrypted_code_execution_result) (defaults to: :encrypted_code_execution_result)


# File 'lib/anthropic/models/encrypted_code_execution_result_block.rb', line 31

Instance Attribute Details

#content ⇒ Array<Anthropic::Models::CodeExecutionOutputBlock>



9
# File 'lib/anthropic/models/encrypted_code_execution_result_block.rb', line 9

required :content, -> { Anthropic::Internal::Type::ArrayOf[Anthropic::CodeExecutionOutputBlock] }

#encrypted_stdout ⇒ String

Parameters:

  • value (String)

Returns:

  • (String)


14
# File 'lib/anthropic/models/encrypted_code_execution_result_block.rb', line 14

required :encrypted_stdout, String

#return_code ⇒ Integer

Parameters:

  • value (Integer)

Returns:

  • (Integer)


19
# File 'lib/anthropic/models/encrypted_code_execution_result_block.rb', line 19

required :return_code, Integer

#stderr ⇒ String

Parameters:

  • value (String)

Returns:

  • (String)


24
# File 'lib/anthropic/models/encrypted_code_execution_result_block.rb', line 24

required :stderr, String

#type ⇒ Symbol, :encrypted_code_execution_result

Parameters:

  • value (:encrypted_code_execution_result)

Returns:

  • (Symbol, :encrypted_code_execution_result)


29
# File 'lib/anthropic/models/encrypted_code_execution_result_block.rb', line 29

required :type, const: :encrypted_code_execution_result

Instance Method Details

#to_hash ⇒ { content: ::Array[Anthropic::CodeExecutionOutputBlock], encrypted_stdout: String, return_code: Integer, stderr: String, type: :encrypted_code_execution_result }

Returns:



31
32
33
34
35
36
37
# File 'sig/anthropic/models/encrypted_code_execution_result_block.rbs', line 31

def to_hash: -> {
  content: ::Array[Anthropic::CodeExecutionOutputBlock],
  encrypted_stdout: String,
  return_code: Integer,
  stderr: String,
  type: :encrypted_code_execution_result
}