anthropic 1.50.0 → 1.51.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 +19 -0
- data/README.md +1 -1
- data/lib/anthropic/internal/util.rb +18 -9
- data/lib/anthropic/models/beta/beta_cache_control_ephemeral.rb +2 -2
- data/lib/anthropic/models/beta/beta_thinking_config_enabled.rb +1 -1
- data/lib/anthropic/models/beta/beta_thinking_config_param.rb +1 -1
- data/lib/anthropic/models/beta/beta_tool_union.rb +5 -1
- data/lib/anthropic/models/beta/beta_web_fetch_tool_20260318.rb +167 -0
- data/lib/anthropic/models/beta/beta_web_search_tool_20260318.rb +150 -0
- data/lib/anthropic/models/beta/message_count_tokens_params.rb +30 -14
- data/lib/anthropic/models/beta/message_create_params.rb +22 -16
- data/lib/anthropic/models/beta/messages/batch_create_params.rb +28 -19
- data/lib/anthropic/models/cache_control_ephemeral.rb +2 -2
- data/lib/anthropic/models/completion_create_params.rb +4 -2
- data/lib/anthropic/models/message_count_tokens_params.rb +25 -13
- data/lib/anthropic/models/message_count_tokens_tool.rb +5 -1
- data/lib/anthropic/models/message_create_params.rb +22 -16
- data/lib/anthropic/models/messages/batch_create_params.rb +28 -19
- data/lib/anthropic/models/thinking_config_enabled.rb +1 -1
- data/lib/anthropic/models/thinking_config_param.rb +1 -1
- data/lib/anthropic/models/tool_union.rb +5 -1
- data/lib/anthropic/models/web_fetch_tool_20260318.rb +163 -0
- data/lib/anthropic/models/web_search_tool_20260318.rb +146 -0
- data/lib/anthropic/models.rb +4 -0
- data/lib/anthropic/resources/beta/messages/batches.rb +6 -6
- data/lib/anthropic/resources/beta/messages.rb +10 -8
- data/lib/anthropic/resources/completions.rb +4 -4
- data/lib/anthropic/resources/messages/batches.rb +6 -6
- data/lib/anthropic/resources/messages.rb +19 -15
- data/lib/anthropic/version.rb +1 -1
- data/lib/anthropic.rb +4 -0
- data/rbi/anthropic/models/beta/beta_cache_control_ephemeral.rbi +3 -3
- data/rbi/anthropic/models/beta/beta_thinking_config_enabled.rbi +2 -2
- data/rbi/anthropic/models/beta/beta_thinking_config_param.rbi +1 -1
- data/rbi/anthropic/models/beta/beta_tool_union.rbi +2 -0
- data/rbi/anthropic/models/beta/beta_web_fetch_tool_20260318.rbi +319 -0
- data/rbi/anthropic/models/beta/beta_web_search_tool_20260318.rbi +296 -0
- data/rbi/anthropic/models/beta/message_count_tokens_params.rbi +48 -19
- data/rbi/anthropic/models/beta/message_create_params.rbi +45 -26
- data/rbi/anthropic/models/beta/messages/batch_create_params.rbi +55 -31
- data/rbi/anthropic/models/cache_control_ephemeral.rbi +3 -3
- data/rbi/anthropic/models/completion_create_params.rbi +8 -4
- data/rbi/anthropic/models/message_count_tokens_params.rbi +46 -19
- data/rbi/anthropic/models/message_count_tokens_tool.rbi +2 -0
- data/rbi/anthropic/models/message_create_params.rbi +45 -26
- data/rbi/anthropic/models/messages/batch_create_params.rbi +55 -31
- data/rbi/anthropic/models/thinking_config_enabled.rbi +2 -2
- data/rbi/anthropic/models/thinking_config_param.rbi +1 -1
- data/rbi/anthropic/models/tool_union.rbi +2 -0
- data/rbi/anthropic/models/web_fetch_tool_20260318.rbi +295 -0
- data/rbi/anthropic/models/web_search_tool_20260318.rbi +272 -0
- data/rbi/anthropic/models.rbi +4 -0
- data/rbi/anthropic/resources/beta/messages/batches.rbi +6 -6
- data/rbi/anthropic/resources/beta/messages.rbi +60 -36
- data/rbi/anthropic/resources/completions.rbi +12 -8
- data/rbi/anthropic/resources/messages/batches.rbi +6 -6
- data/rbi/anthropic/resources/messages.rbi +71 -46
- data/sig/anthropic/models/beta/beta_tool_union.rbs +2 -0
- data/sig/anthropic/models/beta/beta_web_fetch_tool_20260318.rbs +126 -0
- data/sig/anthropic/models/beta/beta_web_search_tool_20260318.rbs +114 -0
- data/sig/anthropic/models/beta/message_count_tokens_params.rbs +10 -1
- data/sig/anthropic/models/message_count_tokens_params.rbs +8 -1
- data/sig/anthropic/models/message_count_tokens_tool.rbs +2 -0
- data/sig/anthropic/models/tool_union.rbs +2 -0
- data/sig/anthropic/models/web_fetch_tool_20260318.rbs +122 -0
- data/sig/anthropic/models/web_search_tool_20260318.rbs +110 -0
- data/sig/anthropic/models.rbs +4 -0
- data/sig/anthropic/resources/beta/messages.rbs +1 -0
- data/sig/anthropic/resources/messages.rbs +1 -0
- metadata +14 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8a4c0796098c3ebac37542205f404f39263436276c044cd39be1662a1ded8678
|
|
4
|
+
data.tar.gz: 7ca2ad565fec49876126eb5fbe9844d4b6bafb17e458affe3bd55dd886fb3d08
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6c20d2fda644c967e8a35b355af2507e077e974799b9ff74c52a2541bf713aee633f5bf9a1a15313d9bed76bb17659c5c5bf7ebb423284aefa785548a9a53a2d
|
|
7
|
+
data.tar.gz: 85c59aa18c96f05734279721f01cba261791f4196e1fde65a4e6ee939ca5a8adc9ba11efae83fde00aff36e4f41cd55e8d5596c8142359343655c9d88bb7d3c7
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.51.0 (2026-06-29)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v1.50.0...v1.51.0](https://github.com/anthropics/anthropic-sdk-ruby/compare/v1.50.0...v1.51.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** add support for 20260318 web fetch and support tools ([bb82831](https://github.com/anthropics/anthropic-sdk-ruby/commit/bb828319b6d9b5965f45c1988c6a182c234abba7))
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
* **client:** merge anthropic-beta header across sources instead of overwriting ([#60](https://github.com/anthropics/anthropic-sdk-ruby/issues/60)) ([fe31ce8](https://github.com/anthropics/anthropic-sdk-ruby/commit/fe31ce853146173fcd00872b1d6dc4db50bbe23c))
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Chores
|
|
18
|
+
|
|
19
|
+
* **api:** accept user profile ID's when counting tokens ([b5f48bb](https://github.com/anthropics/anthropic-sdk-ruby/commit/b5f48bb2236f17f0c8bca19b2722c78e40acc671))
|
|
20
|
+
* **docs:** updates to descriptions and example values ([e8c63fe](https://github.com/anthropics/anthropic-sdk-ruby/commit/e8c63fee97b136259b6f193fbe856886266096a6))
|
|
21
|
+
|
|
3
22
|
## 1.50.0 (2026-06-24)
|
|
4
23
|
|
|
5
24
|
Full Changelog: [v1.49.0...v1.50.0](https://github.com/anthropics/anthropic-sdk-ruby/compare/v1.49.0...v1.50.0)
|
data/README.md
CHANGED
|
@@ -412,19 +412,28 @@ module Anthropic
|
|
|
412
412
|
class << self
|
|
413
413
|
# @api private
|
|
414
414
|
#
|
|
415
|
+
# Later hashes take precedence on key collision, except `anthropic-beta`
|
|
416
|
+
# which is additive: values from every input are collected so endpoint
|
|
417
|
+
# defaults don't drop the caller's `betas:` or the client OAuth beta.
|
|
418
|
+
#
|
|
415
419
|
# @param headers [Hash{String=>String, Integer, Array<String, Integer, nil>, nil}]
|
|
416
420
|
#
|
|
417
421
|
# @return [Hash{String=>String}]
|
|
418
422
|
def normalized_headers(*headers)
|
|
419
|
-
{}
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
423
|
+
merged = {}
|
|
424
|
+
headers.each do |hdrs|
|
|
425
|
+
hdrs.to_h.each do |key, val|
|
|
426
|
+
k = key.to_s.downcase
|
|
427
|
+
merged[k] = k == "anthropic-beta" && merged.key?(k) ? [*merged[k], *val] : val
|
|
428
|
+
end
|
|
429
|
+
end
|
|
430
|
+
merged.transform_values do |val|
|
|
431
|
+
case val
|
|
432
|
+
in Array
|
|
433
|
+
val.filter_map { _1&.to_s&.strip }.join(", ")
|
|
434
|
+
else
|
|
435
|
+
val&.to_s&.strip
|
|
436
|
+
end
|
|
428
437
|
end
|
|
429
438
|
end
|
|
430
439
|
end
|
|
@@ -18,7 +18,7 @@ module Anthropic
|
|
|
18
18
|
# - `1h`: 1 hour
|
|
19
19
|
#
|
|
20
20
|
# Defaults to `5m`. See
|
|
21
|
-
# [prompt caching pricing](https://
|
|
21
|
+
# [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching)
|
|
22
22
|
# for details.
|
|
23
23
|
#
|
|
24
24
|
# @return [Symbol, Anthropic::Models::Beta::BetaCacheControlEphemeral::TTL, nil]
|
|
@@ -40,7 +40,7 @@ module Anthropic
|
|
|
40
40
|
# - `1h`: 1 hour
|
|
41
41
|
#
|
|
42
42
|
# Defaults to `5m`. See
|
|
43
|
-
# [prompt caching pricing](https://
|
|
43
|
+
# [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching)
|
|
44
44
|
# for details.
|
|
45
45
|
#
|
|
46
46
|
# @see Anthropic::Models::Beta::BetaCacheControlEphemeral#ttl
|
|
@@ -12,7 +12,7 @@ module Anthropic
|
|
|
12
12
|
# Must be ≥1024 and less than `max_tokens`.
|
|
13
13
|
#
|
|
14
14
|
# See
|
|
15
|
-
# [extended thinking](https://
|
|
15
|
+
# [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking)
|
|
16
16
|
# for details.
|
|
17
17
|
#
|
|
18
18
|
# @return [Integer]
|
|
@@ -10,7 +10,7 @@ module Anthropic
|
|
|
10
10
|
# tokens and counts towards your `max_tokens` limit.
|
|
11
11
|
#
|
|
12
12
|
# See
|
|
13
|
-
# [extended thinking](https://
|
|
13
|
+
# [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking)
|
|
14
14
|
# for details.
|
|
15
15
|
module BetaThinkingConfigParam
|
|
16
16
|
extend Anthropic::Internal::Type::Union
|
|
@@ -51,6 +51,10 @@ module Anthropic
|
|
|
51
51
|
# Web fetch tool with use_cache parameter for bypassing cached content.
|
|
52
52
|
variant -> { Anthropic::Beta::BetaWebFetchTool20260309 }
|
|
53
53
|
|
|
54
|
+
variant -> { Anthropic::Beta::BetaWebSearchTool20260318 }
|
|
55
|
+
|
|
56
|
+
variant -> { Anthropic::Beta::BetaWebFetchTool20260318 }
|
|
57
|
+
|
|
54
58
|
variant -> { Anthropic::Beta::BetaAdvisorTool20260301 }
|
|
55
59
|
|
|
56
60
|
variant -> { Anthropic::Beta::BetaToolSearchToolBm25_20251119 }
|
|
@@ -64,7 +68,7 @@ module Anthropic
|
|
|
64
68
|
variant -> { Anthropic::Beta::BetaMCPToolset }
|
|
65
69
|
|
|
66
70
|
# @!method self.variants
|
|
67
|
-
# @return [Array(Anthropic::Models::Beta::BetaTool, Anthropic::Models::Beta::BetaToolBash20241022, Anthropic::Models::Beta::BetaToolBash20250124, Anthropic::Models::Beta::BetaCodeExecutionTool20250522, Anthropic::Models::Beta::BetaCodeExecutionTool20250825, Anthropic::Models::Beta::BetaCodeExecutionTool20260120, Anthropic::Models::Beta::BetaCodeExecutionTool20260521, Anthropic::Models::Beta::BetaToolComputerUse20241022, Anthropic::Models::Beta::BetaMemoryTool20250818, Anthropic::Models::Beta::BetaToolComputerUse20250124, Anthropic::Models::Beta::BetaToolTextEditor20241022, Anthropic::Models::Beta::BetaToolComputerUse20251124, Anthropic::Models::Beta::BetaToolTextEditor20250124, Anthropic::Models::Beta::BetaToolTextEditor20250429, Anthropic::Models::Beta::BetaToolTextEditor20250728, Anthropic::Models::Beta::BetaWebSearchTool20250305, Anthropic::Models::Beta::BetaWebFetchTool20250910, Anthropic::Models::Beta::BetaWebSearchTool20260209, Anthropic::Models::Beta::BetaWebFetchTool20260209, Anthropic::Models::Beta::BetaWebFetchTool20260309, Anthropic::Models::Beta::BetaAdvisorTool20260301, Anthropic::Models::Beta::BetaToolSearchToolBm25_20251119, Anthropic::Models::Beta::BetaToolSearchToolRegex20251119, Anthropic::Models::Beta::BetaMCPToolset)]
|
|
71
|
+
# @return [Array(Anthropic::Models::Beta::BetaTool, Anthropic::Models::Beta::BetaToolBash20241022, Anthropic::Models::Beta::BetaToolBash20250124, Anthropic::Models::Beta::BetaCodeExecutionTool20250522, Anthropic::Models::Beta::BetaCodeExecutionTool20250825, Anthropic::Models::Beta::BetaCodeExecutionTool20260120, Anthropic::Models::Beta::BetaCodeExecutionTool20260521, Anthropic::Models::Beta::BetaToolComputerUse20241022, Anthropic::Models::Beta::BetaMemoryTool20250818, Anthropic::Models::Beta::BetaToolComputerUse20250124, Anthropic::Models::Beta::BetaToolTextEditor20241022, Anthropic::Models::Beta::BetaToolComputerUse20251124, Anthropic::Models::Beta::BetaToolTextEditor20250124, Anthropic::Models::Beta::BetaToolTextEditor20250429, Anthropic::Models::Beta::BetaToolTextEditor20250728, Anthropic::Models::Beta::BetaWebSearchTool20250305, Anthropic::Models::Beta::BetaWebFetchTool20250910, Anthropic::Models::Beta::BetaWebSearchTool20260209, Anthropic::Models::Beta::BetaWebFetchTool20260209, Anthropic::Models::Beta::BetaWebFetchTool20260309, Anthropic::Models::Beta::BetaWebSearchTool20260318, Anthropic::Models::Beta::BetaWebFetchTool20260318, Anthropic::Models::Beta::BetaAdvisorTool20260301, Anthropic::Models::Beta::BetaToolSearchToolBm25_20251119, Anthropic::Models::Beta::BetaToolSearchToolRegex20251119, Anthropic::Models::Beta::BetaMCPToolset)]
|
|
68
72
|
end
|
|
69
73
|
end
|
|
70
74
|
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Anthropic
|
|
4
|
+
module Models
|
|
5
|
+
module Beta
|
|
6
|
+
class BetaWebFetchTool20260318 < Anthropic::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute name
|
|
8
|
+
# Name of the tool.
|
|
9
|
+
#
|
|
10
|
+
# This is how the tool will be called by the model and in `tool_use` blocks.
|
|
11
|
+
#
|
|
12
|
+
# @return [Symbol, :web_fetch]
|
|
13
|
+
required :name, const: :web_fetch
|
|
14
|
+
|
|
15
|
+
# @!attribute type
|
|
16
|
+
#
|
|
17
|
+
# @return [Symbol, :web_fetch_20260318]
|
|
18
|
+
required :type, const: :web_fetch_20260318
|
|
19
|
+
|
|
20
|
+
# @!attribute allowed_callers
|
|
21
|
+
#
|
|
22
|
+
# @return [Array<Symbol, Anthropic::Models::Beta::BetaWebFetchTool20260318::AllowedCaller>, nil]
|
|
23
|
+
optional :allowed_callers,
|
|
24
|
+
-> { Anthropic::Internal::Type::ArrayOf[enum: Anthropic::Beta::BetaWebFetchTool20260318::AllowedCaller] }
|
|
25
|
+
|
|
26
|
+
# @!attribute allowed_domains
|
|
27
|
+
# List of domains to allow fetching from
|
|
28
|
+
#
|
|
29
|
+
# @return [Array<String>, nil]
|
|
30
|
+
optional :allowed_domains, Anthropic::Internal::Type::ArrayOf[String], nil?: true
|
|
31
|
+
|
|
32
|
+
# @!attribute blocked_domains
|
|
33
|
+
# List of domains to block fetching from
|
|
34
|
+
#
|
|
35
|
+
# @return [Array<String>, nil]
|
|
36
|
+
optional :blocked_domains, Anthropic::Internal::Type::ArrayOf[String], nil?: true
|
|
37
|
+
|
|
38
|
+
# @!attribute cache_control
|
|
39
|
+
# Create a cache control breakpoint at this content block.
|
|
40
|
+
#
|
|
41
|
+
# @return [Anthropic::Models::Beta::BetaCacheControlEphemeral, nil]
|
|
42
|
+
optional :cache_control, -> { Anthropic::Beta::BetaCacheControlEphemeral }, nil?: true
|
|
43
|
+
|
|
44
|
+
# @!attribute citations
|
|
45
|
+
# Citations configuration for fetched documents. Citations are disabled by
|
|
46
|
+
# default.
|
|
47
|
+
#
|
|
48
|
+
# @return [Anthropic::Models::Beta::BetaCitationsConfigParam, nil]
|
|
49
|
+
optional :citations, -> { Anthropic::Beta::BetaCitationsConfigParam }, nil?: true
|
|
50
|
+
|
|
51
|
+
# @!attribute defer_loading
|
|
52
|
+
# If true, tool will not be included in initial system prompt. Only loaded when
|
|
53
|
+
# returned via tool_reference from tool search.
|
|
54
|
+
#
|
|
55
|
+
# @return [Boolean, nil]
|
|
56
|
+
optional :defer_loading, Anthropic::Internal::Type::Boolean
|
|
57
|
+
|
|
58
|
+
# @!attribute max_content_tokens
|
|
59
|
+
# Maximum number of tokens used by including web page text content in the context.
|
|
60
|
+
# The limit is approximate and does not apply to binary content such as PDFs.
|
|
61
|
+
#
|
|
62
|
+
# @return [Integer, nil]
|
|
63
|
+
optional :max_content_tokens, Integer, nil?: true
|
|
64
|
+
|
|
65
|
+
# @!attribute max_uses
|
|
66
|
+
# Maximum number of times the tool can be used in the API request.
|
|
67
|
+
#
|
|
68
|
+
# @return [Integer, nil]
|
|
69
|
+
optional :max_uses, Integer, nil?: true
|
|
70
|
+
|
|
71
|
+
# @!attribute response_inclusion
|
|
72
|
+
# How this tool's result blocks appear in the API response when the result was
|
|
73
|
+
# consumed by a completed code_execution call in the same turn. 'full' returns the
|
|
74
|
+
# complete content (default). 'excluded' drops the nested server_tool_use and
|
|
75
|
+
# result block pair entirely. Results from direct calls, or from code_execution
|
|
76
|
+
# calls that paused before completing, are always returned in full so they can be
|
|
77
|
+
# sent back on the next turn.
|
|
78
|
+
#
|
|
79
|
+
# @return [Symbol, Anthropic::Models::Beta::BetaWebFetchTool20260318::ResponseInclusion, nil]
|
|
80
|
+
optional :response_inclusion, enum: -> { Anthropic::Beta::BetaWebFetchTool20260318::ResponseInclusion }
|
|
81
|
+
|
|
82
|
+
# @!attribute strict
|
|
83
|
+
# When true, guarantees schema validation on tool names and inputs
|
|
84
|
+
#
|
|
85
|
+
# @return [Boolean, nil]
|
|
86
|
+
optional :strict, Anthropic::Internal::Type::Boolean
|
|
87
|
+
|
|
88
|
+
# @!attribute use_cache
|
|
89
|
+
# Whether to use cached content. Set to false to bypass the cache and fetch fresh
|
|
90
|
+
# content. Only set to false when the user explicitly requests fresh content or
|
|
91
|
+
# when fetching rapidly-changing sources.
|
|
92
|
+
#
|
|
93
|
+
# @return [Boolean, nil]
|
|
94
|
+
optional :use_cache, Anthropic::Internal::Type::Boolean
|
|
95
|
+
|
|
96
|
+
# @!method initialize(allowed_callers: nil, allowed_domains: nil, blocked_domains: nil, cache_control: nil, citations: nil, defer_loading: nil, max_content_tokens: nil, max_uses: nil, response_inclusion: nil, strict: nil, use_cache: nil, name: :web_fetch, type: :web_fetch_20260318)
|
|
97
|
+
# Some parameter documentations has been truncated, see
|
|
98
|
+
# {Anthropic::Models::Beta::BetaWebFetchTool20260318} for more details.
|
|
99
|
+
#
|
|
100
|
+
# @param allowed_callers [Array<Symbol, Anthropic::Models::Beta::BetaWebFetchTool20260318::AllowedCaller>]
|
|
101
|
+
#
|
|
102
|
+
# @param allowed_domains [Array<String>, nil] List of domains to allow fetching from
|
|
103
|
+
#
|
|
104
|
+
# @param blocked_domains [Array<String>, nil] List of domains to block fetching from
|
|
105
|
+
#
|
|
106
|
+
# @param cache_control [Anthropic::Models::Beta::BetaCacheControlEphemeral, nil] Create a cache control breakpoint at this content block.
|
|
107
|
+
#
|
|
108
|
+
# @param citations [Anthropic::Models::Beta::BetaCitationsConfigParam, nil] Citations configuration for fetched documents. Citations are disabled by default
|
|
109
|
+
#
|
|
110
|
+
# @param defer_loading [Boolean] If true, tool will not be included in initial system prompt. Only loaded when re
|
|
111
|
+
#
|
|
112
|
+
# @param max_content_tokens [Integer, nil] Maximum number of tokens used by including web page text content in the context.
|
|
113
|
+
#
|
|
114
|
+
# @param max_uses [Integer, nil] Maximum number of times the tool can be used in the API request.
|
|
115
|
+
#
|
|
116
|
+
# @param response_inclusion [Symbol, Anthropic::Models::Beta::BetaWebFetchTool20260318::ResponseInclusion] How this tool's result blocks appear in the API response when the result was con
|
|
117
|
+
#
|
|
118
|
+
# @param strict [Boolean] When true, guarantees schema validation on tool names and inputs
|
|
119
|
+
#
|
|
120
|
+
# @param use_cache [Boolean] Whether to use cached content. Set to false to bypass the cache and fetch fresh
|
|
121
|
+
#
|
|
122
|
+
# @param name [Symbol, :web_fetch] Name of the tool.
|
|
123
|
+
#
|
|
124
|
+
# @param type [Symbol, :web_fetch_20260318]
|
|
125
|
+
|
|
126
|
+
# Specifies who can invoke a tool.
|
|
127
|
+
#
|
|
128
|
+
# Values: direct: The model can call this tool directly. code_execution_20250825:
|
|
129
|
+
# The tool can be called from the code execution environment (v1).
|
|
130
|
+
# code_execution_20260120: The tool can be called from the code execution
|
|
131
|
+
# environment (v2 with persistence). code_execution_20260521: The tool can be
|
|
132
|
+
# called from the code execution environment (v2 with persistence).
|
|
133
|
+
module AllowedCaller
|
|
134
|
+
extend Anthropic::Internal::Type::Enum
|
|
135
|
+
|
|
136
|
+
DIRECT = :direct
|
|
137
|
+
CODE_EXECUTION_20250825 = :code_execution_20250825
|
|
138
|
+
CODE_EXECUTION_20260120 = :code_execution_20260120
|
|
139
|
+
CODE_EXECUTION_20260521 = :code_execution_20260521
|
|
140
|
+
|
|
141
|
+
# @!method self.values
|
|
142
|
+
# @return [Array<Symbol>]
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
# How this tool's result blocks appear in the API response when the result was
|
|
146
|
+
# consumed by a completed code_execution call in the same turn. 'full' returns the
|
|
147
|
+
# complete content (default). 'excluded' drops the nested server_tool_use and
|
|
148
|
+
# result block pair entirely. Results from direct calls, or from code_execution
|
|
149
|
+
# calls that paused before completing, are always returned in full so they can be
|
|
150
|
+
# sent back on the next turn.
|
|
151
|
+
#
|
|
152
|
+
# @see Anthropic::Models::Beta::BetaWebFetchTool20260318#response_inclusion
|
|
153
|
+
module ResponseInclusion
|
|
154
|
+
extend Anthropic::Internal::Type::Enum
|
|
155
|
+
|
|
156
|
+
FULL = :full
|
|
157
|
+
EXCLUDED = :excluded
|
|
158
|
+
|
|
159
|
+
# @!method self.values
|
|
160
|
+
# @return [Array<Symbol>]
|
|
161
|
+
end
|
|
162
|
+
end
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
BetaWebFetchTool20260318 = Beta::BetaWebFetchTool20260318
|
|
166
|
+
end
|
|
167
|
+
end
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Anthropic
|
|
4
|
+
module Models
|
|
5
|
+
module Beta
|
|
6
|
+
class BetaWebSearchTool20260318 < Anthropic::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute name
|
|
8
|
+
# Name of the tool.
|
|
9
|
+
#
|
|
10
|
+
# This is how the tool will be called by the model and in `tool_use` blocks.
|
|
11
|
+
#
|
|
12
|
+
# @return [Symbol, :web_search]
|
|
13
|
+
required :name, const: :web_search
|
|
14
|
+
|
|
15
|
+
# @!attribute type
|
|
16
|
+
#
|
|
17
|
+
# @return [Symbol, :web_search_20260318]
|
|
18
|
+
required :type, const: :web_search_20260318
|
|
19
|
+
|
|
20
|
+
# @!attribute allowed_callers
|
|
21
|
+
#
|
|
22
|
+
# @return [Array<Symbol, Anthropic::Models::Beta::BetaWebSearchTool20260318::AllowedCaller>, nil]
|
|
23
|
+
optional :allowed_callers,
|
|
24
|
+
-> { Anthropic::Internal::Type::ArrayOf[enum: Anthropic::Beta::BetaWebSearchTool20260318::AllowedCaller] }
|
|
25
|
+
|
|
26
|
+
# @!attribute allowed_domains
|
|
27
|
+
# If provided, only these domains will be included in results. Cannot be used
|
|
28
|
+
# alongside `blocked_domains`.
|
|
29
|
+
#
|
|
30
|
+
# @return [Array<String>, nil]
|
|
31
|
+
optional :allowed_domains, Anthropic::Internal::Type::ArrayOf[String], nil?: true
|
|
32
|
+
|
|
33
|
+
# @!attribute blocked_domains
|
|
34
|
+
# If provided, these domains will never appear in results. Cannot be used
|
|
35
|
+
# alongside `allowed_domains`.
|
|
36
|
+
#
|
|
37
|
+
# @return [Array<String>, nil]
|
|
38
|
+
optional :blocked_domains, Anthropic::Internal::Type::ArrayOf[String], nil?: true
|
|
39
|
+
|
|
40
|
+
# @!attribute cache_control
|
|
41
|
+
# Create a cache control breakpoint at this content block.
|
|
42
|
+
#
|
|
43
|
+
# @return [Anthropic::Models::Beta::BetaCacheControlEphemeral, nil]
|
|
44
|
+
optional :cache_control, -> { Anthropic::Beta::BetaCacheControlEphemeral }, nil?: true
|
|
45
|
+
|
|
46
|
+
# @!attribute defer_loading
|
|
47
|
+
# If true, tool will not be included in initial system prompt. Only loaded when
|
|
48
|
+
# returned via tool_reference from tool search.
|
|
49
|
+
#
|
|
50
|
+
# @return [Boolean, nil]
|
|
51
|
+
optional :defer_loading, Anthropic::Internal::Type::Boolean
|
|
52
|
+
|
|
53
|
+
# @!attribute max_uses
|
|
54
|
+
# Maximum number of times the tool can be used in the API request.
|
|
55
|
+
#
|
|
56
|
+
# @return [Integer, nil]
|
|
57
|
+
optional :max_uses, Integer, nil?: true
|
|
58
|
+
|
|
59
|
+
# @!attribute response_inclusion
|
|
60
|
+
# How this tool's result blocks appear in the API response when the result was
|
|
61
|
+
# consumed by a completed code_execution call in the same turn. 'full' returns the
|
|
62
|
+
# complete content (default). 'excluded' drops the nested server_tool_use and
|
|
63
|
+
# result block pair entirely. Results from direct calls, or from code_execution
|
|
64
|
+
# calls that paused before completing, are always returned in full so they can be
|
|
65
|
+
# sent back on the next turn.
|
|
66
|
+
#
|
|
67
|
+
# @return [Symbol, Anthropic::Models::Beta::BetaWebSearchTool20260318::ResponseInclusion, nil]
|
|
68
|
+
optional :response_inclusion, enum: -> { Anthropic::Beta::BetaWebSearchTool20260318::ResponseInclusion }
|
|
69
|
+
|
|
70
|
+
# @!attribute strict
|
|
71
|
+
# When true, guarantees schema validation on tool names and inputs
|
|
72
|
+
#
|
|
73
|
+
# @return [Boolean, nil]
|
|
74
|
+
optional :strict, Anthropic::Internal::Type::Boolean
|
|
75
|
+
|
|
76
|
+
# @!attribute user_location
|
|
77
|
+
# Parameters for the user's location. Used to provide more relevant search
|
|
78
|
+
# results.
|
|
79
|
+
#
|
|
80
|
+
# @return [Anthropic::Models::Beta::BetaUserLocation, nil]
|
|
81
|
+
optional :user_location, -> { Anthropic::Beta::BetaUserLocation }, nil?: true
|
|
82
|
+
|
|
83
|
+
# @!method initialize(allowed_callers: nil, allowed_domains: nil, blocked_domains: nil, cache_control: nil, defer_loading: nil, max_uses: nil, response_inclusion: nil, strict: nil, user_location: nil, name: :web_search, type: :web_search_20260318)
|
|
84
|
+
# Some parameter documentations has been truncated, see
|
|
85
|
+
# {Anthropic::Models::Beta::BetaWebSearchTool20260318} for more details.
|
|
86
|
+
#
|
|
87
|
+
# @param allowed_callers [Array<Symbol, Anthropic::Models::Beta::BetaWebSearchTool20260318::AllowedCaller>]
|
|
88
|
+
#
|
|
89
|
+
# @param allowed_domains [Array<String>, nil] If provided, only these domains will be included in results. Cannot be used alon
|
|
90
|
+
#
|
|
91
|
+
# @param blocked_domains [Array<String>, nil] If provided, these domains will never appear in results. Cannot be used alongsid
|
|
92
|
+
#
|
|
93
|
+
# @param cache_control [Anthropic::Models::Beta::BetaCacheControlEphemeral, nil] Create a cache control breakpoint at this content block.
|
|
94
|
+
#
|
|
95
|
+
# @param defer_loading [Boolean] If true, tool will not be included in initial system prompt. Only loaded when re
|
|
96
|
+
#
|
|
97
|
+
# @param max_uses [Integer, nil] Maximum number of times the tool can be used in the API request.
|
|
98
|
+
#
|
|
99
|
+
# @param response_inclusion [Symbol, Anthropic::Models::Beta::BetaWebSearchTool20260318::ResponseInclusion] How this tool's result blocks appear in the API response when the result was con
|
|
100
|
+
#
|
|
101
|
+
# @param strict [Boolean] When true, guarantees schema validation on tool names and inputs
|
|
102
|
+
#
|
|
103
|
+
# @param user_location [Anthropic::Models::Beta::BetaUserLocation, nil] Parameters for the user's location. Used to provide more relevant search results
|
|
104
|
+
#
|
|
105
|
+
# @param name [Symbol, :web_search] Name of the tool.
|
|
106
|
+
#
|
|
107
|
+
# @param type [Symbol, :web_search_20260318]
|
|
108
|
+
|
|
109
|
+
# Specifies who can invoke a tool.
|
|
110
|
+
#
|
|
111
|
+
# Values: direct: The model can call this tool directly. code_execution_20250825:
|
|
112
|
+
# The tool can be called from the code execution environment (v1).
|
|
113
|
+
# code_execution_20260120: The tool can be called from the code execution
|
|
114
|
+
# environment (v2 with persistence). code_execution_20260521: The tool can be
|
|
115
|
+
# called from the code execution environment (v2 with persistence).
|
|
116
|
+
module AllowedCaller
|
|
117
|
+
extend Anthropic::Internal::Type::Enum
|
|
118
|
+
|
|
119
|
+
DIRECT = :direct
|
|
120
|
+
CODE_EXECUTION_20250825 = :code_execution_20250825
|
|
121
|
+
CODE_EXECUTION_20260120 = :code_execution_20260120
|
|
122
|
+
CODE_EXECUTION_20260521 = :code_execution_20260521
|
|
123
|
+
|
|
124
|
+
# @!method self.values
|
|
125
|
+
# @return [Array<Symbol>]
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
# How this tool's result blocks appear in the API response when the result was
|
|
129
|
+
# consumed by a completed code_execution call in the same turn. 'full' returns the
|
|
130
|
+
# complete content (default). 'excluded' drops the nested server_tool_use and
|
|
131
|
+
# result block pair entirely. Results from direct calls, or from code_execution
|
|
132
|
+
# calls that paused before completing, are always returned in full so they can be
|
|
133
|
+
# sent back on the next turn.
|
|
134
|
+
#
|
|
135
|
+
# @see Anthropic::Models::Beta::BetaWebSearchTool20260318#response_inclusion
|
|
136
|
+
module ResponseInclusion
|
|
137
|
+
extend Anthropic::Internal::Type::Enum
|
|
138
|
+
|
|
139
|
+
FULL = :full
|
|
140
|
+
EXCLUDED = :excluded
|
|
141
|
+
|
|
142
|
+
# @!method self.values
|
|
143
|
+
# @return [Array<Symbol>]
|
|
144
|
+
end
|
|
145
|
+
end
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
BetaWebSearchTool20260318 = Beta::BetaWebSearchTool20260318
|
|
149
|
+
end
|
|
150
|
+
end
|
|
@@ -66,12 +66,13 @@ module Anthropic
|
|
|
66
66
|
# { "role": "user", "content": [{ "type": "text", "text": "Hello, Claude" }] }
|
|
67
67
|
# ```
|
|
68
68
|
#
|
|
69
|
-
# See
|
|
69
|
+
# See
|
|
70
|
+
# [input examples](https://platform.claude.com/docs/en/build-with-claude/working-with-messages).
|
|
70
71
|
#
|
|
71
72
|
# Note that if you want to include a
|
|
72
|
-
# [system prompt](https://
|
|
73
|
-
# top-level `system` parameter — there is no `"system"` role for
|
|
74
|
-
# the Messages API.
|
|
73
|
+
# [system prompt](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices#give-claude-a-role),
|
|
74
|
+
# you can use the top-level `system` parameter — there is no `"system"` role for
|
|
75
|
+
# input messages in the Messages API.
|
|
75
76
|
#
|
|
76
77
|
# There is a limit of 100,000 messages in a single request.
|
|
77
78
|
#
|
|
@@ -140,7 +141,7 @@ module Anthropic
|
|
|
140
141
|
#
|
|
141
142
|
# A system prompt is a way of providing context and instructions to Claude, such
|
|
142
143
|
# as specifying a particular goal or role. See our
|
|
143
|
-
# [guide to system prompts](https://
|
|
144
|
+
# [guide to system prompts](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices#give-claude-a-role).
|
|
144
145
|
#
|
|
145
146
|
# @return [String, Array<Anthropic::Models::Beta::BetaTextBlockParam>, nil]
|
|
146
147
|
optional :system_, union: -> { Anthropic::Beta::MessageCountTokensParams::System }, api_name: :system
|
|
@@ -153,7 +154,7 @@ module Anthropic
|
|
|
153
154
|
# tokens and counts towards your `max_tokens` limit.
|
|
154
155
|
#
|
|
155
156
|
# See
|
|
156
|
-
# [extended thinking](https://
|
|
157
|
+
# [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking)
|
|
157
158
|
# for details.
|
|
158
159
|
#
|
|
159
160
|
# @return [Anthropic::Models::Beta::BetaThinkingConfigEnabled, Anthropic::Models::Beta::BetaThinkingConfigDisabled, Anthropic::Models::Beta::BetaThinkingConfigAdaptive, nil]
|
|
@@ -176,9 +177,9 @@ module Anthropic
|
|
|
176
177
|
#
|
|
177
178
|
# There are two types of tools: **client tools** and **server tools**. The
|
|
178
179
|
# behavior described below applies to client tools. For
|
|
179
|
-
# [server tools](https://
|
|
180
|
+
# [server tools](https://platform.claude.com/docs/en/agents-and-tools/tool-use/server-tools),
|
|
180
181
|
# see their individual documentation as each has its own behavior (e.g., the
|
|
181
|
-
# [web search tool](https://
|
|
182
|
+
# [web search tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-search-tool)).
|
|
182
183
|
#
|
|
183
184
|
# Each tool definition includes:
|
|
184
185
|
#
|
|
@@ -241,9 +242,11 @@ module Anthropic
|
|
|
241
242
|
# functions, or more generally whenever you want the model to produce a particular
|
|
242
243
|
# JSON structure of output.
|
|
243
244
|
#
|
|
244
|
-
# See our
|
|
245
|
+
# See our
|
|
246
|
+
# [guide](https://platform.claude.com/docs/en/agents-and-tools/tool-use/overview)
|
|
247
|
+
# for more details.
|
|
245
248
|
#
|
|
246
|
-
# @return [Array<Anthropic::Models::Beta::BetaTool, Anthropic::Models::Beta::BetaToolBash20241022, Anthropic::Models::Beta::BetaToolBash20250124, Anthropic::Models::Beta::BetaCodeExecutionTool20250522, Anthropic::Models::Beta::BetaCodeExecutionTool20250825, Anthropic::Models::Beta::BetaCodeExecutionTool20260120, Anthropic::Models::Beta::BetaCodeExecutionTool20260521, Anthropic::Models::Beta::BetaToolComputerUse20241022, Anthropic::Models::Beta::BetaMemoryTool20250818, Anthropic::Models::Beta::BetaToolComputerUse20250124, Anthropic::Models::Beta::BetaToolTextEditor20241022, Anthropic::Models::Beta::BetaToolComputerUse20251124, Anthropic::Models::Beta::BetaToolTextEditor20250124, Anthropic::Models::Beta::BetaToolTextEditor20250429, Anthropic::Models::Beta::BetaToolTextEditor20250728, Anthropic::Models::Beta::BetaWebSearchTool20250305, Anthropic::Models::Beta::BetaWebFetchTool20250910, Anthropic::Models::Beta::BetaWebSearchTool20260209, Anthropic::Models::Beta::BetaWebFetchTool20260209, Anthropic::Models::Beta::BetaWebFetchTool20260309, Anthropic::Models::Beta::BetaAdvisorTool20260301, Anthropic::Models::Beta::BetaToolSearchToolBm25_20251119, Anthropic::Models::Beta::BetaToolSearchToolRegex20251119, Anthropic::Models::Beta::BetaMCPToolset>, nil]
|
|
249
|
+
# @return [Array<Anthropic::Models::Beta::BetaTool, Anthropic::Models::Beta::BetaToolBash20241022, Anthropic::Models::Beta::BetaToolBash20250124, Anthropic::Models::Beta::BetaCodeExecutionTool20250522, Anthropic::Models::Beta::BetaCodeExecutionTool20250825, Anthropic::Models::Beta::BetaCodeExecutionTool20260120, Anthropic::Models::Beta::BetaCodeExecutionTool20260521, Anthropic::Models::Beta::BetaToolComputerUse20241022, Anthropic::Models::Beta::BetaMemoryTool20250818, Anthropic::Models::Beta::BetaToolComputerUse20250124, Anthropic::Models::Beta::BetaToolTextEditor20241022, Anthropic::Models::Beta::BetaToolComputerUse20251124, Anthropic::Models::Beta::BetaToolTextEditor20250124, Anthropic::Models::Beta::BetaToolTextEditor20250429, Anthropic::Models::Beta::BetaToolTextEditor20250728, Anthropic::Models::Beta::BetaWebSearchTool20250305, Anthropic::Models::Beta::BetaWebFetchTool20250910, Anthropic::Models::Beta::BetaWebSearchTool20260209, Anthropic::Models::Beta::BetaWebFetchTool20260209, Anthropic::Models::Beta::BetaWebFetchTool20260309, Anthropic::Models::Beta::BetaWebSearchTool20260318, Anthropic::Models::Beta::BetaWebFetchTool20260318, Anthropic::Models::Beta::BetaAdvisorTool20260301, Anthropic::Models::Beta::BetaToolSearchToolBm25_20251119, Anthropic::Models::Beta::BetaToolSearchToolRegex20251119, Anthropic::Models::Beta::BetaMCPToolset>, nil]
|
|
247
250
|
optional :tools,
|
|
248
251
|
-> { Anthropic::Internal::Type::ArrayOf[union: Anthropic::Beta::MessageCountTokensParams::Tool] }
|
|
249
252
|
|
|
@@ -253,7 +256,14 @@ module Anthropic
|
|
|
253
256
|
# @return [Array<String, Symbol, Anthropic::Models::AnthropicBeta>, nil]
|
|
254
257
|
optional :betas, -> { Anthropic::Internal::Type::ArrayOf[union: Anthropic::AnthropicBeta] }
|
|
255
258
|
|
|
256
|
-
# @!
|
|
259
|
+
# @!attribute user_profile_id
|
|
260
|
+
# The user profile ID to attribute this request to. Use when acting on behalf of a
|
|
261
|
+
# party other than your organization. Requires the `user-profiles` beta header.
|
|
262
|
+
#
|
|
263
|
+
# @return [String, nil]
|
|
264
|
+
optional :user_profile_id, String
|
|
265
|
+
|
|
266
|
+
# @!method initialize(messages:, model:, cache_control: nil, context_management: nil, mcp_servers: nil, output_config: nil, output_format: nil, speed: nil, system_: nil, thinking: nil, tool_choice: nil, tools: nil, betas: nil, user_profile_id: nil, request_options: {})
|
|
257
267
|
# Some parameter documentations has been truncated, see
|
|
258
268
|
# {Anthropic::Models::Beta::MessageCountTokensParams} for more details.
|
|
259
269
|
#
|
|
@@ -279,10 +289,12 @@ module Anthropic
|
|
|
279
289
|
#
|
|
280
290
|
# @param tool_choice [Anthropic::Models::Beta::BetaToolChoiceAuto, Anthropic::Models::Beta::BetaToolChoiceAny, Anthropic::Models::Beta::BetaToolChoiceTool, Anthropic::Models::Beta::BetaToolChoiceNone] How the model should use the provided tools. The model can use a specific tool,
|
|
281
291
|
#
|
|
282
|
-
# @param tools [Array<Anthropic::Models::Beta::BetaTool, Anthropic::Models::Beta::BetaToolBash20241022, Anthropic::Models::Beta::BetaToolBash20250124, Anthropic::Models::Beta::BetaCodeExecutionTool20250522, Anthropic::Models::Beta::BetaCodeExecutionTool20250825, Anthropic::Models::Beta::BetaCodeExecutionTool20260120, Anthropic::Models::Beta::BetaCodeExecutionTool20260521, Anthropic::Models::Beta::BetaToolComputerUse20241022, Anthropic::Models::Beta::BetaMemoryTool20250818, Anthropic::Models::Beta::BetaToolComputerUse20250124, Anthropic::Models::Beta::BetaToolTextEditor20241022, Anthropic::Models::Beta::BetaToolComputerUse20251124, Anthropic::Models::Beta::BetaToolTextEditor20250124, Anthropic::Models::Beta::BetaToolTextEditor20250429, Anthropic::Models::Beta::BetaToolTextEditor20250728, Anthropic::Models::Beta::BetaWebSearchTool20250305, Anthropic::Models::Beta::BetaWebFetchTool20250910, Anthropic::Models::Beta::BetaWebSearchTool20260209, Anthropic::Models::Beta::BetaWebFetchTool20260209, Anthropic::Models::Beta::BetaWebFetchTool20260309, Anthropic::Models::Beta::BetaAdvisorTool20260301, Anthropic::Models::Beta::BetaToolSearchToolBm25_20251119, Anthropic::Models::Beta::BetaToolSearchToolRegex20251119, Anthropic::Models::Beta::BetaMCPToolset>] Definitions of tools that the model may use.
|
|
292
|
+
# @param tools [Array<Anthropic::Models::Beta::BetaTool, Anthropic::Models::Beta::BetaToolBash20241022, Anthropic::Models::Beta::BetaToolBash20250124, Anthropic::Models::Beta::BetaCodeExecutionTool20250522, Anthropic::Models::Beta::BetaCodeExecutionTool20250825, Anthropic::Models::Beta::BetaCodeExecutionTool20260120, Anthropic::Models::Beta::BetaCodeExecutionTool20260521, Anthropic::Models::Beta::BetaToolComputerUse20241022, Anthropic::Models::Beta::BetaMemoryTool20250818, Anthropic::Models::Beta::BetaToolComputerUse20250124, Anthropic::Models::Beta::BetaToolTextEditor20241022, Anthropic::Models::Beta::BetaToolComputerUse20251124, Anthropic::Models::Beta::BetaToolTextEditor20250124, Anthropic::Models::Beta::BetaToolTextEditor20250429, Anthropic::Models::Beta::BetaToolTextEditor20250728, Anthropic::Models::Beta::BetaWebSearchTool20250305, Anthropic::Models::Beta::BetaWebFetchTool20250910, Anthropic::Models::Beta::BetaWebSearchTool20260209, Anthropic::Models::Beta::BetaWebFetchTool20260209, Anthropic::Models::Beta::BetaWebFetchTool20260309, Anthropic::Models::Beta::BetaWebSearchTool20260318, Anthropic::Models::Beta::BetaWebFetchTool20260318, Anthropic::Models::Beta::BetaAdvisorTool20260301, Anthropic::Models::Beta::BetaToolSearchToolBm25_20251119, Anthropic::Models::Beta::BetaToolSearchToolRegex20251119, Anthropic::Models::Beta::BetaMCPToolset>] Definitions of tools that the model may use.
|
|
283
293
|
#
|
|
284
294
|
# @param betas [Array<String, Symbol, Anthropic::Models::AnthropicBeta>] Optional header to specify the beta version(s) you want to use.
|
|
285
295
|
#
|
|
296
|
+
# @param user_profile_id [String] The user profile ID to attribute this request to. Use when acting on behalf of a
|
|
297
|
+
#
|
|
286
298
|
# @param request_options [Anthropic::RequestOptions, Hash{Symbol=>Object}]
|
|
287
299
|
|
|
288
300
|
# The inference speed mode for this request. `"fast"` enables high
|
|
@@ -301,7 +313,7 @@ module Anthropic
|
|
|
301
313
|
#
|
|
302
314
|
# A system prompt is a way of providing context and instructions to Claude, such
|
|
303
315
|
# as specifying a particular goal or role. See our
|
|
304
|
-
# [guide to system prompts](https://
|
|
316
|
+
# [guide to system prompts](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices#give-claude-a-role).
|
|
305
317
|
module System
|
|
306
318
|
extend Anthropic::Internal::Type::Union
|
|
307
319
|
|
|
@@ -366,6 +378,10 @@ module Anthropic
|
|
|
366
378
|
# Web fetch tool with use_cache parameter for bypassing cached content.
|
|
367
379
|
variant -> { Anthropic::Beta::BetaWebFetchTool20260309 }
|
|
368
380
|
|
|
381
|
+
variant -> { Anthropic::Beta::BetaWebSearchTool20260318 }
|
|
382
|
+
|
|
383
|
+
variant -> { Anthropic::Beta::BetaWebFetchTool20260318 }
|
|
384
|
+
|
|
369
385
|
variant -> { Anthropic::Beta::BetaAdvisorTool20260301 }
|
|
370
386
|
|
|
371
387
|
variant -> { Anthropic::Beta::BetaToolSearchToolBm25_20251119 }
|
|
@@ -379,7 +395,7 @@ module Anthropic
|
|
|
379
395
|
variant -> { Anthropic::Beta::BetaMCPToolset }
|
|
380
396
|
|
|
381
397
|
# @!method self.variants
|
|
382
|
-
# @return [Array(Anthropic::Models::Beta::BetaTool, Anthropic::Models::Beta::BetaToolBash20241022, Anthropic::Models::Beta::BetaToolBash20250124, Anthropic::Models::Beta::BetaCodeExecutionTool20250522, Anthropic::Models::Beta::BetaCodeExecutionTool20250825, Anthropic::Models::Beta::BetaCodeExecutionTool20260120, Anthropic::Models::Beta::BetaCodeExecutionTool20260521, Anthropic::Models::Beta::BetaToolComputerUse20241022, Anthropic::Models::Beta::BetaMemoryTool20250818, Anthropic::Models::Beta::BetaToolComputerUse20250124, Anthropic::Models::Beta::BetaToolTextEditor20241022, Anthropic::Models::Beta::BetaToolComputerUse20251124, Anthropic::Models::Beta::BetaToolTextEditor20250124, Anthropic::Models::Beta::BetaToolTextEditor20250429, Anthropic::Models::Beta::BetaToolTextEditor20250728, Anthropic::Models::Beta::BetaWebSearchTool20250305, Anthropic::Models::Beta::BetaWebFetchTool20250910, Anthropic::Models::Beta::BetaWebSearchTool20260209, Anthropic::Models::Beta::BetaWebFetchTool20260209, Anthropic::Models::Beta::BetaWebFetchTool20260309, Anthropic::Models::Beta::BetaAdvisorTool20260301, Anthropic::Models::Beta::BetaToolSearchToolBm25_20251119, Anthropic::Models::Beta::BetaToolSearchToolRegex20251119, Anthropic::Models::Beta::BetaMCPToolset)]
|
|
398
|
+
# @return [Array(Anthropic::Models::Beta::BetaTool, Anthropic::Models::Beta::BetaToolBash20241022, Anthropic::Models::Beta::BetaToolBash20250124, Anthropic::Models::Beta::BetaCodeExecutionTool20250522, Anthropic::Models::Beta::BetaCodeExecutionTool20250825, Anthropic::Models::Beta::BetaCodeExecutionTool20260120, Anthropic::Models::Beta::BetaCodeExecutionTool20260521, Anthropic::Models::Beta::BetaToolComputerUse20241022, Anthropic::Models::Beta::BetaMemoryTool20250818, Anthropic::Models::Beta::BetaToolComputerUse20250124, Anthropic::Models::Beta::BetaToolTextEditor20241022, Anthropic::Models::Beta::BetaToolComputerUse20251124, Anthropic::Models::Beta::BetaToolTextEditor20250124, Anthropic::Models::Beta::BetaToolTextEditor20250429, Anthropic::Models::Beta::BetaToolTextEditor20250728, Anthropic::Models::Beta::BetaWebSearchTool20250305, Anthropic::Models::Beta::BetaWebFetchTool20250910, Anthropic::Models::Beta::BetaWebSearchTool20260209, Anthropic::Models::Beta::BetaWebFetchTool20260209, Anthropic::Models::Beta::BetaWebFetchTool20260309, Anthropic::Models::Beta::BetaWebSearchTool20260318, Anthropic::Models::Beta::BetaWebFetchTool20260318, Anthropic::Models::Beta::BetaAdvisorTool20260301, Anthropic::Models::Beta::BetaToolSearchToolBm25_20251119, Anthropic::Models::Beta::BetaToolSearchToolRegex20251119, Anthropic::Models::Beta::BetaMCPToolset)]
|
|
383
399
|
end
|
|
384
400
|
end
|
|
385
401
|
end
|