anthropic 1.11.0 → 1.12.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 +8 -0
- data/README.md +1 -1
- data/lib/anthropic/internal/page_cursor.rb +92 -0
- data/lib/anthropic/internal/token_page.rb +92 -0
- data/lib/anthropic/models/anthropic_beta.rb +3 -0
- data/lib/anthropic/models/beta/beta_clear_tool_uses_20250919_edit_response.rb +0 -2
- data/lib/anthropic/models/beta/beta_container.rb +9 -1
- data/lib/anthropic/models/beta/beta_container_params.rb +34 -0
- data/lib/anthropic/models/beta/beta_context_management_config.rb +0 -2
- data/lib/anthropic/models/beta/beta_context_management_response.rb +0 -2
- data/lib/anthropic/models/beta/beta_message.rb +4 -2
- data/lib/anthropic/models/beta/beta_raw_message_delta_event.rb +2 -2
- data/lib/anthropic/models/beta/beta_skill.rb +51 -0
- data/lib/anthropic/models/beta/beta_skill_params.rb +51 -0
- 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/message_count_tokens_params.rb +15 -12
- data/lib/anthropic/models/beta/message_create_params.rb +34 -18
- data/lib/anthropic/models/beta/messages/batch_create_params.rb +39 -20
- data/lib/anthropic/models/beta/skill_create_params.rb +49 -0
- data/lib/anthropic/models/beta/skill_create_response.rb +84 -0
- data/lib/anthropic/models/beta/skill_delete_params.rb +24 -0
- data/lib/anthropic/models/beta/skill_delete_response.rb +34 -0
- data/lib/anthropic/models/beta/skill_list_params.rb +61 -0
- data/lib/anthropic/models/beta/skill_list_response.rb +84 -0
- data/lib/anthropic/models/beta/skill_retrieve_params.rb +24 -0
- data/lib/anthropic/models/beta/skill_retrieve_response.rb +84 -0
- data/lib/anthropic/models/beta/skills/version_create_params.rb +42 -0
- data/lib/anthropic/models/beta/skills/version_create_response.rb +92 -0
- data/lib/anthropic/models/beta/skills/version_delete_params.rb +39 -0
- data/lib/anthropic/models/beta/skills/version_delete_response.rb +36 -0
- data/lib/anthropic/models/beta/skills/version_list_params.rb +47 -0
- data/lib/anthropic/models/beta/skills/version_list_response.rb +92 -0
- data/lib/anthropic/models/beta/skills/version_retrieve_params.rb +39 -0
- data/lib/anthropic/models/beta/skills/version_retrieve_response.rb +92 -0
- data/lib/anthropic/models/completion_create_params.rb +3 -4
- data/lib/anthropic/models/message_count_tokens_params.rb +10 -10
- data/lib/anthropic/models/message_create_params.rb +13 -13
- data/lib/anthropic/models/messages/batch_create_params.rb +14 -15
- data/lib/anthropic/models/stop_reason.rb +0 -1
- data/lib/anthropic/models/thinking_config_enabled.rb +1 -1
- data/lib/anthropic/models/thinking_config_param.rb +1 -1
- data/lib/anthropic/resources/beta/messages.rb +5 -5
- data/lib/anthropic/resources/beta/skills/versions.rb +154 -0
- data/lib/anthropic/resources/beta/skills.rb +144 -0
- data/lib/anthropic/resources/beta.rb +4 -0
- data/lib/anthropic/resources/completions.rb +4 -4
- data/lib/anthropic/version.rb +1 -1
- data/lib/anthropic.rb +23 -0
- data/rbi/anthropic/internal/page_cursor.rbi +25 -0
- data/rbi/anthropic/internal/token_page.rbi +25 -0
- data/rbi/anthropic/models/anthropic_beta.rbi +2 -0
- data/rbi/anthropic/models/beta/beta_clear_tool_uses_20250919_edit_response.rbi +0 -1
- data/rbi/anthropic/models/beta/beta_container.rbi +23 -3
- data/rbi/anthropic/models/beta/beta_container_params.rbi +54 -0
- data/rbi/anthropic/models/beta/beta_context_management_config.rbi +0 -1
- data/rbi/anthropic/models/beta/beta_context_management_response.rbi +0 -1
- data/rbi/anthropic/models/beta/beta_message.rbi +6 -2
- data/rbi/anthropic/models/beta/beta_raw_message_delta_event.rbi +2 -2
- data/rbi/anthropic/models/beta/beta_skill.rbi +80 -0
- data/rbi/anthropic/models/beta/beta_skill_params.rbi +91 -0
- 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/message_count_tokens_params.rbi +27 -21
- data/rbi/anthropic/models/beta/message_create_params.rbi +61 -29
- data/rbi/anthropic/models/beta/messages/batch_create_params.rbi +70 -33
- data/rbi/anthropic/models/beta/skill_create_params.rbi +90 -0
- data/rbi/anthropic/models/beta/skill_create_response.rbi +118 -0
- data/rbi/anthropic/models/beta/skill_delete_params.rbi +62 -0
- data/rbi/anthropic/models/beta/skill_delete_response.rbi +46 -0
- data/rbi/anthropic/models/beta/skill_list_params.rbi +109 -0
- data/rbi/anthropic/models/beta/skill_list_response.rbi +118 -0
- data/rbi/anthropic/models/beta/skill_retrieve_params.rbi +62 -0
- data/rbi/anthropic/models/beta/skill_retrieve_response.rbi +118 -0
- data/rbi/anthropic/models/beta/skills/version_create_params.rbi +79 -0
- data/rbi/anthropic/models/beta/skills/version_create_response.rbi +124 -0
- data/rbi/anthropic/models/beta/skills/version_delete_params.rbi +77 -0
- data/rbi/anthropic/models/beta/skills/version_delete_response.rbi +48 -0
- data/rbi/anthropic/models/beta/skills/version_list_params.rbi +85 -0
- data/rbi/anthropic/models/beta/skills/version_list_response.rbi +124 -0
- data/rbi/anthropic/models/beta/skills/version_retrieve_params.rbi +77 -0
- data/rbi/anthropic/models/beta/skills/version_retrieve_response.rbi +124 -0
- data/rbi/anthropic/models/completion_create_params.rbi +6 -8
- data/rbi/anthropic/models/message_count_tokens_params.rbi +19 -19
- data/rbi/anthropic/models/message_create_params.rbi +24 -24
- data/rbi/anthropic/models/messages/batch_create_params.rbi +26 -28
- data/rbi/anthropic/models/stop_reason.rbi +0 -5
- data/rbi/anthropic/models/thinking_config_enabled.rbi +2 -2
- data/rbi/anthropic/models/thinking_config_param.rbi +1 -1
- data/rbi/anthropic/resources/beta/messages.rbi +51 -36
- data/rbi/anthropic/resources/beta/skills/versions.rbi +124 -0
- data/rbi/anthropic/resources/beta/skills.rbi +118 -0
- data/rbi/anthropic/resources/beta.rbi +3 -0
- data/rbi/anthropic/resources/completions.rbi +10 -12
- data/rbi/anthropic/resources/messages.rbi +31 -31
- data/sig/anthropic/internal/page_cursor.rbs +15 -0
- data/sig/anthropic/internal/token_page.rbs +15 -0
- data/sig/anthropic/models/anthropic_beta.rbs +2 -0
- data/sig/anthropic/models/beta/beta_container.rbs +18 -3
- data/sig/anthropic/models/beta/beta_container_params.rbs +26 -0
- data/sig/anthropic/models/beta/beta_skill.rbs +45 -0
- data/sig/anthropic/models/beta/beta_skill_params.rbs +47 -0
- data/sig/anthropic/models/beta/message_create_params.rbs +12 -4
- data/sig/anthropic/models/beta/messages/batch_create_params.rbs +12 -4
- data/sig/anthropic/models/beta/skill_create_params.rbs +42 -0
- data/sig/anthropic/models/beta/skill_create_response.rbs +52 -0
- data/sig/anthropic/models/beta/skill_delete_params.rbs +30 -0
- data/sig/anthropic/models/beta/skill_delete_response.rbs +17 -0
- data/sig/anthropic/models/beta/skill_list_params.rbs +49 -0
- data/sig/anthropic/models/beta/skill_list_response.rbs +52 -0
- data/sig/anthropic/models/beta/skill_retrieve_params.rbs +30 -0
- data/sig/anthropic/models/beta/skill_retrieve_response.rbs +52 -0
- data/sig/anthropic/models/beta/skills/version_create_params.rbs +39 -0
- data/sig/anthropic/models/beta/skills/version_create_response.rbs +59 -0
- data/sig/anthropic/models/beta/skills/version_delete_params.rbs +39 -0
- data/sig/anthropic/models/beta/skills/version_delete_response.rbs +19 -0
- data/sig/anthropic/models/beta/skills/version_list_params.rbs +44 -0
- data/sig/anthropic/models/beta/skills/version_list_response.rbs +59 -0
- data/sig/anthropic/models/beta/skills/version_retrieve_params.rbs +39 -0
- data/sig/anthropic/models/beta/skills/version_retrieve_response.rbs +59 -0
- data/sig/anthropic/models/stop_reason.rbs +0 -2
- data/sig/anthropic/resources/beta/messages.rbs +2 -2
- data/sig/anthropic/resources/beta/skills/versions.rbs +40 -0
- data/sig/anthropic/resources/beta/skills.rbs +38 -0
- data/sig/anthropic/resources/beta.rbs +2 -0
- metadata +71 -2
@@ -21,7 +21,10 @@ module Anthropic
|
|
21
21
|
max_tokens: Integer,
|
22
22
|
messages: T::Array[Anthropic::Beta::BetaMessageParam::OrHash],
|
23
23
|
model: T.any(Anthropic::Model::OrSymbol, String),
|
24
|
-
container:
|
24
|
+
container:
|
25
|
+
T.nilable(
|
26
|
+
T.any(Anthropic::Beta::BetaContainerParams::OrHash, String)
|
27
|
+
),
|
25
28
|
context_management:
|
26
29
|
T.nilable(Anthropic::Beta::BetaContextManagementConfig::OrHash),
|
27
30
|
mcp_servers:
|
@@ -79,7 +82,7 @@ module Anthropic
|
|
79
82
|
# only specifies the absolute maximum number of tokens to generate.
|
80
83
|
#
|
81
84
|
# Different models have different maximum values for this parameter. See
|
82
|
-
# [models](https://docs.
|
85
|
+
# [models](https://docs.claude.com/en/docs/models-overview) for details.
|
83
86
|
max_tokens:,
|
84
87
|
# Body param: Input messages.
|
85
88
|
#
|
@@ -138,12 +141,12 @@ module Anthropic
|
|
138
141
|
# { "role": "user", "content": [{ "type": "text", "text": "Hello, Claude" }] }
|
139
142
|
# ```
|
140
143
|
#
|
141
|
-
# See [input examples](https://docs.
|
144
|
+
# See [input examples](https://docs.claude.com/en/api/messages-examples).
|
142
145
|
#
|
143
146
|
# Note that if you want to include a
|
144
|
-
# [system prompt](https://docs.
|
145
|
-
#
|
146
|
-
#
|
147
|
+
# [system prompt](https://docs.claude.com/en/docs/system-prompts), you can use the
|
148
|
+
# top-level `system` parameter — there is no `"system"` role for input messages in
|
149
|
+
# the Messages API.
|
147
150
|
#
|
148
151
|
# There is a limit of 100,000 messages in a single request.
|
149
152
|
messages:,
|
@@ -153,7 +156,10 @@ module Anthropic
|
|
153
156
|
model:,
|
154
157
|
# Body param: Container identifier for reuse across requests.
|
155
158
|
container: nil,
|
156
|
-
# Body param:
|
159
|
+
# Body param: Context management configuration.
|
160
|
+
#
|
161
|
+
# This allows you to control how Claude manages context across multiple requests,
|
162
|
+
# such as whether to clear function results or not.
|
157
163
|
context_management: nil,
|
158
164
|
# Body param: MCP servers to be utilized in this request
|
159
165
|
mcp_servers: nil,
|
@@ -163,7 +169,7 @@ module Anthropic
|
|
163
169
|
# standard capacity for this request.
|
164
170
|
#
|
165
171
|
# Anthropic offers different levels of service for your API requests. See
|
166
|
-
# [service-tiers](https://docs.
|
172
|
+
# [service-tiers](https://docs.claude.com/en/api/service-tiers) for details.
|
167
173
|
service_tier: nil,
|
168
174
|
# Body param: Custom text sequences that will cause the model to stop generating.
|
169
175
|
#
|
@@ -179,7 +185,7 @@ module Anthropic
|
|
179
185
|
#
|
180
186
|
# A system prompt is a way of providing context and instructions to Claude, such
|
181
187
|
# as specifying a particular goal or role. See our
|
182
|
-
# [guide to system prompts](https://docs.
|
188
|
+
# [guide to system prompts](https://docs.claude.com/en/docs/system-prompts).
|
183
189
|
system_: nil,
|
184
190
|
# Body param: Amount of randomness injected into the response.
|
185
191
|
#
|
@@ -197,7 +203,7 @@ module Anthropic
|
|
197
203
|
# tokens and counts towards your `max_tokens` limit.
|
198
204
|
#
|
199
205
|
# See
|
200
|
-
# [extended thinking](https://docs.
|
206
|
+
# [extended thinking](https://docs.claude.com/en/docs/build-with-claude/extended-thinking)
|
201
207
|
# for details.
|
202
208
|
thinking: nil,
|
203
209
|
# Body param: How the model should use the provided tools. The model can use a
|
@@ -212,9 +218,9 @@ module Anthropic
|
|
212
218
|
#
|
213
219
|
# There are two types of tools: **client tools** and **server tools**. The
|
214
220
|
# behavior described below applies to client tools. For
|
215
|
-
# [server tools](https://docs.
|
221
|
+
# [server tools](https://docs.claude.com/en/docs/agents-and-tools/tool-use/overview#server-tools),
|
216
222
|
# see their individual documentation as each has its own behavior (e.g., the
|
217
|
-
# [web search tool](https://docs.
|
223
|
+
# [web search tool](https://docs.claude.com/en/docs/agents-and-tools/tool-use/web-search-tool)).
|
218
224
|
#
|
219
225
|
# Each tool definition includes:
|
220
226
|
#
|
@@ -277,7 +283,7 @@ module Anthropic
|
|
277
283
|
# functions, or more generally whenever you want the model to produce a particular
|
278
284
|
# JSON structure of output.
|
279
285
|
#
|
280
|
-
# See our [guide](https://docs.
|
286
|
+
# See our [guide](https://docs.claude.com/en/docs/tool-use) for more details.
|
281
287
|
tools: nil,
|
282
288
|
# Body param: Only sample from the top K options for each subsequent token.
|
283
289
|
#
|
@@ -320,7 +326,10 @@ module Anthropic
|
|
320
326
|
max_tokens: Integer,
|
321
327
|
messages: T::Array[Anthropic::Beta::BetaMessageParam::OrHash],
|
322
328
|
model: T.any(Anthropic::Model::OrSymbol, String),
|
323
|
-
container:
|
329
|
+
container:
|
330
|
+
T.nilable(
|
331
|
+
T.any(Anthropic::Beta::BetaContainerParams::OrHash, String)
|
332
|
+
),
|
324
333
|
context_management:
|
325
334
|
T.nilable(Anthropic::Beta::BetaContextManagementConfig::OrHash),
|
326
335
|
mcp_servers:
|
@@ -382,7 +391,7 @@ module Anthropic
|
|
382
391
|
# only specifies the absolute maximum number of tokens to generate.
|
383
392
|
#
|
384
393
|
# Different models have different maximum values for this parameter. See
|
385
|
-
# [models](https://docs.
|
394
|
+
# [models](https://docs.claude.com/en/docs/models-overview) for details.
|
386
395
|
max_tokens:,
|
387
396
|
# Body param: Input messages.
|
388
397
|
#
|
@@ -441,12 +450,12 @@ module Anthropic
|
|
441
450
|
# { "role": "user", "content": [{ "type": "text", "text": "Hello, Claude" }] }
|
442
451
|
# ```
|
443
452
|
#
|
444
|
-
# See [input examples](https://docs.
|
453
|
+
# See [input examples](https://docs.claude.com/en/api/messages-examples).
|
445
454
|
#
|
446
455
|
# Note that if you want to include a
|
447
|
-
# [system prompt](https://docs.
|
448
|
-
#
|
449
|
-
#
|
456
|
+
# [system prompt](https://docs.claude.com/en/docs/system-prompts), you can use the
|
457
|
+
# top-level `system` parameter — there is no `"system"` role for input messages in
|
458
|
+
# the Messages API.
|
450
459
|
#
|
451
460
|
# There is a limit of 100,000 messages in a single request.
|
452
461
|
messages:,
|
@@ -456,7 +465,10 @@ module Anthropic
|
|
456
465
|
model:,
|
457
466
|
# Body param: Container identifier for reuse across requests.
|
458
467
|
container: nil,
|
459
|
-
# Body param:
|
468
|
+
# Body param: Context management configuration.
|
469
|
+
#
|
470
|
+
# This allows you to control how Claude manages context across multiple requests,
|
471
|
+
# such as whether to clear function results or not.
|
460
472
|
context_management: nil,
|
461
473
|
# Body param: MCP servers to be utilized in this request
|
462
474
|
mcp_servers: nil,
|
@@ -466,7 +478,7 @@ module Anthropic
|
|
466
478
|
# standard capacity for this request.
|
467
479
|
#
|
468
480
|
# Anthropic offers different levels of service for your API requests. See
|
469
|
-
# [service-tiers](https://docs.
|
481
|
+
# [service-tiers](https://docs.claude.com/en/api/service-tiers) for details.
|
470
482
|
service_tier: nil,
|
471
483
|
# Body param: Custom text sequences that will cause the model to stop generating.
|
472
484
|
#
|
@@ -482,7 +494,7 @@ module Anthropic
|
|
482
494
|
#
|
483
495
|
# A system prompt is a way of providing context and instructions to Claude, such
|
484
496
|
# as specifying a particular goal or role. See our
|
485
|
-
# [guide to system prompts](https://docs.
|
497
|
+
# [guide to system prompts](https://docs.claude.com/en/docs/system-prompts).
|
486
498
|
system_: nil,
|
487
499
|
# Body param: Amount of randomness injected into the response.
|
488
500
|
#
|
@@ -500,7 +512,7 @@ module Anthropic
|
|
500
512
|
# tokens and counts towards your `max_tokens` limit.
|
501
513
|
#
|
502
514
|
# See
|
503
|
-
# [extended thinking](https://docs.
|
515
|
+
# [extended thinking](https://docs.claude.com/en/docs/build-with-claude/extended-thinking)
|
504
516
|
# for details.
|
505
517
|
thinking: nil,
|
506
518
|
# Body param: How the model should use the provided tools. The model can use a
|
@@ -515,9 +527,9 @@ module Anthropic
|
|
515
527
|
#
|
516
528
|
# There are two types of tools: **client tools** and **server tools**. The
|
517
529
|
# behavior described below applies to client tools. For
|
518
|
-
# [server tools](https://docs.
|
530
|
+
# [server tools](https://docs.claude.com/en/docs/agents-and-tools/tool-use/overview#server-tools),
|
519
531
|
# see their individual documentation as each has its own behavior (e.g., the
|
520
|
-
# [web search tool](https://docs.
|
532
|
+
# [web search tool](https://docs.claude.com/en/docs/agents-and-tools/tool-use/web-search-tool)).
|
521
533
|
#
|
522
534
|
# Each tool definition includes:
|
523
535
|
#
|
@@ -580,7 +592,7 @@ module Anthropic
|
|
580
592
|
# functions, or more generally whenever you want the model to produce a particular
|
581
593
|
# JSON structure of output.
|
582
594
|
#
|
583
|
-
# See our [guide](https://docs.
|
595
|
+
# See our [guide](https://docs.claude.com/en/docs/tool-use) for more details.
|
584
596
|
tools: nil,
|
585
597
|
# Body param: Only sample from the top K options for each subsequent token.
|
586
598
|
#
|
@@ -721,12 +733,12 @@ module Anthropic
|
|
721
733
|
# { "role": "user", "content": [{ "type": "text", "text": "Hello, Claude" }] }
|
722
734
|
# ```
|
723
735
|
#
|
724
|
-
# See [input examples](https://docs.
|
736
|
+
# See [input examples](https://docs.claude.com/en/api/messages-examples).
|
725
737
|
#
|
726
738
|
# Note that if you want to include a
|
727
|
-
# [system prompt](https://docs.
|
728
|
-
#
|
729
|
-
#
|
739
|
+
# [system prompt](https://docs.claude.com/en/docs/system-prompts), you can use the
|
740
|
+
# top-level `system` parameter — there is no `"system"` role for input messages in
|
741
|
+
# the Messages API.
|
730
742
|
#
|
731
743
|
# There is a limit of 100,000 messages in a single request.
|
732
744
|
messages:,
|
@@ -734,7 +746,10 @@ module Anthropic
|
|
734
746
|
# [models](https://docs.anthropic.com/en/docs/models-overview) for additional
|
735
747
|
# details and options.
|
736
748
|
model:,
|
737
|
-
# Body param:
|
749
|
+
# Body param: Context management configuration.
|
750
|
+
#
|
751
|
+
# This allows you to control how Claude manages context across multiple requests,
|
752
|
+
# such as whether to clear function results or not.
|
738
753
|
context_management: nil,
|
739
754
|
# Body param: MCP servers to be utilized in this request
|
740
755
|
mcp_servers: nil,
|
@@ -742,7 +757,7 @@ module Anthropic
|
|
742
757
|
#
|
743
758
|
# A system prompt is a way of providing context and instructions to Claude, such
|
744
759
|
# as specifying a particular goal or role. See our
|
745
|
-
# [guide to system prompts](https://docs.
|
760
|
+
# [guide to system prompts](https://docs.claude.com/en/docs/system-prompts).
|
746
761
|
system_: nil,
|
747
762
|
# Body param: Configuration for enabling Claude's extended thinking.
|
748
763
|
#
|
@@ -751,7 +766,7 @@ module Anthropic
|
|
751
766
|
# tokens and counts towards your `max_tokens` limit.
|
752
767
|
#
|
753
768
|
# See
|
754
|
-
# [extended thinking](https://docs.
|
769
|
+
# [extended thinking](https://docs.claude.com/en/docs/build-with-claude/extended-thinking)
|
755
770
|
# for details.
|
756
771
|
thinking: nil,
|
757
772
|
# Body param: How the model should use the provided tools. The model can use a
|
@@ -766,9 +781,9 @@ module Anthropic
|
|
766
781
|
#
|
767
782
|
# There are two types of tools: **client tools** and **server tools**. The
|
768
783
|
# behavior described below applies to client tools. For
|
769
|
-
# [server tools](https://docs.
|
784
|
+
# [server tools](https://docs.claude.com/en/docs/agents-and-tools/tool-use/overview#server-tools),
|
770
785
|
# see their individual documentation as each has its own behavior (e.g., the
|
771
|
-
# [web search tool](https://docs.
|
786
|
+
# [web search tool](https://docs.claude.com/en/docs/agents-and-tools/tool-use/web-search-tool)).
|
772
787
|
#
|
773
788
|
# Each tool definition includes:
|
774
789
|
#
|
@@ -831,7 +846,7 @@ module Anthropic
|
|
831
846
|
# functions, or more generally whenever you want the model to produce a particular
|
832
847
|
# JSON structure of output.
|
833
848
|
#
|
834
|
-
# See our [guide](https://docs.
|
849
|
+
# See our [guide](https://docs.claude.com/en/docs/tool-use) for more details.
|
835
850
|
tools: nil,
|
836
851
|
# Header param: Optional header to specify the beta version(s) you want to use.
|
837
852
|
betas: nil,
|
@@ -0,0 +1,124 @@
|
|
1
|
+
# typed: strong
|
2
|
+
|
3
|
+
module Anthropic
|
4
|
+
module Resources
|
5
|
+
class Beta
|
6
|
+
class Skills
|
7
|
+
class Versions
|
8
|
+
# Create Skill Version
|
9
|
+
sig do
|
10
|
+
params(
|
11
|
+
skill_id: String,
|
12
|
+
files: T.nilable(T::Array[Anthropic::Internal::FileInput]),
|
13
|
+
betas:
|
14
|
+
T::Array[T.any(String, Anthropic::AnthropicBeta::OrSymbol)],
|
15
|
+
request_options: Anthropic::RequestOptions::OrHash
|
16
|
+
).returns(Anthropic::Models::Beta::Skills::VersionCreateResponse)
|
17
|
+
end
|
18
|
+
def create(
|
19
|
+
# Path param: Unique identifier for the skill.
|
20
|
+
#
|
21
|
+
# The format and length of IDs may change over time.
|
22
|
+
skill_id,
|
23
|
+
# Body param: Files to upload for the skill.
|
24
|
+
#
|
25
|
+
# All files must be in the same top-level directory and must include a SKILL.md
|
26
|
+
# file at the root of that directory.
|
27
|
+
files: nil,
|
28
|
+
# Header param: Optional header to specify the beta version(s) you want to use.
|
29
|
+
betas: nil,
|
30
|
+
request_options: {}
|
31
|
+
)
|
32
|
+
end
|
33
|
+
|
34
|
+
# Get Skill Version
|
35
|
+
sig do
|
36
|
+
params(
|
37
|
+
version: String,
|
38
|
+
skill_id: String,
|
39
|
+
betas:
|
40
|
+
T::Array[T.any(String, Anthropic::AnthropicBeta::OrSymbol)],
|
41
|
+
request_options: Anthropic::RequestOptions::OrHash
|
42
|
+
).returns(Anthropic::Models::Beta::Skills::VersionRetrieveResponse)
|
43
|
+
end
|
44
|
+
def retrieve(
|
45
|
+
# Path param: Version identifier for the skill.
|
46
|
+
#
|
47
|
+
# Each version is identified by a Unix epoch timestamp (e.g., "1759178010641129").
|
48
|
+
version,
|
49
|
+
# Path param: Unique identifier for the skill.
|
50
|
+
#
|
51
|
+
# The format and length of IDs may change over time.
|
52
|
+
skill_id:,
|
53
|
+
# Header param: Optional header to specify the beta version(s) you want to use.
|
54
|
+
betas: nil,
|
55
|
+
request_options: {}
|
56
|
+
)
|
57
|
+
end
|
58
|
+
|
59
|
+
# List Skill Versions
|
60
|
+
sig do
|
61
|
+
params(
|
62
|
+
skill_id: String,
|
63
|
+
limit: T.nilable(Integer),
|
64
|
+
page: T.nilable(String),
|
65
|
+
betas:
|
66
|
+
T::Array[T.any(String, Anthropic::AnthropicBeta::OrSymbol)],
|
67
|
+
request_options: Anthropic::RequestOptions::OrHash
|
68
|
+
).returns(
|
69
|
+
Anthropic::Internal::PageCursor[
|
70
|
+
Anthropic::Models::Beta::Skills::VersionListResponse
|
71
|
+
]
|
72
|
+
)
|
73
|
+
end
|
74
|
+
def list(
|
75
|
+
# Path param: Unique identifier for the skill.
|
76
|
+
#
|
77
|
+
# The format and length of IDs may change over time.
|
78
|
+
skill_id,
|
79
|
+
# Query param: Number of items to return per page.
|
80
|
+
#
|
81
|
+
# Defaults to `20`. Ranges from `1` to `1000`.
|
82
|
+
limit: nil,
|
83
|
+
# Query param: Optionally set to the `next_page` token from the previous response.
|
84
|
+
page: nil,
|
85
|
+
# Header param: Optional header to specify the beta version(s) you want to use.
|
86
|
+
betas: nil,
|
87
|
+
request_options: {}
|
88
|
+
)
|
89
|
+
end
|
90
|
+
|
91
|
+
# Delete Skill Version
|
92
|
+
sig do
|
93
|
+
params(
|
94
|
+
version: String,
|
95
|
+
skill_id: String,
|
96
|
+
betas:
|
97
|
+
T::Array[T.any(String, Anthropic::AnthropicBeta::OrSymbol)],
|
98
|
+
request_options: Anthropic::RequestOptions::OrHash
|
99
|
+
).returns(Anthropic::Models::Beta::Skills::VersionDeleteResponse)
|
100
|
+
end
|
101
|
+
def delete(
|
102
|
+
# Path param: Version identifier for the skill.
|
103
|
+
#
|
104
|
+
# Each version is identified by a Unix epoch timestamp (e.g., "1759178010641129").
|
105
|
+
version,
|
106
|
+
# Path param: Unique identifier for the skill.
|
107
|
+
#
|
108
|
+
# The format and length of IDs may change over time.
|
109
|
+
skill_id:,
|
110
|
+
# Header param: Optional header to specify the beta version(s) you want to use.
|
111
|
+
betas: nil,
|
112
|
+
request_options: {}
|
113
|
+
)
|
114
|
+
end
|
115
|
+
|
116
|
+
# @api private
|
117
|
+
sig { params(client: Anthropic::Client).returns(T.attached_class) }
|
118
|
+
def self.new(client:)
|
119
|
+
end
|
120
|
+
end
|
121
|
+
end
|
122
|
+
end
|
123
|
+
end
|
124
|
+
end
|
@@ -0,0 +1,118 @@
|
|
1
|
+
# typed: strong
|
2
|
+
|
3
|
+
module Anthropic
|
4
|
+
module Resources
|
5
|
+
class Beta
|
6
|
+
class Skills
|
7
|
+
sig { returns(Anthropic::Resources::Beta::Skills::Versions) }
|
8
|
+
attr_reader :versions
|
9
|
+
|
10
|
+
# Create Skill
|
11
|
+
sig do
|
12
|
+
params(
|
13
|
+
display_title: T.nilable(String),
|
14
|
+
files: T.nilable(T::Array[Anthropic::Internal::FileInput]),
|
15
|
+
betas: T::Array[T.any(String, Anthropic::AnthropicBeta::OrSymbol)],
|
16
|
+
request_options: Anthropic::RequestOptions::OrHash
|
17
|
+
).returns(Anthropic::Models::Beta::SkillCreateResponse)
|
18
|
+
end
|
19
|
+
def create(
|
20
|
+
# Body param: Display title for the skill.
|
21
|
+
#
|
22
|
+
# This is a human-readable label that is not included in the prompt sent to the
|
23
|
+
# model.
|
24
|
+
display_title: nil,
|
25
|
+
# Body param: Files to upload for the skill.
|
26
|
+
#
|
27
|
+
# All files must be in the same top-level directory and must include a SKILL.md
|
28
|
+
# file at the root of that directory.
|
29
|
+
files: nil,
|
30
|
+
# Header param: Optional header to specify the beta version(s) you want to use.
|
31
|
+
betas: nil,
|
32
|
+
request_options: {}
|
33
|
+
)
|
34
|
+
end
|
35
|
+
|
36
|
+
# Get Skill
|
37
|
+
sig do
|
38
|
+
params(
|
39
|
+
skill_id: String,
|
40
|
+
betas: T::Array[T.any(String, Anthropic::AnthropicBeta::OrSymbol)],
|
41
|
+
request_options: Anthropic::RequestOptions::OrHash
|
42
|
+
).returns(Anthropic::Models::Beta::SkillRetrieveResponse)
|
43
|
+
end
|
44
|
+
def retrieve(
|
45
|
+
# Unique identifier for the skill.
|
46
|
+
#
|
47
|
+
# The format and length of IDs may change over time.
|
48
|
+
skill_id,
|
49
|
+
# Optional header to specify the beta version(s) you want to use.
|
50
|
+
betas: nil,
|
51
|
+
request_options: {}
|
52
|
+
)
|
53
|
+
end
|
54
|
+
|
55
|
+
# List Skills
|
56
|
+
sig do
|
57
|
+
params(
|
58
|
+
limit: Integer,
|
59
|
+
page: T.nilable(String),
|
60
|
+
source: T.nilable(String),
|
61
|
+
betas: T::Array[T.any(String, Anthropic::AnthropicBeta::OrSymbol)],
|
62
|
+
request_options: Anthropic::RequestOptions::OrHash
|
63
|
+
).returns(
|
64
|
+
Anthropic::Internal::PageCursor[
|
65
|
+
Anthropic::Models::Beta::SkillListResponse
|
66
|
+
]
|
67
|
+
)
|
68
|
+
end
|
69
|
+
def list(
|
70
|
+
# Query param: Number of results to return per page.
|
71
|
+
#
|
72
|
+
# Maximum value is 100. Defaults to 20.
|
73
|
+
limit: nil,
|
74
|
+
# Query param: Pagination token for fetching a specific page of results.
|
75
|
+
#
|
76
|
+
# Pass the value from a previous response's `next_page` field to get the next page
|
77
|
+
# of results.
|
78
|
+
page: nil,
|
79
|
+
# Query param: Filter skills by source.
|
80
|
+
#
|
81
|
+
# If provided, only skills from the specified source will be returned:
|
82
|
+
#
|
83
|
+
# - `"custom"`: only return user-created skills
|
84
|
+
# - `"anthropic"`: only return Anthropic-created skills
|
85
|
+
source: nil,
|
86
|
+
# Header param: Optional header to specify the beta version(s) you want to use.
|
87
|
+
betas: nil,
|
88
|
+
request_options: {}
|
89
|
+
)
|
90
|
+
end
|
91
|
+
|
92
|
+
# Delete Skill
|
93
|
+
sig do
|
94
|
+
params(
|
95
|
+
skill_id: String,
|
96
|
+
betas: T::Array[T.any(String, Anthropic::AnthropicBeta::OrSymbol)],
|
97
|
+
request_options: Anthropic::RequestOptions::OrHash
|
98
|
+
).returns(Anthropic::Models::Beta::SkillDeleteResponse)
|
99
|
+
end
|
100
|
+
def delete(
|
101
|
+
# Unique identifier for the skill.
|
102
|
+
#
|
103
|
+
# The format and length of IDs may change over time.
|
104
|
+
skill_id,
|
105
|
+
# Optional header to specify the beta version(s) you want to use.
|
106
|
+
betas: nil,
|
107
|
+
request_options: {}
|
108
|
+
)
|
109
|
+
end
|
110
|
+
|
111
|
+
# @api private
|
112
|
+
sig { params(client: Anthropic::Client).returns(T.attached_class) }
|
113
|
+
def self.new(client:)
|
114
|
+
end
|
115
|
+
end
|
116
|
+
end
|
117
|
+
end
|
118
|
+
end
|
@@ -12,6 +12,9 @@ module Anthropic
|
|
12
12
|
sig { returns(Anthropic::Resources::Beta::Files) }
|
13
13
|
attr_reader :files
|
14
14
|
|
15
|
+
sig { returns(Anthropic::Resources::Beta::Skills) }
|
16
|
+
attr_reader :skills
|
17
|
+
|
15
18
|
# @api private
|
16
19
|
sig { params(client: Anthropic::Client).returns(T.attached_class) }
|
17
20
|
def self.new(client:)
|
@@ -9,10 +9,10 @@ module Anthropic
|
|
9
9
|
# [Legacy] Create a Text Completion.
|
10
10
|
#
|
11
11
|
# The Text Completions API is a legacy API. We recommend using the
|
12
|
-
# [Messages API](https://docs.
|
12
|
+
# [Messages API](https://docs.claude.com/en/api/messages) going forward.
|
13
13
|
#
|
14
14
|
# Future models and features will not be compatible with Text Completions. See our
|
15
|
-
# [migration guide](https://docs.
|
15
|
+
# [migration guide](https://docs.claude.com/en/api/migrating-from-text-completions-to-messages)
|
16
16
|
# for guidance in migrating from Text Completions to Messages.
|
17
17
|
sig do
|
18
18
|
params(
|
@@ -48,10 +48,9 @@ module Anthropic
|
|
48
48
|
# "\n\nHuman: {userQuestion}\n\nAssistant:"
|
49
49
|
# ```
|
50
50
|
#
|
51
|
-
# See [prompt validation](https://docs.
|
52
|
-
# our guide to
|
53
|
-
#
|
54
|
-
# details.
|
51
|
+
# See [prompt validation](https://docs.claude.com/en/api/prompt-validation) and
|
52
|
+
# our guide to [prompt design](https://docs.claude.com/en/docs/intro-to-prompting)
|
53
|
+
# for more details.
|
55
54
|
prompt:,
|
56
55
|
# Body param: An object describing metadata about the request.
|
57
56
|
metadata: nil,
|
@@ -102,10 +101,10 @@ module Anthropic
|
|
102
101
|
# [Legacy] Create a Text Completion.
|
103
102
|
#
|
104
103
|
# The Text Completions API is a legacy API. We recommend using the
|
105
|
-
# [Messages API](https://docs.
|
104
|
+
# [Messages API](https://docs.claude.com/en/api/messages) going forward.
|
106
105
|
#
|
107
106
|
# Future models and features will not be compatible with Text Completions. See our
|
108
|
-
# [migration guide](https://docs.
|
107
|
+
# [migration guide](https://docs.claude.com/en/api/migrating-from-text-completions-to-messages)
|
109
108
|
# for guidance in migrating from Text Completions to Messages.
|
110
109
|
sig do
|
111
110
|
params(
|
@@ -141,10 +140,9 @@ module Anthropic
|
|
141
140
|
# "\n\nHuman: {userQuestion}\n\nAssistant:"
|
142
141
|
# ```
|
143
142
|
#
|
144
|
-
# See [prompt validation](https://docs.
|
145
|
-
# our guide to
|
146
|
-
#
|
147
|
-
# details.
|
143
|
+
# See [prompt validation](https://docs.claude.com/en/api/prompt-validation) and
|
144
|
+
# our guide to [prompt design](https://docs.claude.com/en/docs/intro-to-prompting)
|
145
|
+
# for more details.
|
148
146
|
prompt:,
|
149
147
|
# Body param: An object describing metadata about the request.
|
150
148
|
metadata: nil,
|