anthropic 1.15.2 → 1.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +13 -0
- data/README.md +10 -10
- data/lib/anthropic/helpers/tools/compaction_control.rb +105 -0
- data/lib/anthropic/helpers/tools/runner.rb +126 -13
- data/lib/anthropic/models/anthropic_beta.rb +3 -0
- data/lib/anthropic/models/beta/beta_code_execution_tool_20250522.rb +28 -1
- data/lib/anthropic/models/beta/beta_code_execution_tool_20250825.rb +28 -1
- data/lib/anthropic/models/beta/beta_content_block.rb +3 -1
- data/lib/anthropic/models/beta/beta_content_block_param.rb +3 -1
- data/lib/anthropic/models/beta/beta_direct_caller.rb +21 -0
- data/lib/anthropic/models/beta/beta_mcp_tool_config.rb +27 -0
- data/lib/anthropic/models/beta/beta_mcp_tool_default_config.rb +27 -0
- data/lib/anthropic/models/beta/beta_mcp_toolset.rb +58 -0
- data/lib/anthropic/models/beta/beta_memory_tool_20250818.rb +36 -1
- data/lib/anthropic/models/beta/beta_message.rb +2 -2
- data/lib/anthropic/models/beta/beta_message_param.rb +3 -3
- data/lib/anthropic/models/beta/beta_output_config.rb +34 -0
- data/lib/anthropic/models/beta/beta_raw_content_block_start_event.rb +5 -3
- data/lib/anthropic/models/beta/beta_server_tool_caller.rb +27 -0
- data/lib/anthropic/models/beta/beta_server_tool_use_block.rb +32 -1
- data/lib/anthropic/models/beta/beta_server_tool_use_block_param.rb +33 -1
- data/lib/anthropic/models/beta/beta_tool.rb +36 -1
- data/lib/anthropic/models/beta/beta_tool_bash_20241022.rb +36 -1
- data/lib/anthropic/models/beta/beta_tool_bash_20250124.rb +36 -1
- data/lib/anthropic/models/beta/beta_tool_computer_use_20241022.rb +36 -1
- data/lib/anthropic/models/beta/beta_tool_computer_use_20250124.rb +36 -1
- data/lib/anthropic/models/beta/beta_tool_computer_use_20251124.rb +114 -0
- data/lib/anthropic/models/beta/beta_tool_reference_block.rb +25 -0
- data/lib/anthropic/models/beta/beta_tool_reference_block_param.rb +36 -0
- data/lib/anthropic/models/beta/beta_tool_result_block_param.rb +8 -4
- data/lib/anthropic/models/beta/beta_tool_search_tool_bm25_20251119.rb +85 -0
- data/lib/anthropic/models/beta/beta_tool_search_tool_regex_20251119.rb +85 -0
- data/lib/anthropic/models/beta/beta_tool_search_tool_result_block.rb +43 -0
- data/lib/anthropic/models/beta/beta_tool_search_tool_result_block_param.rb +53 -0
- data/lib/anthropic/models/beta/beta_tool_search_tool_result_error.rb +44 -0
- data/lib/anthropic/models/beta/beta_tool_search_tool_result_error_param.rb +38 -0
- data/lib/anthropic/models/beta/beta_tool_search_tool_search_result_block.rb +26 -0
- data/lib/anthropic/models/beta/beta_tool_search_tool_search_result_block_param.rb +26 -0
- data/lib/anthropic/models/beta/beta_tool_text_editor_20241022.rb +36 -1
- data/lib/anthropic/models/beta/beta_tool_text_editor_20250124.rb +36 -1
- data/lib/anthropic/models/beta/beta_tool_text_editor_20250429.rb +36 -1
- data/lib/anthropic/models/beta/beta_tool_text_editor_20250728.rb +36 -1
- data/lib/anthropic/models/beta/beta_tool_union.rb +17 -1
- data/lib/anthropic/models/beta/beta_tool_use_block.rb +30 -1
- data/lib/anthropic/models/beta/beta_tool_use_block_param.rb +27 -1
- data/lib/anthropic/models/beta/beta_web_fetch_tool_20250910.rb +28 -1
- data/lib/anthropic/models/beta/beta_web_search_tool_20250305.rb +28 -1
- data/lib/anthropic/models/beta/message_count_tokens_params.rb +29 -4
- data/lib/anthropic/models/beta/message_create_params.rb +12 -3
- data/lib/anthropic/models/beta/messages/batch_create_params.rb +16 -7
- data/lib/anthropic/models/messages/batch_create_params.rb +4 -4
- data/lib/anthropic/models/model.rb +10 -0
- data/lib/anthropic/resources/beta/messages.rb +26 -11
- data/lib/anthropic/resources/messages.rb +8 -2
- data/lib/anthropic/version.rb +1 -1
- data/lib/anthropic.rb +19 -0
- data/manifest.yaml +1 -0
- data/rbi/anthropic/models/anthropic_beta.rbi +2 -0
- data/rbi/anthropic/models/beta/beta_code_execution_tool_20250522.rbi +77 -0
- data/rbi/anthropic/models/beta/beta_code_execution_tool_20250825.rbi +77 -0
- data/rbi/anthropic/models/beta/beta_content_block.rbi +1 -0
- data/rbi/anthropic/models/beta/beta_content_block_param.rbi +1 -0
- data/rbi/anthropic/models/beta/beta_direct_caller.rbi +31 -0
- data/rbi/anthropic/models/beta/beta_mcp_tool_config.rbi +46 -0
- data/rbi/anthropic/models/beta/beta_mcp_tool_default_config.rbi +46 -0
- data/rbi/anthropic/models/beta/beta_mcp_toolset.rbi +100 -0
- data/rbi/anthropic/models/beta/beta_memory_tool_20250818.rbi +88 -0
- data/rbi/anthropic/models/beta/beta_message.rbi +1 -0
- data/rbi/anthropic/models/beta/beta_output_config.rbi +82 -0
- data/rbi/anthropic/models/beta/beta_raw_content_block_start_event.rbi +2 -0
- data/rbi/anthropic/models/beta/beta_server_tool_caller.rbi +34 -0
- data/rbi/anthropic/models/beta/beta_server_tool_use_block.rbi +54 -1
- data/rbi/anthropic/models/beta/beta_server_tool_use_block_param.rbi +70 -1
- data/rbi/anthropic/models/beta/beta_tool.rbi +75 -0
- data/rbi/anthropic/models/beta/beta_tool_bash_20241022.rbi +88 -0
- data/rbi/anthropic/models/beta/beta_tool_bash_20250124.rbi +88 -0
- data/rbi/anthropic/models/beta/beta_tool_computer_use_20241022.rbi +88 -0
- data/rbi/anthropic/models/beta/beta_tool_computer_use_20250124.rbi +88 -0
- data/rbi/anthropic/models/beta/beta_tool_computer_use_20251124.rbi +204 -0
- data/rbi/anthropic/models/beta/beta_tool_reference_block.rbi +35 -0
- data/rbi/anthropic/models/beta/beta_tool_reference_block_param.rbi +67 -0
- data/rbi/anthropic/models/beta/beta_tool_result_block_param.rbi +3 -1
- data/rbi/anthropic/models/beta/beta_tool_search_tool_bm25_20251119.rbi +198 -0
- data/rbi/anthropic/models/beta/beta_tool_search_tool_regex_20251119.rbi +198 -0
- data/rbi/anthropic/models/beta/beta_tool_search_tool_result_block.rbi +81 -0
- data/rbi/anthropic/models/beta/beta_tool_search_tool_result_block_param.rbi +110 -0
- data/rbi/anthropic/models/beta/beta_tool_search_tool_result_error.rbi +104 -0
- data/rbi/anthropic/models/beta/beta_tool_search_tool_result_error_param.rbi +96 -0
- data/rbi/anthropic/models/beta/beta_tool_search_tool_search_result_block.rbi +48 -0
- data/rbi/anthropic/models/beta/beta_tool_search_tool_search_result_block_param.rbi +48 -0
- data/rbi/anthropic/models/beta/beta_tool_text_editor_20241022.rbi +88 -0
- data/rbi/anthropic/models/beta/beta_tool_text_editor_20250124.rbi +88 -0
- data/rbi/anthropic/models/beta/beta_tool_text_editor_20250429.rbi +88 -0
- data/rbi/anthropic/models/beta/beta_tool_text_editor_20250728.rbi +88 -0
- data/rbi/anthropic/models/beta/beta_tool_union.rbi +9 -1
- data/rbi/anthropic/models/beta/beta_tool_use_block.rbi +55 -2
- data/rbi/anthropic/models/beta/beta_tool_use_block_param.rbi +58 -1
- data/rbi/anthropic/models/beta/beta_web_fetch_tool_20250910.rbi +77 -0
- data/rbi/anthropic/models/beta/beta_web_search_tool_20250305.rbi +77 -0
- data/rbi/anthropic/models/beta/message_count_tokens_params.rbi +44 -5
- data/rbi/anthropic/models/beta/message_create_params.rbi +35 -4
- data/rbi/anthropic/models/beta/messages/batch_create_params.rbi +43 -10
- data/rbi/anthropic/models/messages/batch_create_params.rbi +6 -6
- data/rbi/anthropic/models/model.rbi +8 -0
- data/rbi/anthropic/resources/beta/messages.rbi +29 -3
- data/sig/anthropic/models/anthropic_beta.rbs +2 -0
- data/sig/anthropic/models/beta/beta_code_execution_tool_20250522.rbs +27 -0
- data/sig/anthropic/models/beta/beta_code_execution_tool_20250825.rbs +27 -0
- data/sig/anthropic/models/beta/beta_content_block.rbs +1 -0
- data/sig/anthropic/models/beta/beta_content_block_param.rbs +1 -0
- data/sig/anthropic/models/beta/beta_direct_caller.rbs +17 -0
- data/sig/anthropic/models/beta/beta_mcp_tool_config.rbs +23 -0
- data/sig/anthropic/models/beta/beta_mcp_tool_default_config.rbs +23 -0
- data/sig/anthropic/models/beta/beta_mcp_toolset.rbs +48 -0
- data/sig/anthropic/models/beta/beta_memory_tool_20250818.rbs +36 -0
- data/sig/anthropic/models/beta/beta_output_config.rbs +34 -0
- data/sig/anthropic/models/beta/beta_raw_content_block_start_event.rbs +1 -0
- data/sig/anthropic/models/beta/beta_server_tool_caller.rbs +23 -0
- data/sig/anthropic/models/beta/beta_server_tool_use_block.rbs +19 -0
- data/sig/anthropic/models/beta/beta_server_tool_use_block_param.rbs +25 -2
- data/sig/anthropic/models/beta/beta_tool.rbs +36 -0
- data/sig/anthropic/models/beta/beta_tool_bash_20241022.rbs +36 -0
- data/sig/anthropic/models/beta/beta_tool_bash_20250124.rbs +36 -0
- data/sig/anthropic/models/beta/beta_tool_computer_use_20241022.rbs +36 -0
- data/sig/anthropic/models/beta/beta_tool_computer_use_20250124.rbs +36 -0
- data/sig/anthropic/models/beta/beta_tool_computer_use_20251124.rbs +99 -0
- data/sig/anthropic/models/beta/beta_tool_reference_block.rbs +20 -0
- data/sig/anthropic/models/beta/beta_tool_reference_block_param.rbs +34 -0
- data/sig/anthropic/models/beta/beta_tool_result_block_param.rbs +1 -0
- data/sig/anthropic/models/beta/beta_tool_search_tool_bm25_20251119.rbs +79 -0
- data/sig/anthropic/models/beta/beta_tool_search_tool_regex_20251119.rbs +79 -0
- data/sig/anthropic/models/beta/beta_tool_search_tool_result_block.rbs +44 -0
- data/sig/anthropic/models/beta/beta_tool_search_tool_result_block_param.rbs +49 -0
- data/sig/anthropic/models/beta/beta_tool_search_tool_result_error.rbs +51 -0
- data/sig/anthropic/models/beta/beta_tool_search_tool_result_error_param.rbs +46 -0
- data/sig/anthropic/models/beta/beta_tool_search_tool_search_result_block.rbs +29 -0
- data/sig/anthropic/models/beta/beta_tool_search_tool_search_result_block_param.rbs +29 -0
- data/sig/anthropic/models/beta/beta_tool_text_editor_20241022.rbs +36 -0
- data/sig/anthropic/models/beta/beta_tool_text_editor_20250124.rbs +36 -0
- data/sig/anthropic/models/beta/beta_tool_text_editor_20250429.rbs +36 -0
- data/sig/anthropic/models/beta/beta_tool_text_editor_20250728.rbs +36 -0
- data/sig/anthropic/models/beta/beta_tool_union.rbs +4 -0
- data/sig/anthropic/models/beta/beta_tool_use_block.rbs +21 -2
- data/sig/anthropic/models/beta/beta_tool_use_block_param.rbs +21 -2
- data/sig/anthropic/models/beta/beta_web_fetch_tool_20250910.rbs +27 -0
- data/sig/anthropic/models/beta/beta_web_search_tool_20250305.rbs +27 -0
- data/sig/anthropic/models/beta/message_count_tokens_params.rbs +13 -0
- data/sig/anthropic/models/beta/message_create_params.rbs +9 -0
- data/sig/anthropic/models/beta/messages/batch_create_params.rbs +9 -0
- data/sig/anthropic/models/model.rbs +9 -1
- data/sig/anthropic/resources/beta/messages.rbs +3 -0
- metadata +54 -2
|
@@ -9,8 +9,11 @@ module Anthropic
|
|
|
9
9
|
display_width_px: Integer,
|
|
10
10
|
name: :computer,
|
|
11
11
|
type: :computer_20241022,
|
|
12
|
+
allowed_callers: ::Array[Anthropic::Models::Beta::BetaToolComputerUse20241022::allowed_caller],
|
|
12
13
|
cache_control: Anthropic::Beta::BetaCacheControlEphemeral?,
|
|
14
|
+
defer_loading: bool,
|
|
13
15
|
display_number: Integer?,
|
|
16
|
+
input_examples: ::Array[::Hash[Symbol, top]],
|
|
14
17
|
strict: bool
|
|
15
18
|
}
|
|
16
19
|
|
|
@@ -23,10 +26,26 @@ module Anthropic
|
|
|
23
26
|
|
|
24
27
|
attr_accessor type: :computer_20241022
|
|
25
28
|
|
|
29
|
+
attr_reader allowed_callers: ::Array[Anthropic::Models::Beta::BetaToolComputerUse20241022::allowed_caller]?
|
|
30
|
+
|
|
31
|
+
def allowed_callers=: (
|
|
32
|
+
::Array[Anthropic::Models::Beta::BetaToolComputerUse20241022::allowed_caller]
|
|
33
|
+
) -> ::Array[Anthropic::Models::Beta::BetaToolComputerUse20241022::allowed_caller]
|
|
34
|
+
|
|
26
35
|
attr_accessor cache_control: Anthropic::Beta::BetaCacheControlEphemeral?
|
|
27
36
|
|
|
37
|
+
attr_reader defer_loading: bool?
|
|
38
|
+
|
|
39
|
+
def defer_loading=: (bool) -> bool
|
|
40
|
+
|
|
28
41
|
attr_accessor display_number: Integer?
|
|
29
42
|
|
|
43
|
+
attr_reader input_examples: ::Array[::Hash[Symbol, top]]?
|
|
44
|
+
|
|
45
|
+
def input_examples=: (
|
|
46
|
+
::Array[::Hash[Symbol, top]]
|
|
47
|
+
) -> ::Array[::Hash[Symbol, top]]
|
|
48
|
+
|
|
30
49
|
attr_reader strict: bool?
|
|
31
50
|
|
|
32
51
|
def strict=: (bool) -> bool
|
|
@@ -34,8 +53,11 @@ module Anthropic
|
|
|
34
53
|
def initialize: (
|
|
35
54
|
display_height_px: Integer,
|
|
36
55
|
display_width_px: Integer,
|
|
56
|
+
?allowed_callers: ::Array[Anthropic::Models::Beta::BetaToolComputerUse20241022::allowed_caller],
|
|
37
57
|
?cache_control: Anthropic::Beta::BetaCacheControlEphemeral?,
|
|
58
|
+
?defer_loading: bool,
|
|
38
59
|
?display_number: Integer?,
|
|
60
|
+
?input_examples: ::Array[::Hash[Symbol, top]],
|
|
39
61
|
?strict: bool,
|
|
40
62
|
?name: :computer,
|
|
41
63
|
?type: :computer_20241022
|
|
@@ -46,10 +68,24 @@ module Anthropic
|
|
|
46
68
|
display_width_px: Integer,
|
|
47
69
|
name: :computer,
|
|
48
70
|
type: :computer_20241022,
|
|
71
|
+
allowed_callers: ::Array[Anthropic::Models::Beta::BetaToolComputerUse20241022::allowed_caller],
|
|
49
72
|
cache_control: Anthropic::Beta::BetaCacheControlEphemeral?,
|
|
73
|
+
defer_loading: bool,
|
|
50
74
|
display_number: Integer?,
|
|
75
|
+
input_examples: ::Array[::Hash[Symbol, top]],
|
|
51
76
|
strict: bool
|
|
52
77
|
}
|
|
78
|
+
|
|
79
|
+
type allowed_caller = :direct | :code_execution_20250825
|
|
80
|
+
|
|
81
|
+
module AllowedCaller
|
|
82
|
+
extend Anthropic::Internal::Type::Enum
|
|
83
|
+
|
|
84
|
+
DIRECT: :direct
|
|
85
|
+
CODE_EXECUTION_20250825: :code_execution_20250825
|
|
86
|
+
|
|
87
|
+
def self?.values: -> ::Array[Anthropic::Models::Beta::BetaToolComputerUse20241022::allowed_caller]
|
|
88
|
+
end
|
|
53
89
|
end
|
|
54
90
|
end
|
|
55
91
|
end
|
|
@@ -9,8 +9,11 @@ module Anthropic
|
|
|
9
9
|
display_width_px: Integer,
|
|
10
10
|
name: :computer,
|
|
11
11
|
type: :computer_20250124,
|
|
12
|
+
allowed_callers: ::Array[Anthropic::Models::Beta::BetaToolComputerUse20250124::allowed_caller],
|
|
12
13
|
cache_control: Anthropic::Beta::BetaCacheControlEphemeral?,
|
|
14
|
+
defer_loading: bool,
|
|
13
15
|
display_number: Integer?,
|
|
16
|
+
input_examples: ::Array[::Hash[Symbol, top]],
|
|
14
17
|
strict: bool
|
|
15
18
|
}
|
|
16
19
|
|
|
@@ -23,10 +26,26 @@ module Anthropic
|
|
|
23
26
|
|
|
24
27
|
attr_accessor type: :computer_20250124
|
|
25
28
|
|
|
29
|
+
attr_reader allowed_callers: ::Array[Anthropic::Models::Beta::BetaToolComputerUse20250124::allowed_caller]?
|
|
30
|
+
|
|
31
|
+
def allowed_callers=: (
|
|
32
|
+
::Array[Anthropic::Models::Beta::BetaToolComputerUse20250124::allowed_caller]
|
|
33
|
+
) -> ::Array[Anthropic::Models::Beta::BetaToolComputerUse20250124::allowed_caller]
|
|
34
|
+
|
|
26
35
|
attr_accessor cache_control: Anthropic::Beta::BetaCacheControlEphemeral?
|
|
27
36
|
|
|
37
|
+
attr_reader defer_loading: bool?
|
|
38
|
+
|
|
39
|
+
def defer_loading=: (bool) -> bool
|
|
40
|
+
|
|
28
41
|
attr_accessor display_number: Integer?
|
|
29
42
|
|
|
43
|
+
attr_reader input_examples: ::Array[::Hash[Symbol, top]]?
|
|
44
|
+
|
|
45
|
+
def input_examples=: (
|
|
46
|
+
::Array[::Hash[Symbol, top]]
|
|
47
|
+
) -> ::Array[::Hash[Symbol, top]]
|
|
48
|
+
|
|
30
49
|
attr_reader strict: bool?
|
|
31
50
|
|
|
32
51
|
def strict=: (bool) -> bool
|
|
@@ -34,8 +53,11 @@ module Anthropic
|
|
|
34
53
|
def initialize: (
|
|
35
54
|
display_height_px: Integer,
|
|
36
55
|
display_width_px: Integer,
|
|
56
|
+
?allowed_callers: ::Array[Anthropic::Models::Beta::BetaToolComputerUse20250124::allowed_caller],
|
|
37
57
|
?cache_control: Anthropic::Beta::BetaCacheControlEphemeral?,
|
|
58
|
+
?defer_loading: bool,
|
|
38
59
|
?display_number: Integer?,
|
|
60
|
+
?input_examples: ::Array[::Hash[Symbol, top]],
|
|
39
61
|
?strict: bool,
|
|
40
62
|
?name: :computer,
|
|
41
63
|
?type: :computer_20250124
|
|
@@ -46,10 +68,24 @@ module Anthropic
|
|
|
46
68
|
display_width_px: Integer,
|
|
47
69
|
name: :computer,
|
|
48
70
|
type: :computer_20250124,
|
|
71
|
+
allowed_callers: ::Array[Anthropic::Models::Beta::BetaToolComputerUse20250124::allowed_caller],
|
|
49
72
|
cache_control: Anthropic::Beta::BetaCacheControlEphemeral?,
|
|
73
|
+
defer_loading: bool,
|
|
50
74
|
display_number: Integer?,
|
|
75
|
+
input_examples: ::Array[::Hash[Symbol, top]],
|
|
51
76
|
strict: bool
|
|
52
77
|
}
|
|
78
|
+
|
|
79
|
+
type allowed_caller = :direct | :code_execution_20250825
|
|
80
|
+
|
|
81
|
+
module AllowedCaller
|
|
82
|
+
extend Anthropic::Internal::Type::Enum
|
|
83
|
+
|
|
84
|
+
DIRECT: :direct
|
|
85
|
+
CODE_EXECUTION_20250825: :code_execution_20250825
|
|
86
|
+
|
|
87
|
+
def self?.values: -> ::Array[Anthropic::Models::Beta::BetaToolComputerUse20250124::allowed_caller]
|
|
88
|
+
end
|
|
53
89
|
end
|
|
54
90
|
end
|
|
55
91
|
end
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
module Anthropic
|
|
2
|
+
module Models
|
|
3
|
+
class BetaToolComputerUse20251124 = Beta::BetaToolComputerUse20251124
|
|
4
|
+
|
|
5
|
+
module Beta
|
|
6
|
+
type beta_tool_computer_use20251124 =
|
|
7
|
+
{
|
|
8
|
+
display_height_px: Integer,
|
|
9
|
+
display_width_px: Integer,
|
|
10
|
+
name: :computer,
|
|
11
|
+
type: :computer_20251124,
|
|
12
|
+
allowed_callers: ::Array[Anthropic::Models::Beta::BetaToolComputerUse20251124::allowed_caller],
|
|
13
|
+
cache_control: Anthropic::Beta::BetaCacheControlEphemeral?,
|
|
14
|
+
defer_loading: bool,
|
|
15
|
+
display_number: Integer?,
|
|
16
|
+
enable_zoom: bool,
|
|
17
|
+
input_examples: ::Array[::Hash[Symbol, top]],
|
|
18
|
+
strict: bool
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
class BetaToolComputerUse20251124 < Anthropic::Internal::Type::BaseModel
|
|
22
|
+
attr_accessor display_height_px: Integer
|
|
23
|
+
|
|
24
|
+
attr_accessor display_width_px: Integer
|
|
25
|
+
|
|
26
|
+
attr_accessor name: :computer
|
|
27
|
+
|
|
28
|
+
attr_accessor type: :computer_20251124
|
|
29
|
+
|
|
30
|
+
attr_reader allowed_callers: ::Array[Anthropic::Models::Beta::BetaToolComputerUse20251124::allowed_caller]?
|
|
31
|
+
|
|
32
|
+
def allowed_callers=: (
|
|
33
|
+
::Array[Anthropic::Models::Beta::BetaToolComputerUse20251124::allowed_caller]
|
|
34
|
+
) -> ::Array[Anthropic::Models::Beta::BetaToolComputerUse20251124::allowed_caller]
|
|
35
|
+
|
|
36
|
+
attr_accessor cache_control: Anthropic::Beta::BetaCacheControlEphemeral?
|
|
37
|
+
|
|
38
|
+
attr_reader defer_loading: bool?
|
|
39
|
+
|
|
40
|
+
def defer_loading=: (bool) -> bool
|
|
41
|
+
|
|
42
|
+
attr_accessor display_number: Integer?
|
|
43
|
+
|
|
44
|
+
attr_reader enable_zoom: bool?
|
|
45
|
+
|
|
46
|
+
def enable_zoom=: (bool) -> bool
|
|
47
|
+
|
|
48
|
+
attr_reader input_examples: ::Array[::Hash[Symbol, top]]?
|
|
49
|
+
|
|
50
|
+
def input_examples=: (
|
|
51
|
+
::Array[::Hash[Symbol, top]]
|
|
52
|
+
) -> ::Array[::Hash[Symbol, top]]
|
|
53
|
+
|
|
54
|
+
attr_reader strict: bool?
|
|
55
|
+
|
|
56
|
+
def strict=: (bool) -> bool
|
|
57
|
+
|
|
58
|
+
def initialize: (
|
|
59
|
+
display_height_px: Integer,
|
|
60
|
+
display_width_px: Integer,
|
|
61
|
+
?allowed_callers: ::Array[Anthropic::Models::Beta::BetaToolComputerUse20251124::allowed_caller],
|
|
62
|
+
?cache_control: Anthropic::Beta::BetaCacheControlEphemeral?,
|
|
63
|
+
?defer_loading: bool,
|
|
64
|
+
?display_number: Integer?,
|
|
65
|
+
?enable_zoom: bool,
|
|
66
|
+
?input_examples: ::Array[::Hash[Symbol, top]],
|
|
67
|
+
?strict: bool,
|
|
68
|
+
?name: :computer,
|
|
69
|
+
?type: :computer_20251124
|
|
70
|
+
) -> void
|
|
71
|
+
|
|
72
|
+
def to_hash: -> {
|
|
73
|
+
display_height_px: Integer,
|
|
74
|
+
display_width_px: Integer,
|
|
75
|
+
name: :computer,
|
|
76
|
+
type: :computer_20251124,
|
|
77
|
+
allowed_callers: ::Array[Anthropic::Models::Beta::BetaToolComputerUse20251124::allowed_caller],
|
|
78
|
+
cache_control: Anthropic::Beta::BetaCacheControlEphemeral?,
|
|
79
|
+
defer_loading: bool,
|
|
80
|
+
display_number: Integer?,
|
|
81
|
+
enable_zoom: bool,
|
|
82
|
+
input_examples: ::Array[::Hash[Symbol, top]],
|
|
83
|
+
strict: bool
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
type allowed_caller = :direct | :code_execution_20250825
|
|
87
|
+
|
|
88
|
+
module AllowedCaller
|
|
89
|
+
extend Anthropic::Internal::Type::Enum
|
|
90
|
+
|
|
91
|
+
DIRECT: :direct
|
|
92
|
+
CODE_EXECUTION_20250825: :code_execution_20250825
|
|
93
|
+
|
|
94
|
+
def self?.values: -> ::Array[Anthropic::Models::Beta::BetaToolComputerUse20251124::allowed_caller]
|
|
95
|
+
end
|
|
96
|
+
end
|
|
97
|
+
end
|
|
98
|
+
end
|
|
99
|
+
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
module Anthropic
|
|
2
|
+
module Models
|
|
3
|
+
class BetaToolReferenceBlock = Beta::BetaToolReferenceBlock
|
|
4
|
+
|
|
5
|
+
module Beta
|
|
6
|
+
type beta_tool_reference_block =
|
|
7
|
+
{ tool_name: String, type: :tool_reference }
|
|
8
|
+
|
|
9
|
+
class BetaToolReferenceBlock < Anthropic::Internal::Type::BaseModel
|
|
10
|
+
attr_accessor tool_name: String
|
|
11
|
+
|
|
12
|
+
attr_accessor type: :tool_reference
|
|
13
|
+
|
|
14
|
+
def initialize: (tool_name: String, ?type: :tool_reference) -> void
|
|
15
|
+
|
|
16
|
+
def to_hash: -> { tool_name: String, type: :tool_reference }
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
module Anthropic
|
|
2
|
+
module Models
|
|
3
|
+
class BetaToolReferenceBlockParam = Beta::BetaToolReferenceBlockParam
|
|
4
|
+
|
|
5
|
+
module Beta
|
|
6
|
+
type beta_tool_reference_block_param =
|
|
7
|
+
{
|
|
8
|
+
tool_name: String,
|
|
9
|
+
type: :tool_reference,
|
|
10
|
+
cache_control: Anthropic::Beta::BetaCacheControlEphemeral?
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
class BetaToolReferenceBlockParam < Anthropic::Internal::Type::BaseModel
|
|
14
|
+
attr_accessor tool_name: String
|
|
15
|
+
|
|
16
|
+
attr_accessor type: :tool_reference
|
|
17
|
+
|
|
18
|
+
attr_accessor cache_control: Anthropic::Beta::BetaCacheControlEphemeral?
|
|
19
|
+
|
|
20
|
+
def initialize: (
|
|
21
|
+
tool_name: String,
|
|
22
|
+
?cache_control: Anthropic::Beta::BetaCacheControlEphemeral?,
|
|
23
|
+
?type: :tool_reference
|
|
24
|
+
) -> void
|
|
25
|
+
|
|
26
|
+
def to_hash: -> {
|
|
27
|
+
tool_name: String,
|
|
28
|
+
type: :tool_reference,
|
|
29
|
+
cache_control: Anthropic::Beta::BetaCacheControlEphemeral?
|
|
30
|
+
}
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
@@ -57,6 +57,7 @@ module Anthropic
|
|
|
57
57
|
| Anthropic::Beta::BetaImageBlockParam
|
|
58
58
|
| Anthropic::Beta::BetaSearchResultBlockParam
|
|
59
59
|
| Anthropic::Beta::BetaRequestDocumentBlock
|
|
60
|
+
| Anthropic::Beta::BetaToolReferenceBlockParam
|
|
60
61
|
|
|
61
62
|
module Content
|
|
62
63
|
extend Anthropic::Internal::Type::Union
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
module Anthropic
|
|
2
|
+
module Models
|
|
3
|
+
class BetaToolSearchToolBm25_20251119 = Beta::BetaToolSearchToolBm25_20251119
|
|
4
|
+
|
|
5
|
+
module Beta
|
|
6
|
+
type beta_tool_search_tool_bm25_20251119 =
|
|
7
|
+
{
|
|
8
|
+
name: :tool_search_tool_bm25,
|
|
9
|
+
type: Anthropic::Models::Beta::BetaToolSearchToolBm25_20251119::type_,
|
|
10
|
+
allowed_callers: ::Array[Anthropic::Models::Beta::BetaToolSearchToolBm25_20251119::allowed_caller],
|
|
11
|
+
cache_control: Anthropic::Beta::BetaCacheControlEphemeral?,
|
|
12
|
+
defer_loading: bool,
|
|
13
|
+
strict: bool
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
class BetaToolSearchToolBm25_20251119 < Anthropic::Internal::Type::BaseModel
|
|
17
|
+
attr_accessor name: :tool_search_tool_bm25
|
|
18
|
+
|
|
19
|
+
attr_accessor type: Anthropic::Models::Beta::BetaToolSearchToolBm25_20251119::type_
|
|
20
|
+
|
|
21
|
+
attr_reader allowed_callers: ::Array[Anthropic::Models::Beta::BetaToolSearchToolBm25_20251119::allowed_caller]?
|
|
22
|
+
|
|
23
|
+
def allowed_callers=: (
|
|
24
|
+
::Array[Anthropic::Models::Beta::BetaToolSearchToolBm25_20251119::allowed_caller]
|
|
25
|
+
) -> ::Array[Anthropic::Models::Beta::BetaToolSearchToolBm25_20251119::allowed_caller]
|
|
26
|
+
|
|
27
|
+
attr_accessor cache_control: Anthropic::Beta::BetaCacheControlEphemeral?
|
|
28
|
+
|
|
29
|
+
attr_reader defer_loading: bool?
|
|
30
|
+
|
|
31
|
+
def defer_loading=: (bool) -> bool
|
|
32
|
+
|
|
33
|
+
attr_reader strict: bool?
|
|
34
|
+
|
|
35
|
+
def strict=: (bool) -> bool
|
|
36
|
+
|
|
37
|
+
def initialize: (
|
|
38
|
+
type: Anthropic::Models::Beta::BetaToolSearchToolBm25_20251119::type_,
|
|
39
|
+
?allowed_callers: ::Array[Anthropic::Models::Beta::BetaToolSearchToolBm25_20251119::allowed_caller],
|
|
40
|
+
?cache_control: Anthropic::Beta::BetaCacheControlEphemeral?,
|
|
41
|
+
?defer_loading: bool,
|
|
42
|
+
?strict: bool,
|
|
43
|
+
?name: :tool_search_tool_bm25
|
|
44
|
+
) -> void
|
|
45
|
+
|
|
46
|
+
def to_hash: -> {
|
|
47
|
+
name: :tool_search_tool_bm25,
|
|
48
|
+
type: Anthropic::Models::Beta::BetaToolSearchToolBm25_20251119::type_,
|
|
49
|
+
allowed_callers: ::Array[Anthropic::Models::Beta::BetaToolSearchToolBm25_20251119::allowed_caller],
|
|
50
|
+
cache_control: Anthropic::Beta::BetaCacheControlEphemeral?,
|
|
51
|
+
defer_loading: bool,
|
|
52
|
+
strict: bool
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
type type_ = :tool_search_tool_bm25_20251119 | :tool_search_tool_bm25
|
|
56
|
+
|
|
57
|
+
module Type
|
|
58
|
+
extend Anthropic::Internal::Type::Enum
|
|
59
|
+
|
|
60
|
+
TOOL_SEARCH_TOOL_BM25_20251119: :tool_search_tool_bm25_20251119
|
|
61
|
+
TOOL_SEARCH_TOOL_BM25: :tool_search_tool_bm25
|
|
62
|
+
|
|
63
|
+
def self?.values: -> ::Array[Anthropic::Models::Beta::BetaToolSearchToolBm25_20251119::type_]
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
type allowed_caller = :direct | :code_execution_20250825
|
|
67
|
+
|
|
68
|
+
module AllowedCaller
|
|
69
|
+
extend Anthropic::Internal::Type::Enum
|
|
70
|
+
|
|
71
|
+
DIRECT: :direct
|
|
72
|
+
CODE_EXECUTION_20250825: :code_execution_20250825
|
|
73
|
+
|
|
74
|
+
def self?.values: -> ::Array[Anthropic::Models::Beta::BetaToolSearchToolBm25_20251119::allowed_caller]
|
|
75
|
+
end
|
|
76
|
+
end
|
|
77
|
+
end
|
|
78
|
+
end
|
|
79
|
+
end
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
module Anthropic
|
|
2
|
+
module Models
|
|
3
|
+
class BetaToolSearchToolRegex20251119 = Beta::BetaToolSearchToolRegex20251119
|
|
4
|
+
|
|
5
|
+
module Beta
|
|
6
|
+
type beta_tool_search_tool_regex20251119 =
|
|
7
|
+
{
|
|
8
|
+
name: :tool_search_tool_regex,
|
|
9
|
+
type: Anthropic::Models::Beta::BetaToolSearchToolRegex20251119::type_,
|
|
10
|
+
allowed_callers: ::Array[Anthropic::Models::Beta::BetaToolSearchToolRegex20251119::allowed_caller],
|
|
11
|
+
cache_control: Anthropic::Beta::BetaCacheControlEphemeral?,
|
|
12
|
+
defer_loading: bool,
|
|
13
|
+
strict: bool
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
class BetaToolSearchToolRegex20251119 < Anthropic::Internal::Type::BaseModel
|
|
17
|
+
attr_accessor name: :tool_search_tool_regex
|
|
18
|
+
|
|
19
|
+
attr_accessor type: Anthropic::Models::Beta::BetaToolSearchToolRegex20251119::type_
|
|
20
|
+
|
|
21
|
+
attr_reader allowed_callers: ::Array[Anthropic::Models::Beta::BetaToolSearchToolRegex20251119::allowed_caller]?
|
|
22
|
+
|
|
23
|
+
def allowed_callers=: (
|
|
24
|
+
::Array[Anthropic::Models::Beta::BetaToolSearchToolRegex20251119::allowed_caller]
|
|
25
|
+
) -> ::Array[Anthropic::Models::Beta::BetaToolSearchToolRegex20251119::allowed_caller]
|
|
26
|
+
|
|
27
|
+
attr_accessor cache_control: Anthropic::Beta::BetaCacheControlEphemeral?
|
|
28
|
+
|
|
29
|
+
attr_reader defer_loading: bool?
|
|
30
|
+
|
|
31
|
+
def defer_loading=: (bool) -> bool
|
|
32
|
+
|
|
33
|
+
attr_reader strict: bool?
|
|
34
|
+
|
|
35
|
+
def strict=: (bool) -> bool
|
|
36
|
+
|
|
37
|
+
def initialize: (
|
|
38
|
+
type: Anthropic::Models::Beta::BetaToolSearchToolRegex20251119::type_,
|
|
39
|
+
?allowed_callers: ::Array[Anthropic::Models::Beta::BetaToolSearchToolRegex20251119::allowed_caller],
|
|
40
|
+
?cache_control: Anthropic::Beta::BetaCacheControlEphemeral?,
|
|
41
|
+
?defer_loading: bool,
|
|
42
|
+
?strict: bool,
|
|
43
|
+
?name: :tool_search_tool_regex
|
|
44
|
+
) -> void
|
|
45
|
+
|
|
46
|
+
def to_hash: -> {
|
|
47
|
+
name: :tool_search_tool_regex,
|
|
48
|
+
type: Anthropic::Models::Beta::BetaToolSearchToolRegex20251119::type_,
|
|
49
|
+
allowed_callers: ::Array[Anthropic::Models::Beta::BetaToolSearchToolRegex20251119::allowed_caller],
|
|
50
|
+
cache_control: Anthropic::Beta::BetaCacheControlEphemeral?,
|
|
51
|
+
defer_loading: bool,
|
|
52
|
+
strict: bool
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
type type_ = :tool_search_tool_regex_20251119 | :tool_search_tool_regex
|
|
56
|
+
|
|
57
|
+
module Type
|
|
58
|
+
extend Anthropic::Internal::Type::Enum
|
|
59
|
+
|
|
60
|
+
TOOL_SEARCH_TOOL_REGEX_20251119: :tool_search_tool_regex_20251119
|
|
61
|
+
TOOL_SEARCH_TOOL_REGEX: :tool_search_tool_regex
|
|
62
|
+
|
|
63
|
+
def self?.values: -> ::Array[Anthropic::Models::Beta::BetaToolSearchToolRegex20251119::type_]
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
type allowed_caller = :direct | :code_execution_20250825
|
|
67
|
+
|
|
68
|
+
module AllowedCaller
|
|
69
|
+
extend Anthropic::Internal::Type::Enum
|
|
70
|
+
|
|
71
|
+
DIRECT: :direct
|
|
72
|
+
CODE_EXECUTION_20250825: :code_execution_20250825
|
|
73
|
+
|
|
74
|
+
def self?.values: -> ::Array[Anthropic::Models::Beta::BetaToolSearchToolRegex20251119::allowed_caller]
|
|
75
|
+
end
|
|
76
|
+
end
|
|
77
|
+
end
|
|
78
|
+
end
|
|
79
|
+
end
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
module Anthropic
|
|
2
|
+
module Models
|
|
3
|
+
class BetaToolSearchToolResultBlock = Beta::BetaToolSearchToolResultBlock
|
|
4
|
+
|
|
5
|
+
module Beta
|
|
6
|
+
type beta_tool_search_tool_result_block =
|
|
7
|
+
{
|
|
8
|
+
content: Anthropic::Models::Beta::BetaToolSearchToolResultBlock::content,
|
|
9
|
+
tool_use_id: String,
|
|
10
|
+
type: :tool_search_tool_result
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
class BetaToolSearchToolResultBlock < Anthropic::Internal::Type::BaseModel
|
|
14
|
+
attr_accessor content: Anthropic::Models::Beta::BetaToolSearchToolResultBlock::content
|
|
15
|
+
|
|
16
|
+
attr_accessor tool_use_id: String
|
|
17
|
+
|
|
18
|
+
attr_accessor type: :tool_search_tool_result
|
|
19
|
+
|
|
20
|
+
def initialize: (
|
|
21
|
+
content: Anthropic::Models::Beta::BetaToolSearchToolResultBlock::content,
|
|
22
|
+
tool_use_id: String,
|
|
23
|
+
?type: :tool_search_tool_result
|
|
24
|
+
) -> void
|
|
25
|
+
|
|
26
|
+
def to_hash: -> {
|
|
27
|
+
content: Anthropic::Models::Beta::BetaToolSearchToolResultBlock::content,
|
|
28
|
+
tool_use_id: String,
|
|
29
|
+
type: :tool_search_tool_result
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
type content =
|
|
33
|
+
Anthropic::Beta::BetaToolSearchToolResultError
|
|
34
|
+
| Anthropic::Beta::BetaToolSearchToolSearchResultBlock
|
|
35
|
+
|
|
36
|
+
module Content
|
|
37
|
+
extend Anthropic::Internal::Type::Union
|
|
38
|
+
|
|
39
|
+
def self?.variants: -> ::Array[Anthropic::Models::Beta::BetaToolSearchToolResultBlock::content]
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
end
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
module Anthropic
|
|
2
|
+
module Models
|
|
3
|
+
class BetaToolSearchToolResultBlockParam = Beta::BetaToolSearchToolResultBlockParam
|
|
4
|
+
|
|
5
|
+
module Beta
|
|
6
|
+
type beta_tool_search_tool_result_block_param =
|
|
7
|
+
{
|
|
8
|
+
content: Anthropic::Models::Beta::BetaToolSearchToolResultBlockParam::content,
|
|
9
|
+
tool_use_id: String,
|
|
10
|
+
type: :tool_search_tool_result,
|
|
11
|
+
cache_control: Anthropic::Beta::BetaCacheControlEphemeral?
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
class BetaToolSearchToolResultBlockParam < Anthropic::Internal::Type::BaseModel
|
|
15
|
+
attr_accessor content: Anthropic::Models::Beta::BetaToolSearchToolResultBlockParam::content
|
|
16
|
+
|
|
17
|
+
attr_accessor tool_use_id: String
|
|
18
|
+
|
|
19
|
+
attr_accessor type: :tool_search_tool_result
|
|
20
|
+
|
|
21
|
+
attr_accessor cache_control: Anthropic::Beta::BetaCacheControlEphemeral?
|
|
22
|
+
|
|
23
|
+
def initialize: (
|
|
24
|
+
content: Anthropic::Models::Beta::BetaToolSearchToolResultBlockParam::content,
|
|
25
|
+
tool_use_id: String,
|
|
26
|
+
?cache_control: Anthropic::Beta::BetaCacheControlEphemeral?,
|
|
27
|
+
?type: :tool_search_tool_result
|
|
28
|
+
) -> void
|
|
29
|
+
|
|
30
|
+
def to_hash: -> {
|
|
31
|
+
content: Anthropic::Models::Beta::BetaToolSearchToolResultBlockParam::content,
|
|
32
|
+
tool_use_id: String,
|
|
33
|
+
type: :tool_search_tool_result,
|
|
34
|
+
cache_control: Anthropic::Beta::BetaCacheControlEphemeral?
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
type content =
|
|
38
|
+
Anthropic::Beta::BetaToolSearchToolResultErrorParam
|
|
39
|
+
| Anthropic::Beta::BetaToolSearchToolSearchResultBlockParam
|
|
40
|
+
|
|
41
|
+
module Content
|
|
42
|
+
extend Anthropic::Internal::Type::Union
|
|
43
|
+
|
|
44
|
+
def self?.variants: -> ::Array[Anthropic::Models::Beta::BetaToolSearchToolResultBlockParam::content]
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
end
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
module Anthropic
|
|
2
|
+
module Models
|
|
3
|
+
class BetaToolSearchToolResultError = Beta::BetaToolSearchToolResultError
|
|
4
|
+
|
|
5
|
+
module Beta
|
|
6
|
+
type beta_tool_search_tool_result_error =
|
|
7
|
+
{
|
|
8
|
+
error_code: Anthropic::Models::Beta::BetaToolSearchToolResultError::error_code,
|
|
9
|
+
error_message: String?,
|
|
10
|
+
type: :tool_search_tool_result_error
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
class BetaToolSearchToolResultError < Anthropic::Internal::Type::BaseModel
|
|
14
|
+
attr_accessor error_code: Anthropic::Models::Beta::BetaToolSearchToolResultError::error_code
|
|
15
|
+
|
|
16
|
+
attr_accessor error_message: String?
|
|
17
|
+
|
|
18
|
+
attr_accessor type: :tool_search_tool_result_error
|
|
19
|
+
|
|
20
|
+
def initialize: (
|
|
21
|
+
error_code: Anthropic::Models::Beta::BetaToolSearchToolResultError::error_code,
|
|
22
|
+
error_message: String?,
|
|
23
|
+
?type: :tool_search_tool_result_error
|
|
24
|
+
) -> void
|
|
25
|
+
|
|
26
|
+
def to_hash: -> {
|
|
27
|
+
error_code: Anthropic::Models::Beta::BetaToolSearchToolResultError::error_code,
|
|
28
|
+
error_message: String?,
|
|
29
|
+
type: :tool_search_tool_result_error
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
type error_code =
|
|
33
|
+
:invalid_tool_input
|
|
34
|
+
| :unavailable
|
|
35
|
+
| :too_many_requests
|
|
36
|
+
| :execution_time_exceeded
|
|
37
|
+
|
|
38
|
+
module ErrorCode
|
|
39
|
+
extend Anthropic::Internal::Type::Enum
|
|
40
|
+
|
|
41
|
+
INVALID_TOOL_INPUT: :invalid_tool_input
|
|
42
|
+
UNAVAILABLE: :unavailable
|
|
43
|
+
TOO_MANY_REQUESTS: :too_many_requests
|
|
44
|
+
EXECUTION_TIME_EXCEEDED: :execution_time_exceeded
|
|
45
|
+
|
|
46
|
+
def self?.values: -> ::Array[Anthropic::Models::Beta::BetaToolSearchToolResultError::error_code]
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
end
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
module Anthropic
|
|
2
|
+
module Models
|
|
3
|
+
class BetaToolSearchToolResultErrorParam = Beta::BetaToolSearchToolResultErrorParam
|
|
4
|
+
|
|
5
|
+
module Beta
|
|
6
|
+
type beta_tool_search_tool_result_error_param =
|
|
7
|
+
{
|
|
8
|
+
error_code: Anthropic::Models::Beta::BetaToolSearchToolResultErrorParam::error_code,
|
|
9
|
+
type: :tool_search_tool_result_error
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
class BetaToolSearchToolResultErrorParam < Anthropic::Internal::Type::BaseModel
|
|
13
|
+
attr_accessor error_code: Anthropic::Models::Beta::BetaToolSearchToolResultErrorParam::error_code
|
|
14
|
+
|
|
15
|
+
attr_accessor type: :tool_search_tool_result_error
|
|
16
|
+
|
|
17
|
+
def initialize: (
|
|
18
|
+
error_code: Anthropic::Models::Beta::BetaToolSearchToolResultErrorParam::error_code,
|
|
19
|
+
?type: :tool_search_tool_result_error
|
|
20
|
+
) -> void
|
|
21
|
+
|
|
22
|
+
def to_hash: -> {
|
|
23
|
+
error_code: Anthropic::Models::Beta::BetaToolSearchToolResultErrorParam::error_code,
|
|
24
|
+
type: :tool_search_tool_result_error
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
type error_code =
|
|
28
|
+
:invalid_tool_input
|
|
29
|
+
| :unavailable
|
|
30
|
+
| :too_many_requests
|
|
31
|
+
| :execution_time_exceeded
|
|
32
|
+
|
|
33
|
+
module ErrorCode
|
|
34
|
+
extend Anthropic::Internal::Type::Enum
|
|
35
|
+
|
|
36
|
+
INVALID_TOOL_INPUT: :invalid_tool_input
|
|
37
|
+
UNAVAILABLE: :unavailable
|
|
38
|
+
TOO_MANY_REQUESTS: :too_many_requests
|
|
39
|
+
EXECUTION_TIME_EXCEEDED: :execution_time_exceeded
|
|
40
|
+
|
|
41
|
+
def self?.values: -> ::Array[Anthropic::Models::Beta::BetaToolSearchToolResultErrorParam::error_code]
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|