anthropic 1.31.0 → 1.32.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 +1 -1
- data/lib/anthropic/internal/util.rb +4 -2
- data/lib/anthropic/models/anthropic_beta.rb +3 -0
- data/lib/anthropic/models/beta/beta_advisor_message_iteration_usage.rb +75 -0
- data/lib/anthropic/models/beta/beta_advisor_redacted_result_block.rb +31 -0
- data/lib/anthropic/models/beta/beta_advisor_redacted_result_block_param.rb +27 -0
- data/lib/anthropic/models/beta/beta_advisor_result_block.rb +25 -0
- data/lib/anthropic/models/beta/beta_advisor_result_block_param.rb +25 -0
- data/lib/anthropic/models/beta/beta_advisor_tool_20260301.rb +110 -0
- data/lib/anthropic/models/beta/beta_advisor_tool_result_block.rb +45 -0
- data/lib/anthropic/models/beta/beta_advisor_tool_result_block_param.rb +55 -0
- data/lib/anthropic/models/beta/beta_advisor_tool_result_error.rb +40 -0
- data/lib/anthropic/models/beta/beta_advisor_tool_result_error_param.rb +40 -0
- 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_iterations_usage.rb +4 -1
- data/lib/anthropic/models/beta/beta_message.rb +2 -2
- data/lib/anthropic/models/beta/beta_message_delta_usage.rb +2 -2
- data/lib/anthropic/models/beta/beta_message_param.rb +3 -3
- data/lib/anthropic/models/beta/beta_raw_content_block_start_event.rb +5 -3
- data/lib/anthropic/models/beta/beta_server_tool_use_block.rb +1 -0
- data/lib/anthropic/models/beta/beta_server_tool_use_block_param.rb +1 -0
- data/lib/anthropic/models/beta/beta_tool_union.rb +3 -1
- data/lib/anthropic/models/beta/beta_usage.rb +2 -2
- data/lib/anthropic/models/beta/message_count_tokens_params.rb +5 -3
- data/lib/anthropic/models/beta/message_create_params.rb +2 -2
- data/lib/anthropic/models/beta/messages/batch_create_params.rb +2 -2
- data/lib/anthropic/resources/beta/messages.rb +3 -3
- data/lib/anthropic/version.rb +1 -1
- data/lib/anthropic.rb +10 -0
- data/rbi/anthropic/models/anthropic_beta.rbi +5 -0
- data/rbi/anthropic/models/beta/beta_advisor_message_iteration_usage.rbi +106 -0
- data/rbi/anthropic/models/beta/beta_advisor_redacted_result_block.rbi +44 -0
- data/rbi/anthropic/models/beta/beta_advisor_redacted_result_block_param.rbi +43 -0
- data/rbi/anthropic/models/beta/beta_advisor_result_block.rbi +33 -0
- data/rbi/anthropic/models/beta/beta_advisor_result_block_param.rbi +33 -0
- data/rbi/anthropic/models/beta/beta_advisor_tool_20260301.rbi +212 -0
- data/rbi/anthropic/models/beta/beta_advisor_tool_result_block.rbi +83 -0
- data/rbi/anthropic/models/beta/beta_advisor_tool_result_block_param.rbi +113 -0
- data/rbi/anthropic/models/beta/beta_advisor_tool_result_error.rbi +105 -0
- data/rbi/anthropic/models/beta/beta_advisor_tool_result_error_param.rbi +105 -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_iterations_usage.rbi +2 -1
- data/rbi/anthropic/models/beta/beta_message.rbi +1 -0
- data/rbi/anthropic/models/beta/beta_message_delta_usage.rbi +2 -1
- data/rbi/anthropic/models/beta/beta_raw_content_block_start_event.rbi +2 -0
- data/rbi/anthropic/models/beta/beta_server_tool_use_block.rbi +5 -0
- data/rbi/anthropic/models/beta/beta_server_tool_use_block_param.rbi +5 -0
- data/rbi/anthropic/models/beta/beta_tool_union.rbi +1 -0
- data/rbi/anthropic/models/beta/beta_usage.rbi +2 -1
- data/rbi/anthropic/models/beta/message_count_tokens_params.rbi +5 -0
- data/rbi/anthropic/models/beta/message_create_params.rbi +4 -0
- data/rbi/anthropic/models/beta/messages/batch_create_params.rbi +4 -0
- data/rbi/anthropic/resources/beta/messages.rbi +3 -0
- data/sig/anthropic/models/anthropic_beta.rbs +2 -0
- data/sig/anthropic/models/beta/beta_advisor_message_iteration_usage.rbs +54 -0
- data/sig/anthropic/models/beta/beta_advisor_redacted_result_block.rbs +26 -0
- data/sig/anthropic/models/beta/beta_advisor_redacted_result_block_param.rbs +26 -0
- data/sig/anthropic/models/beta/beta_advisor_result_block.rbs +19 -0
- data/sig/anthropic/models/beta/beta_advisor_result_block_param.rbs +20 -0
- data/sig/anthropic/models/beta/beta_advisor_tool_20260301.rbs +85 -0
- data/sig/anthropic/models/beta/beta_advisor_tool_result_block.rbs +45 -0
- data/sig/anthropic/models/beta/beta_advisor_tool_result_block_param.rbs +50 -0
- data/sig/anthropic/models/beta/beta_advisor_tool_result_error.rbs +50 -0
- data/sig/anthropic/models/beta/beta_advisor_tool_result_error_param.rbs +50 -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_iterations_usage.rbs +1 -0
- data/sig/anthropic/models/beta/beta_raw_content_block_start_event.rbs +1 -0
- data/sig/anthropic/models/beta/beta_server_tool_use_block.rbs +3 -1
- data/sig/anthropic/models/beta/beta_server_tool_use_block_param.rbs +3 -1
- data/sig/anthropic/models/beta/beta_tool_union.rbs +1 -0
- data/sig/anthropic/models/beta/message_count_tokens_params.rbs +1 -0
- metadata +32 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 24a5e45b8579e233ee186011831566c349be3768a35d4b5b39b21c487f5a8aa5
|
|
4
|
+
data.tar.gz: 007562bc90ac6caaa68e45aa709554dcd5ffb34e3c0faaf1060157b9d7a4a5d7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 523e97c5139f4d50b37281a569ee5af526224334ba86dbd1e20f126158f45b2e7134fb00e2d02a49a4dc9a02ab0dccfbbe0f48b20fc8a810683e27fa848acd48
|
|
7
|
+
data.tar.gz: dfbc971b498353f828f6a8da3539054a94183a7cd8092b3ff31e90e1874c3b81d67ef1c7ccf9d93e021a0087dc1f1301fd4e01ae402d93538fb6d7b1bd5c0926
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.32.0 (2026-04-09)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v1.31.0...v1.32.0](https://github.com/anthropics/anthropic-sdk-ruby/compare/v1.31.0...v1.32.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** Add beta advisor tool ([f749344](https://github.com/anthropics/anthropic-sdk-ruby/commit/f749344e0f74c02b3e58d6fcd403313615bc98a3))
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
* multipart encoding for file arrays ([e6aae8b](https://github.com/anthropics/anthropic-sdk-ruby/commit/e6aae8b5e223e0dd2f72590c0c654a4fa629dcb1))
|
|
15
|
+
|
|
3
16
|
## 1.31.0 (2026-04-08)
|
|
4
17
|
|
|
5
18
|
Full Changelog: [v1.30.0...v1.31.0](https://github.com/anthropics/anthropic-sdk-ruby/compare/v1.30.0...v1.31.0)
|
data/README.md
CHANGED
|
@@ -610,6 +610,7 @@ module Anthropic
|
|
|
610
610
|
#
|
|
611
611
|
# @return [Array(String, Enumerable<String>)]
|
|
612
612
|
private def encode_multipart_streaming(body)
|
|
613
|
+
# rubocop:disable Style/CaseEquality
|
|
613
614
|
# RFC 1521 Section 7.2.1 says we should have 70 char maximum for boundary length
|
|
614
615
|
boundary = SecureRandom.urlsafe_base64(30)
|
|
615
616
|
|
|
@@ -619,9 +620,9 @@ module Anthropic
|
|
|
619
620
|
in Hash
|
|
620
621
|
body.each do |key, val|
|
|
621
622
|
case val
|
|
622
|
-
in Array if val.all? { primitive?(_1) }
|
|
623
|
+
in Array if val.all? { primitive?(_1) || Anthropic::Internal::Type::FileInput === _1 }
|
|
623
624
|
val.each do |v|
|
|
624
|
-
write_multipart_chunk(y, boundary: boundary, key:
|
|
625
|
+
write_multipart_chunk(y, boundary: boundary, key: "#{key}[]", val: v, closing: closing)
|
|
625
626
|
end
|
|
626
627
|
else
|
|
627
628
|
write_multipart_chunk(y, boundary: boundary, key: key, val: val, closing: closing)
|
|
@@ -635,6 +636,7 @@ module Anthropic
|
|
|
635
636
|
|
|
636
637
|
fused_io = fused_enum(strio) { closing.each(&:call) }
|
|
637
638
|
[boundary, fused_io]
|
|
639
|
+
# rubocop:enable Style/CaseEquality
|
|
638
640
|
end
|
|
639
641
|
|
|
640
642
|
# @api private
|
|
@@ -49,6 +49,8 @@ module Anthropic
|
|
|
49
49
|
|
|
50
50
|
variant const: -> { Anthropic::Models::AnthropicBeta::OUTPUT_300K_2026_03_24 }
|
|
51
51
|
|
|
52
|
+
variant const: -> { Anthropic::Models::AnthropicBeta::ADVISOR_TOOL_2026_03_01 }
|
|
53
|
+
|
|
52
54
|
# @!method self.variants
|
|
53
55
|
# @return [Array(String, Symbol)]
|
|
54
56
|
|
|
@@ -79,6 +81,7 @@ module Anthropic
|
|
|
79
81
|
SKILLS_2025_10_02 = :"skills-2025-10-02"
|
|
80
82
|
FAST_MODE_2026_02_01 = :"fast-mode-2026-02-01"
|
|
81
83
|
OUTPUT_300K_2026_03_24 = :"output-300k-2026-03-24"
|
|
84
|
+
ADVISOR_TOOL_2026_03_01 = :"advisor-tool-2026-03-01"
|
|
82
85
|
|
|
83
86
|
# @!endgroup
|
|
84
87
|
end
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Anthropic
|
|
4
|
+
module Models
|
|
5
|
+
module Beta
|
|
6
|
+
class BetaAdvisorMessageIterationUsage < Anthropic::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute cache_creation
|
|
8
|
+
# Breakdown of cached tokens by TTL
|
|
9
|
+
#
|
|
10
|
+
# @return [Anthropic::Models::Beta::BetaCacheCreation, nil]
|
|
11
|
+
required :cache_creation, -> { Anthropic::Beta::BetaCacheCreation }, nil?: true
|
|
12
|
+
|
|
13
|
+
# @!attribute cache_creation_input_tokens
|
|
14
|
+
# The number of input tokens used to create the cache entry.
|
|
15
|
+
#
|
|
16
|
+
# @return [Integer]
|
|
17
|
+
required :cache_creation_input_tokens, Integer
|
|
18
|
+
|
|
19
|
+
# @!attribute cache_read_input_tokens
|
|
20
|
+
# The number of input tokens read from the cache.
|
|
21
|
+
#
|
|
22
|
+
# @return [Integer]
|
|
23
|
+
required :cache_read_input_tokens, Integer
|
|
24
|
+
|
|
25
|
+
# @!attribute input_tokens
|
|
26
|
+
# The number of input tokens which were used.
|
|
27
|
+
#
|
|
28
|
+
# @return [Integer]
|
|
29
|
+
required :input_tokens, Integer
|
|
30
|
+
|
|
31
|
+
# @!attribute model
|
|
32
|
+
# The model that will complete your prompt.\n\nSee
|
|
33
|
+
# [models](https://docs.anthropic.com/en/docs/models-overview) for additional
|
|
34
|
+
# details and options.
|
|
35
|
+
#
|
|
36
|
+
# @return [Symbol, String, Anthropic::Models::Model]
|
|
37
|
+
required :model, union: -> { Anthropic::Model }
|
|
38
|
+
|
|
39
|
+
# @!attribute output_tokens
|
|
40
|
+
# The number of output tokens which were used.
|
|
41
|
+
#
|
|
42
|
+
# @return [Integer]
|
|
43
|
+
required :output_tokens, Integer
|
|
44
|
+
|
|
45
|
+
# @!attribute type
|
|
46
|
+
# Usage for an advisor sub-inference iteration
|
|
47
|
+
#
|
|
48
|
+
# @return [Symbol, :advisor_message]
|
|
49
|
+
required :type, const: :advisor_message
|
|
50
|
+
|
|
51
|
+
# @!method initialize(cache_creation:, cache_creation_input_tokens:, cache_read_input_tokens:, input_tokens:, model:, output_tokens:, type: :advisor_message)
|
|
52
|
+
# Some parameter documentations has been truncated, see
|
|
53
|
+
# {Anthropic::Models::Beta::BetaAdvisorMessageIterationUsage} for more details.
|
|
54
|
+
#
|
|
55
|
+
# Token usage for an advisor sub-inference iteration.
|
|
56
|
+
#
|
|
57
|
+
# @param cache_creation [Anthropic::Models::Beta::BetaCacheCreation, nil] Breakdown of cached tokens by TTL
|
|
58
|
+
#
|
|
59
|
+
# @param cache_creation_input_tokens [Integer] The number of input tokens used to create the cache entry.
|
|
60
|
+
#
|
|
61
|
+
# @param cache_read_input_tokens [Integer] The number of input tokens read from the cache.
|
|
62
|
+
#
|
|
63
|
+
# @param input_tokens [Integer] The number of input tokens which were used.
|
|
64
|
+
#
|
|
65
|
+
# @param model [Symbol, String, Anthropic::Models::Model] The model that will complete your prompt.\n\nSee [models](https://docs.anthropic
|
|
66
|
+
#
|
|
67
|
+
# @param output_tokens [Integer] The number of output tokens which were used.
|
|
68
|
+
#
|
|
69
|
+
# @param type [Symbol, :advisor_message] Usage for an advisor sub-inference iteration
|
|
70
|
+
end
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
BetaAdvisorMessageIterationUsage = Beta::BetaAdvisorMessageIterationUsage
|
|
74
|
+
end
|
|
75
|
+
end
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Anthropic
|
|
4
|
+
module Models
|
|
5
|
+
module Beta
|
|
6
|
+
class BetaAdvisorRedactedResultBlock < Anthropic::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute encrypted_content
|
|
8
|
+
# Opaque blob containing the advisor's output. Round-trip verbatim; do not inspect
|
|
9
|
+
# or modify.
|
|
10
|
+
#
|
|
11
|
+
# @return [String]
|
|
12
|
+
required :encrypted_content, String
|
|
13
|
+
|
|
14
|
+
# @!attribute type
|
|
15
|
+
#
|
|
16
|
+
# @return [Symbol, :advisor_redacted_result]
|
|
17
|
+
required :type, const: :advisor_redacted_result
|
|
18
|
+
|
|
19
|
+
# @!method initialize(encrypted_content:, type: :advisor_redacted_result)
|
|
20
|
+
# Some parameter documentations has been truncated, see
|
|
21
|
+
# {Anthropic::Models::Beta::BetaAdvisorRedactedResultBlock} for more details.
|
|
22
|
+
#
|
|
23
|
+
# @param encrypted_content [String] Opaque blob containing the advisor's output. Round-trip verbatim; do not inspect
|
|
24
|
+
#
|
|
25
|
+
# @param type [Symbol, :advisor_redacted_result]
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
BetaAdvisorRedactedResultBlock = Beta::BetaAdvisorRedactedResultBlock
|
|
30
|
+
end
|
|
31
|
+
end
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Anthropic
|
|
4
|
+
module Models
|
|
5
|
+
module Beta
|
|
6
|
+
class BetaAdvisorRedactedResultBlockParam < Anthropic::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute encrypted_content
|
|
8
|
+
# Opaque blob produced by a prior response; must be round-tripped verbatim.
|
|
9
|
+
#
|
|
10
|
+
# @return [String]
|
|
11
|
+
required :encrypted_content, String
|
|
12
|
+
|
|
13
|
+
# @!attribute type
|
|
14
|
+
#
|
|
15
|
+
# @return [Symbol, :advisor_redacted_result]
|
|
16
|
+
required :type, const: :advisor_redacted_result
|
|
17
|
+
|
|
18
|
+
# @!method initialize(encrypted_content:, type: :advisor_redacted_result)
|
|
19
|
+
# @param encrypted_content [String] Opaque blob produced by a prior response; must be round-tripped verbatim.
|
|
20
|
+
#
|
|
21
|
+
# @param type [Symbol, :advisor_redacted_result]
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
BetaAdvisorRedactedResultBlockParam = Beta::BetaAdvisorRedactedResultBlockParam
|
|
26
|
+
end
|
|
27
|
+
end
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Anthropic
|
|
4
|
+
module Models
|
|
5
|
+
module Beta
|
|
6
|
+
class BetaAdvisorResultBlock < Anthropic::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute text
|
|
8
|
+
#
|
|
9
|
+
# @return [String]
|
|
10
|
+
required :text, String
|
|
11
|
+
|
|
12
|
+
# @!attribute type
|
|
13
|
+
#
|
|
14
|
+
# @return [Symbol, :advisor_result]
|
|
15
|
+
required :type, const: :advisor_result
|
|
16
|
+
|
|
17
|
+
# @!method initialize(text:, type: :advisor_result)
|
|
18
|
+
# @param text [String]
|
|
19
|
+
# @param type [Symbol, :advisor_result]
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
BetaAdvisorResultBlock = Beta::BetaAdvisorResultBlock
|
|
24
|
+
end
|
|
25
|
+
end
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Anthropic
|
|
4
|
+
module Models
|
|
5
|
+
module Beta
|
|
6
|
+
class BetaAdvisorResultBlockParam < Anthropic::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute text
|
|
8
|
+
#
|
|
9
|
+
# @return [String]
|
|
10
|
+
required :text, String
|
|
11
|
+
|
|
12
|
+
# @!attribute type
|
|
13
|
+
#
|
|
14
|
+
# @return [Symbol, :advisor_result]
|
|
15
|
+
required :type, const: :advisor_result
|
|
16
|
+
|
|
17
|
+
# @!method initialize(text:, type: :advisor_result)
|
|
18
|
+
# @param text [String]
|
|
19
|
+
# @param type [Symbol, :advisor_result]
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
BetaAdvisorResultBlockParam = Beta::BetaAdvisorResultBlockParam
|
|
24
|
+
end
|
|
25
|
+
end
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Anthropic
|
|
4
|
+
module Models
|
|
5
|
+
module Beta
|
|
6
|
+
class BetaAdvisorTool20260301 < Anthropic::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute model
|
|
8
|
+
# The model that will complete your prompt.\n\nSee
|
|
9
|
+
# [models](https://docs.anthropic.com/en/docs/models-overview) for additional
|
|
10
|
+
# details and options.
|
|
11
|
+
#
|
|
12
|
+
# @return [Symbol, String, Anthropic::Models::Model]
|
|
13
|
+
required :model, union: -> { Anthropic::Model }
|
|
14
|
+
|
|
15
|
+
# @!attribute name
|
|
16
|
+
# Name of the tool.
|
|
17
|
+
#
|
|
18
|
+
# This is how the tool will be called by the model and in `tool_use` blocks.
|
|
19
|
+
#
|
|
20
|
+
# @return [Symbol, :advisor]
|
|
21
|
+
required :name, const: :advisor
|
|
22
|
+
|
|
23
|
+
# @!attribute type
|
|
24
|
+
#
|
|
25
|
+
# @return [Symbol, :advisor_20260301]
|
|
26
|
+
required :type, const: :advisor_20260301
|
|
27
|
+
|
|
28
|
+
# @!attribute allowed_callers
|
|
29
|
+
#
|
|
30
|
+
# @return [Array<Symbol, Anthropic::Models::Beta::BetaAdvisorTool20260301::AllowedCaller>, nil]
|
|
31
|
+
optional :allowed_callers,
|
|
32
|
+
-> { Anthropic::Internal::Type::ArrayOf[enum: Anthropic::Beta::BetaAdvisorTool20260301::AllowedCaller] }
|
|
33
|
+
|
|
34
|
+
# @!attribute cache_control
|
|
35
|
+
# Create a cache control breakpoint at this content block.
|
|
36
|
+
#
|
|
37
|
+
# @return [Anthropic::Models::Beta::BetaCacheControlEphemeral, nil]
|
|
38
|
+
optional :cache_control, -> { Anthropic::Beta::BetaCacheControlEphemeral }, nil?: true
|
|
39
|
+
|
|
40
|
+
# @!attribute caching
|
|
41
|
+
# Caching for the advisor's own prompt. When set, each advisor call writes a cache
|
|
42
|
+
# entry at the given TTL so subsequent calls in the same conversation read the
|
|
43
|
+
# stable prefix. When omitted, the advisor prompt is not cached.
|
|
44
|
+
#
|
|
45
|
+
# @return [Anthropic::Models::Beta::BetaCacheControlEphemeral, nil]
|
|
46
|
+
optional :caching, -> { Anthropic::Beta::BetaCacheControlEphemeral }, nil?: true
|
|
47
|
+
|
|
48
|
+
# @!attribute defer_loading
|
|
49
|
+
# If true, tool will not be included in initial system prompt. Only loaded when
|
|
50
|
+
# returned via tool_reference from tool search.
|
|
51
|
+
#
|
|
52
|
+
# @return [Boolean, nil]
|
|
53
|
+
optional :defer_loading, Anthropic::Internal::Type::Boolean
|
|
54
|
+
|
|
55
|
+
# @!attribute max_uses
|
|
56
|
+
# Maximum number of times the tool can be used in the API request.
|
|
57
|
+
#
|
|
58
|
+
# @return [Integer, nil]
|
|
59
|
+
optional :max_uses, Integer, nil?: true
|
|
60
|
+
|
|
61
|
+
# @!attribute strict
|
|
62
|
+
# When true, guarantees schema validation on tool names and inputs
|
|
63
|
+
#
|
|
64
|
+
# @return [Boolean, nil]
|
|
65
|
+
optional :strict, Anthropic::Internal::Type::Boolean
|
|
66
|
+
|
|
67
|
+
# @!method initialize(model:, allowed_callers: nil, cache_control: nil, caching: nil, defer_loading: nil, max_uses: nil, strict: nil, name: :advisor, type: :advisor_20260301)
|
|
68
|
+
# Some parameter documentations has been truncated, see
|
|
69
|
+
# {Anthropic::Models::Beta::BetaAdvisorTool20260301} for more details.
|
|
70
|
+
#
|
|
71
|
+
# @param model [Symbol, String, Anthropic::Models::Model] The model that will complete your prompt.\n\nSee [models](https://docs.anthropic
|
|
72
|
+
#
|
|
73
|
+
# @param allowed_callers [Array<Symbol, Anthropic::Models::Beta::BetaAdvisorTool20260301::AllowedCaller>]
|
|
74
|
+
#
|
|
75
|
+
# @param cache_control [Anthropic::Models::Beta::BetaCacheControlEphemeral, nil] Create a cache control breakpoint at this content block.
|
|
76
|
+
#
|
|
77
|
+
# @param caching [Anthropic::Models::Beta::BetaCacheControlEphemeral, nil] Caching for the advisor's own prompt. When set, each advisor call writes a cache
|
|
78
|
+
#
|
|
79
|
+
# @param defer_loading [Boolean] If true, tool will not be included in initial system prompt. Only loaded when re
|
|
80
|
+
#
|
|
81
|
+
# @param max_uses [Integer, nil] Maximum number of times the tool can be used in the API request.
|
|
82
|
+
#
|
|
83
|
+
# @param strict [Boolean] When true, guarantees schema validation on tool names and inputs
|
|
84
|
+
#
|
|
85
|
+
# @param name [Symbol, :advisor] Name of the tool.
|
|
86
|
+
#
|
|
87
|
+
# @param type [Symbol, :advisor_20260301]
|
|
88
|
+
|
|
89
|
+
# Specifies who can invoke a tool.
|
|
90
|
+
#
|
|
91
|
+
# Values: direct: The model can call this tool directly. code_execution_20250825:
|
|
92
|
+
# The tool can be called from the code execution environment (v1).
|
|
93
|
+
# code_execution_20260120: The tool can be called from the code execution
|
|
94
|
+
# environment (v2 with persistence).
|
|
95
|
+
module AllowedCaller
|
|
96
|
+
extend Anthropic::Internal::Type::Enum
|
|
97
|
+
|
|
98
|
+
DIRECT = :direct
|
|
99
|
+
CODE_EXECUTION_20250825 = :code_execution_20250825
|
|
100
|
+
CODE_EXECUTION_20260120 = :code_execution_20260120
|
|
101
|
+
|
|
102
|
+
# @!method self.values
|
|
103
|
+
# @return [Array<Symbol>]
|
|
104
|
+
end
|
|
105
|
+
end
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
BetaAdvisorTool20260301 = Beta::BetaAdvisorTool20260301
|
|
109
|
+
end
|
|
110
|
+
end
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Anthropic
|
|
4
|
+
module Models
|
|
5
|
+
module Beta
|
|
6
|
+
class BetaAdvisorToolResultBlock < Anthropic::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute content
|
|
8
|
+
#
|
|
9
|
+
# @return [Anthropic::Models::Beta::BetaAdvisorToolResultError, Anthropic::Models::Beta::BetaAdvisorResultBlock, Anthropic::Models::Beta::BetaAdvisorRedactedResultBlock]
|
|
10
|
+
required :content, union: -> { Anthropic::Beta::BetaAdvisorToolResultBlock::Content }
|
|
11
|
+
|
|
12
|
+
# @!attribute tool_use_id
|
|
13
|
+
#
|
|
14
|
+
# @return [String]
|
|
15
|
+
required :tool_use_id, String
|
|
16
|
+
|
|
17
|
+
# @!attribute type
|
|
18
|
+
#
|
|
19
|
+
# @return [Symbol, :advisor_tool_result]
|
|
20
|
+
required :type, const: :advisor_tool_result
|
|
21
|
+
|
|
22
|
+
# @!method initialize(content:, tool_use_id:, type: :advisor_tool_result)
|
|
23
|
+
# @param content [Anthropic::Models::Beta::BetaAdvisorToolResultError, Anthropic::Models::Beta::BetaAdvisorResultBlock, Anthropic::Models::Beta::BetaAdvisorRedactedResultBlock]
|
|
24
|
+
# @param tool_use_id [String]
|
|
25
|
+
# @param type [Symbol, :advisor_tool_result]
|
|
26
|
+
|
|
27
|
+
# @see Anthropic::Models::Beta::BetaAdvisorToolResultBlock#content
|
|
28
|
+
module Content
|
|
29
|
+
extend Anthropic::Internal::Type::Union
|
|
30
|
+
|
|
31
|
+
variant -> { Anthropic::Beta::BetaAdvisorToolResultError }
|
|
32
|
+
|
|
33
|
+
variant -> { Anthropic::Beta::BetaAdvisorResultBlock }
|
|
34
|
+
|
|
35
|
+
variant -> { Anthropic::Beta::BetaAdvisorRedactedResultBlock }
|
|
36
|
+
|
|
37
|
+
# @!method self.variants
|
|
38
|
+
# @return [Array(Anthropic::Models::Beta::BetaAdvisorToolResultError, Anthropic::Models::Beta::BetaAdvisorResultBlock, Anthropic::Models::Beta::BetaAdvisorRedactedResultBlock)]
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
BetaAdvisorToolResultBlock = Beta::BetaAdvisorToolResultBlock
|
|
44
|
+
end
|
|
45
|
+
end
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Anthropic
|
|
4
|
+
module Models
|
|
5
|
+
module Beta
|
|
6
|
+
class BetaAdvisorToolResultBlockParam < Anthropic::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute content
|
|
8
|
+
#
|
|
9
|
+
# @return [Anthropic::Models::Beta::BetaAdvisorToolResultErrorParam, Anthropic::Models::Beta::BetaAdvisorResultBlockParam, Anthropic::Models::Beta::BetaAdvisorRedactedResultBlockParam]
|
|
10
|
+
required :content, union: -> { Anthropic::Beta::BetaAdvisorToolResultBlockParam::Content }
|
|
11
|
+
|
|
12
|
+
# @!attribute tool_use_id
|
|
13
|
+
#
|
|
14
|
+
# @return [String]
|
|
15
|
+
required :tool_use_id, String
|
|
16
|
+
|
|
17
|
+
# @!attribute type
|
|
18
|
+
#
|
|
19
|
+
# @return [Symbol, :advisor_tool_result]
|
|
20
|
+
required :type, const: :advisor_tool_result
|
|
21
|
+
|
|
22
|
+
# @!attribute cache_control
|
|
23
|
+
# Create a cache control breakpoint at this content block.
|
|
24
|
+
#
|
|
25
|
+
# @return [Anthropic::Models::Beta::BetaCacheControlEphemeral, nil]
|
|
26
|
+
optional :cache_control, -> { Anthropic::Beta::BetaCacheControlEphemeral }, nil?: true
|
|
27
|
+
|
|
28
|
+
# @!method initialize(content:, tool_use_id:, cache_control: nil, type: :advisor_tool_result)
|
|
29
|
+
# @param content [Anthropic::Models::Beta::BetaAdvisorToolResultErrorParam, Anthropic::Models::Beta::BetaAdvisorResultBlockParam, Anthropic::Models::Beta::BetaAdvisorRedactedResultBlockParam]
|
|
30
|
+
#
|
|
31
|
+
# @param tool_use_id [String]
|
|
32
|
+
#
|
|
33
|
+
# @param cache_control [Anthropic::Models::Beta::BetaCacheControlEphemeral, nil] Create a cache control breakpoint at this content block.
|
|
34
|
+
#
|
|
35
|
+
# @param type [Symbol, :advisor_tool_result]
|
|
36
|
+
|
|
37
|
+
# @see Anthropic::Models::Beta::BetaAdvisorToolResultBlockParam#content
|
|
38
|
+
module Content
|
|
39
|
+
extend Anthropic::Internal::Type::Union
|
|
40
|
+
|
|
41
|
+
variant -> { Anthropic::Beta::BetaAdvisorToolResultErrorParam }
|
|
42
|
+
|
|
43
|
+
variant -> { Anthropic::Beta::BetaAdvisorResultBlockParam }
|
|
44
|
+
|
|
45
|
+
variant -> { Anthropic::Beta::BetaAdvisorRedactedResultBlockParam }
|
|
46
|
+
|
|
47
|
+
# @!method self.variants
|
|
48
|
+
# @return [Array(Anthropic::Models::Beta::BetaAdvisorToolResultErrorParam, Anthropic::Models::Beta::BetaAdvisorResultBlockParam, Anthropic::Models::Beta::BetaAdvisorRedactedResultBlockParam)]
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
BetaAdvisorToolResultBlockParam = Beta::BetaAdvisorToolResultBlockParam
|
|
54
|
+
end
|
|
55
|
+
end
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Anthropic
|
|
4
|
+
module Models
|
|
5
|
+
module Beta
|
|
6
|
+
class BetaAdvisorToolResultError < Anthropic::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute error_code
|
|
8
|
+
#
|
|
9
|
+
# @return [Symbol, Anthropic::Models::Beta::BetaAdvisorToolResultError::ErrorCode]
|
|
10
|
+
required :error_code, enum: -> { Anthropic::Beta::BetaAdvisorToolResultError::ErrorCode }
|
|
11
|
+
|
|
12
|
+
# @!attribute type
|
|
13
|
+
#
|
|
14
|
+
# @return [Symbol, :advisor_tool_result_error]
|
|
15
|
+
required :type, const: :advisor_tool_result_error
|
|
16
|
+
|
|
17
|
+
# @!method initialize(error_code:, type: :advisor_tool_result_error)
|
|
18
|
+
# @param error_code [Symbol, Anthropic::Models::Beta::BetaAdvisorToolResultError::ErrorCode]
|
|
19
|
+
# @param type [Symbol, :advisor_tool_result_error]
|
|
20
|
+
|
|
21
|
+
# @see Anthropic::Models::Beta::BetaAdvisorToolResultError#error_code
|
|
22
|
+
module ErrorCode
|
|
23
|
+
extend Anthropic::Internal::Type::Enum
|
|
24
|
+
|
|
25
|
+
MAX_USES_EXCEEDED = :max_uses_exceeded
|
|
26
|
+
PROMPT_TOO_LONG = :prompt_too_long
|
|
27
|
+
TOO_MANY_REQUESTS = :too_many_requests
|
|
28
|
+
OVERLOADED = :overloaded
|
|
29
|
+
UNAVAILABLE = :unavailable
|
|
30
|
+
EXECUTION_TIME_EXCEEDED = :execution_time_exceeded
|
|
31
|
+
|
|
32
|
+
# @!method self.values
|
|
33
|
+
# @return [Array<Symbol>]
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
BetaAdvisorToolResultError = Beta::BetaAdvisorToolResultError
|
|
39
|
+
end
|
|
40
|
+
end
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Anthropic
|
|
4
|
+
module Models
|
|
5
|
+
module Beta
|
|
6
|
+
class BetaAdvisorToolResultErrorParam < Anthropic::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute error_code
|
|
8
|
+
#
|
|
9
|
+
# @return [Symbol, Anthropic::Models::Beta::BetaAdvisorToolResultErrorParam::ErrorCode]
|
|
10
|
+
required :error_code, enum: -> { Anthropic::Beta::BetaAdvisorToolResultErrorParam::ErrorCode }
|
|
11
|
+
|
|
12
|
+
# @!attribute type
|
|
13
|
+
#
|
|
14
|
+
# @return [Symbol, :advisor_tool_result_error]
|
|
15
|
+
required :type, const: :advisor_tool_result_error
|
|
16
|
+
|
|
17
|
+
# @!method initialize(error_code:, type: :advisor_tool_result_error)
|
|
18
|
+
# @param error_code [Symbol, Anthropic::Models::Beta::BetaAdvisorToolResultErrorParam::ErrorCode]
|
|
19
|
+
# @param type [Symbol, :advisor_tool_result_error]
|
|
20
|
+
|
|
21
|
+
# @see Anthropic::Models::Beta::BetaAdvisorToolResultErrorParam#error_code
|
|
22
|
+
module ErrorCode
|
|
23
|
+
extend Anthropic::Internal::Type::Enum
|
|
24
|
+
|
|
25
|
+
MAX_USES_EXCEEDED = :max_uses_exceeded
|
|
26
|
+
PROMPT_TOO_LONG = :prompt_too_long
|
|
27
|
+
TOO_MANY_REQUESTS = :too_many_requests
|
|
28
|
+
OVERLOADED = :overloaded
|
|
29
|
+
UNAVAILABLE = :unavailable
|
|
30
|
+
EXECUTION_TIME_EXCEEDED = :execution_time_exceeded
|
|
31
|
+
|
|
32
|
+
# @!method self.values
|
|
33
|
+
# @return [Array<Symbol>]
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
BetaAdvisorToolResultErrorParam = Beta::BetaAdvisorToolResultErrorParam
|
|
39
|
+
end
|
|
40
|
+
end
|
|
@@ -23,6 +23,8 @@ module Anthropic
|
|
|
23
23
|
|
|
24
24
|
variant :web_fetch_tool_result, -> { Anthropic::Beta::BetaWebFetchToolResultBlock }
|
|
25
25
|
|
|
26
|
+
variant :advisor_tool_result, -> { Anthropic::Beta::BetaAdvisorToolResultBlock }
|
|
27
|
+
|
|
26
28
|
variant :code_execution_tool_result, -> { Anthropic::Beta::BetaCodeExecutionToolResultBlock }
|
|
27
29
|
|
|
28
30
|
variant :bash_code_execution_tool_result, -> { Anthropic::Beta::BetaBashCodeExecutionToolResultBlock }
|
|
@@ -47,7 +49,7 @@ module Anthropic
|
|
|
47
49
|
variant :compaction, -> { Anthropic::Beta::BetaCompactionBlock }
|
|
48
50
|
|
|
49
51
|
# @!method self.variants
|
|
50
|
-
# @return [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::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)]
|
|
52
|
+
# @return [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)]
|
|
51
53
|
end
|
|
52
54
|
end
|
|
53
55
|
|
|
@@ -39,6 +39,8 @@ module Anthropic
|
|
|
39
39
|
|
|
40
40
|
variant :web_fetch_tool_result, -> { Anthropic::Beta::BetaWebFetchToolResultBlockParam }
|
|
41
41
|
|
|
42
|
+
variant :advisor_tool_result, -> { Anthropic::Beta::BetaAdvisorToolResultBlockParam }
|
|
43
|
+
|
|
42
44
|
variant :code_execution_tool_result, -> { Anthropic::Beta::BetaCodeExecutionToolResultBlockParam }
|
|
43
45
|
|
|
44
46
|
variant :bash_code_execution_tool_result,
|
|
@@ -67,7 +69,7 @@ module Anthropic
|
|
|
67
69
|
variant :compaction, -> { Anthropic::Beta::BetaCompactionBlockParam }
|
|
68
70
|
|
|
69
71
|
# @!method self.variants
|
|
70
|
-
# @return [Array(Anthropic::Models::Beta::BetaTextBlockParam, Anthropic::Models::Beta::BetaImageBlockParam, Anthropic::Models::Beta::BetaRequestDocumentBlock, Anthropic::Models::Beta::BetaSearchResultBlockParam, Anthropic::Models::Beta::BetaThinkingBlockParam, Anthropic::Models::Beta::BetaRedactedThinkingBlockParam, Anthropic::Models::Beta::BetaToolUseBlockParam, Anthropic::Models::Beta::BetaToolResultBlockParam, Anthropic::Models::Beta::BetaServerToolUseBlockParam, Anthropic::Models::Beta::BetaWebSearchToolResultBlockParam, Anthropic::Models::Beta::BetaWebFetchToolResultBlockParam, Anthropic::Models::Beta::BetaCodeExecutionToolResultBlockParam, Anthropic::Models::Beta::BetaBashCodeExecutionToolResultBlockParam, Anthropic::Models::Beta::BetaTextEditorCodeExecutionToolResultBlockParam, Anthropic::Models::Beta::BetaToolSearchToolResultBlockParam, Anthropic::Models::Beta::BetaMCPToolUseBlockParam, Anthropic::Models::Beta::BetaRequestMCPToolResultBlockParam, Anthropic::Models::Beta::BetaContainerUploadBlockParam, Anthropic::Models::Beta::BetaCompactionBlockParam)]
|
|
72
|
+
# @return [Array(Anthropic::Models::Beta::BetaTextBlockParam, Anthropic::Models::Beta::BetaImageBlockParam, Anthropic::Models::Beta::BetaRequestDocumentBlock, Anthropic::Models::Beta::BetaSearchResultBlockParam, Anthropic::Models::Beta::BetaThinkingBlockParam, Anthropic::Models::Beta::BetaRedactedThinkingBlockParam, Anthropic::Models::Beta::BetaToolUseBlockParam, Anthropic::Models::Beta::BetaToolResultBlockParam, Anthropic::Models::Beta::BetaServerToolUseBlockParam, Anthropic::Models::Beta::BetaWebSearchToolResultBlockParam, Anthropic::Models::Beta::BetaWebFetchToolResultBlockParam, Anthropic::Models::Beta::BetaAdvisorToolResultBlockParam, Anthropic::Models::Beta::BetaCodeExecutionToolResultBlockParam, Anthropic::Models::Beta::BetaBashCodeExecutionToolResultBlockParam, Anthropic::Models::Beta::BetaTextEditorCodeExecutionToolResultBlockParam, Anthropic::Models::Beta::BetaToolSearchToolResultBlockParam, Anthropic::Models::Beta::BetaMCPToolUseBlockParam, Anthropic::Models::Beta::BetaRequestMCPToolResultBlockParam, Anthropic::Models::Beta::BetaContainerUploadBlockParam, Anthropic::Models::Beta::BetaCompactionBlockParam)]
|
|
71
73
|
end
|
|
72
74
|
end
|
|
73
75
|
|
|
@@ -15,8 +15,11 @@ module Anthropic
|
|
|
15
15
|
# Token usage for a compaction iteration.
|
|
16
16
|
variant :compaction, -> { Anthropic::Beta::BetaCompactionIterationUsage }
|
|
17
17
|
|
|
18
|
+
# Token usage for an advisor sub-inference iteration.
|
|
19
|
+
variant :advisor_message, -> { Anthropic::Beta::BetaAdvisorMessageIterationUsage }
|
|
20
|
+
|
|
18
21
|
# @!method self.variants
|
|
19
|
-
# @return [Array(Anthropic::Models::Beta::BetaMessageIterationUsage, Anthropic::Models::Beta::BetaCompactionIterationUsage)]
|
|
22
|
+
# @return [Array(Anthropic::Models::Beta::BetaMessageIterationUsage, Anthropic::Models::Beta::BetaCompactionIterationUsage, Anthropic::Models::Beta::BetaAdvisorMessageIterationUsage)]
|
|
20
23
|
end
|
|
21
24
|
|
|
22
25
|
# @type [Anthropic::Internal::Type::Converter]
|
|
@@ -56,7 +56,7 @@ module Anthropic
|
|
|
56
56
|
# [{ "type": "text", "text": "B)" }]
|
|
57
57
|
# ```
|
|
58
58
|
#
|
|
59
|
-
# @return [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::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>]
|
|
59
|
+
# @return [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>]
|
|
60
60
|
required :content, -> { Anthropic::Internal::Type::ArrayOf[union: Anthropic::Beta::BetaContentBlock] }
|
|
61
61
|
|
|
62
62
|
# parsed value of response when a JSON output schema object has been specified via :output_format
|
|
@@ -166,7 +166,7 @@ module Anthropic
|
|
|
166
166
|
#
|
|
167
167
|
# @param container [Anthropic::Models::Beta::BetaContainer, nil] Information about the container used in the request (for the code execution tool
|
|
168
168
|
#
|
|
169
|
-
# @param content [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::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>] Content generated by the model.
|
|
169
|
+
# @param content [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>] Content generated by the model.
|
|
170
170
|
#
|
|
171
171
|
# @param context_management [Anthropic::Models::Beta::BetaContextManagementResponse, nil] Context management response.
|
|
172
172
|
#
|