anthropic 0.69.0__py3-none-any.whl → 0.71.0__py3-none-any.whl
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.
- anthropic/_version.py +1 -1
- anthropic/lib/__init__.py +1 -0
- anthropic/lib/_files.py +42 -0
- anthropic/pagination.py +117 -1
- anthropic/resources/beta/__init__.py +14 -0
- anthropic/resources/beta/beta.py +32 -0
- anthropic/resources/beta/messages/messages.py +140 -122
- anthropic/resources/beta/skills/__init__.py +33 -0
- anthropic/resources/beta/skills/skills.py +680 -0
- anthropic/resources/beta/skills/versions.py +658 -0
- anthropic/resources/completions.py +36 -42
- anthropic/resources/messages/messages.py +90 -96
- anthropic/types/anthropic_beta_param.py +3 -0
- anthropic/types/beta/__init__.py +9 -0
- anthropic/types/beta/beta_container.py +5 -0
- anthropic/types/beta/beta_container_params.py +18 -0
- anthropic/types/beta/beta_message.py +4 -1
- anthropic/types/beta/beta_raw_message_delta_event.py +1 -1
- anthropic/types/beta/beta_skill.py +18 -0
- anthropic/types/beta/beta_skill_params.py +18 -0
- anthropic/types/beta/beta_thinking_config_enabled_param.py +1 -1
- anthropic/types/beta/message_count_tokens_params.py +14 -10
- anthropic/types/beta/message_create_params.py +25 -19
- anthropic/types/beta/messages/batch_create_params.py +1 -0
- anthropic/types/beta/skill_create_params.py +31 -0
- anthropic/types/beta/skill_create_response.py +49 -0
- anthropic/types/beta/skill_delete_response.py +19 -0
- anthropic/types/beta/skill_list_params.py +38 -0
- anthropic/types/beta/skill_list_response.py +49 -0
- anthropic/types/beta/skill_retrieve_response.py +49 -0
- anthropic/types/beta/skills/__init__.py +10 -0
- anthropic/types/beta/skills/version_create_params.py +24 -0
- anthropic/types/beta/skills/version_create_response.py +49 -0
- anthropic/types/beta/skills/version_delete_response.py +19 -0
- anthropic/types/beta/skills/version_list_params.py +25 -0
- anthropic/types/beta/skills/version_list_response.py +49 -0
- anthropic/types/beta/skills/version_retrieve_response.py +49 -0
- anthropic/types/completion_create_params.py +5 -6
- anthropic/types/message_count_tokens_params.py +9 -9
- anthropic/types/message_create_params.py +13 -15
- anthropic/types/messages/batch_create_params.py +1 -0
- anthropic/types/model.py +2 -0
- anthropic/types/model_param.py +2 -0
- anthropic/types/stop_reason.py +1 -3
- anthropic/types/thinking_config_enabled_param.py +1 -1
- {anthropic-0.69.0.dist-info → anthropic-0.71.0.dist-info}/METADATA +1 -1
- {anthropic-0.69.0.dist-info → anthropic-0.71.0.dist-info}/RECORD +49 -29
- {anthropic-0.69.0.dist-info → anthropic-0.71.0.dist-info}/WHEEL +0 -0
- {anthropic-0.69.0.dist-info → anthropic-0.71.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -127,7 +127,7 @@ class Messages(SyncAPIResource):
|
|
|
127
127
|
only specifies the absolute maximum number of tokens to generate.
|
|
128
128
|
|
|
129
129
|
Different models have different maximum values for this parameter. See
|
|
130
|
-
[models](https://docs.
|
|
130
|
+
[models](https://docs.claude.com/en/docs/models-overview) for details.
|
|
131
131
|
|
|
132
132
|
messages: Input messages.
|
|
133
133
|
|
|
@@ -186,12 +186,12 @@ class Messages(SyncAPIResource):
|
|
|
186
186
|
{ "role": "user", "content": [{ "type": "text", "text": "Hello, Claude" }] }
|
|
187
187
|
```
|
|
188
188
|
|
|
189
|
-
See [input examples](https://docs.
|
|
189
|
+
See [input examples](https://docs.claude.com/en/api/messages-examples).
|
|
190
190
|
|
|
191
191
|
Note that if you want to include a
|
|
192
|
-
[system prompt](https://docs.
|
|
193
|
-
|
|
194
|
-
|
|
192
|
+
[system prompt](https://docs.claude.com/en/docs/system-prompts), you can use the
|
|
193
|
+
top-level `system` parameter — there is no `"system"` role for input messages in
|
|
194
|
+
the Messages API.
|
|
195
195
|
|
|
196
196
|
There is a limit of 100,000 messages in a single request.
|
|
197
197
|
|
|
@@ -205,7 +205,7 @@ class Messages(SyncAPIResource):
|
|
|
205
205
|
for this request.
|
|
206
206
|
|
|
207
207
|
Anthropic offers different levels of service for your API requests. See
|
|
208
|
-
[service-tiers](https://docs.
|
|
208
|
+
[service-tiers](https://docs.claude.com/en/api/service-tiers) for details.
|
|
209
209
|
|
|
210
210
|
stop_sequences: Custom text sequences that will cause the model to stop generating.
|
|
211
211
|
|
|
@@ -219,14 +219,13 @@ class Messages(SyncAPIResource):
|
|
|
219
219
|
|
|
220
220
|
stream: Whether to incrementally stream the response using server-sent events.
|
|
221
221
|
|
|
222
|
-
See [streaming](https://docs.
|
|
223
|
-
details.
|
|
222
|
+
See [streaming](https://docs.claude.com/en/api/messages-streaming) for details.
|
|
224
223
|
|
|
225
224
|
system: System prompt.
|
|
226
225
|
|
|
227
226
|
A system prompt is a way of providing context and instructions to Claude, such
|
|
228
227
|
as specifying a particular goal or role. See our
|
|
229
|
-
[guide to system prompts](https://docs.
|
|
228
|
+
[guide to system prompts](https://docs.claude.com/en/docs/system-prompts).
|
|
230
229
|
|
|
231
230
|
temperature: Amount of randomness injected into the response.
|
|
232
231
|
|
|
@@ -244,7 +243,7 @@ class Messages(SyncAPIResource):
|
|
|
244
243
|
tokens and counts towards your `max_tokens` limit.
|
|
245
244
|
|
|
246
245
|
See
|
|
247
|
-
[extended thinking](https://docs.
|
|
246
|
+
[extended thinking](https://docs.claude.com/en/docs/build-with-claude/extended-thinking)
|
|
248
247
|
for details.
|
|
249
248
|
|
|
250
249
|
tool_choice: How the model should use the provided tools. The model can use a specific tool,
|
|
@@ -259,9 +258,9 @@ class Messages(SyncAPIResource):
|
|
|
259
258
|
|
|
260
259
|
There are two types of tools: **client tools** and **server tools**. The
|
|
261
260
|
behavior described below applies to client tools. For
|
|
262
|
-
[server tools](https://docs.
|
|
261
|
+
[server tools](https://docs.claude.com/en/docs/agents-and-tools/tool-use/overview#server-tools),
|
|
263
262
|
see their individual documentation as each has its own behavior (e.g., the
|
|
264
|
-
[web search tool](https://docs.
|
|
263
|
+
[web search tool](https://docs.claude.com/en/docs/agents-and-tools/tool-use/web-search-tool)).
|
|
265
264
|
|
|
266
265
|
Each tool definition includes:
|
|
267
266
|
|
|
@@ -324,7 +323,7 @@ class Messages(SyncAPIResource):
|
|
|
324
323
|
functions, or more generally whenever you want the model to produce a particular
|
|
325
324
|
JSON structure of output.
|
|
326
325
|
|
|
327
|
-
See our [guide](https://docs.
|
|
326
|
+
See our [guide](https://docs.claude.com/en/docs/tool-use) for more details.
|
|
328
327
|
|
|
329
328
|
top_k: Only sample from the top K options for each subsequent token.
|
|
330
329
|
|
|
@@ -395,7 +394,7 @@ class Messages(SyncAPIResource):
|
|
|
395
394
|
only specifies the absolute maximum number of tokens to generate.
|
|
396
395
|
|
|
397
396
|
Different models have different maximum values for this parameter. See
|
|
398
|
-
[models](https://docs.
|
|
397
|
+
[models](https://docs.claude.com/en/docs/models-overview) for details.
|
|
399
398
|
|
|
400
399
|
messages: Input messages.
|
|
401
400
|
|
|
@@ -454,12 +453,12 @@ class Messages(SyncAPIResource):
|
|
|
454
453
|
{ "role": "user", "content": [{ "type": "text", "text": "Hello, Claude" }] }
|
|
455
454
|
```
|
|
456
455
|
|
|
457
|
-
See [input examples](https://docs.
|
|
456
|
+
See [input examples](https://docs.claude.com/en/api/messages-examples).
|
|
458
457
|
|
|
459
458
|
Note that if you want to include a
|
|
460
|
-
[system prompt](https://docs.
|
|
461
|
-
|
|
462
|
-
|
|
459
|
+
[system prompt](https://docs.claude.com/en/docs/system-prompts), you can use the
|
|
460
|
+
top-level `system` parameter — there is no `"system"` role for input messages in
|
|
461
|
+
the Messages API.
|
|
463
462
|
|
|
464
463
|
There is a limit of 100,000 messages in a single request.
|
|
465
464
|
|
|
@@ -469,8 +468,7 @@ class Messages(SyncAPIResource):
|
|
|
469
468
|
|
|
470
469
|
stream: Whether to incrementally stream the response using server-sent events.
|
|
471
470
|
|
|
472
|
-
See [streaming](https://docs.
|
|
473
|
-
details.
|
|
471
|
+
See [streaming](https://docs.claude.com/en/api/messages-streaming) for details.
|
|
474
472
|
|
|
475
473
|
metadata: An object describing metadata about the request.
|
|
476
474
|
|
|
@@ -478,7 +476,7 @@ class Messages(SyncAPIResource):
|
|
|
478
476
|
for this request.
|
|
479
477
|
|
|
480
478
|
Anthropic offers different levels of service for your API requests. See
|
|
481
|
-
[service-tiers](https://docs.
|
|
479
|
+
[service-tiers](https://docs.claude.com/en/api/service-tiers) for details.
|
|
482
480
|
|
|
483
481
|
stop_sequences: Custom text sequences that will cause the model to stop generating.
|
|
484
482
|
|
|
@@ -494,7 +492,7 @@ class Messages(SyncAPIResource):
|
|
|
494
492
|
|
|
495
493
|
A system prompt is a way of providing context and instructions to Claude, such
|
|
496
494
|
as specifying a particular goal or role. See our
|
|
497
|
-
[guide to system prompts](https://docs.
|
|
495
|
+
[guide to system prompts](https://docs.claude.com/en/docs/system-prompts).
|
|
498
496
|
|
|
499
497
|
temperature: Amount of randomness injected into the response.
|
|
500
498
|
|
|
@@ -512,7 +510,7 @@ class Messages(SyncAPIResource):
|
|
|
512
510
|
tokens and counts towards your `max_tokens` limit.
|
|
513
511
|
|
|
514
512
|
See
|
|
515
|
-
[extended thinking](https://docs.
|
|
513
|
+
[extended thinking](https://docs.claude.com/en/docs/build-with-claude/extended-thinking)
|
|
516
514
|
for details.
|
|
517
515
|
|
|
518
516
|
tool_choice: How the model should use the provided tools. The model can use a specific tool,
|
|
@@ -527,9 +525,9 @@ class Messages(SyncAPIResource):
|
|
|
527
525
|
|
|
528
526
|
There are two types of tools: **client tools** and **server tools**. The
|
|
529
527
|
behavior described below applies to client tools. For
|
|
530
|
-
[server tools](https://docs.
|
|
528
|
+
[server tools](https://docs.claude.com/en/docs/agents-and-tools/tool-use/overview#server-tools),
|
|
531
529
|
see their individual documentation as each has its own behavior (e.g., the
|
|
532
|
-
[web search tool](https://docs.
|
|
530
|
+
[web search tool](https://docs.claude.com/en/docs/agents-and-tools/tool-use/web-search-tool)).
|
|
533
531
|
|
|
534
532
|
Each tool definition includes:
|
|
535
533
|
|
|
@@ -592,7 +590,7 @@ class Messages(SyncAPIResource):
|
|
|
592
590
|
functions, or more generally whenever you want the model to produce a particular
|
|
593
591
|
JSON structure of output.
|
|
594
592
|
|
|
595
|
-
See our [guide](https://docs.
|
|
593
|
+
See our [guide](https://docs.claude.com/en/docs/tool-use) for more details.
|
|
596
594
|
|
|
597
595
|
top_k: Only sample from the top K options for each subsequent token.
|
|
598
596
|
|
|
@@ -663,7 +661,7 @@ class Messages(SyncAPIResource):
|
|
|
663
661
|
only specifies the absolute maximum number of tokens to generate.
|
|
664
662
|
|
|
665
663
|
Different models have different maximum values for this parameter. See
|
|
666
|
-
[models](https://docs.
|
|
664
|
+
[models](https://docs.claude.com/en/docs/models-overview) for details.
|
|
667
665
|
|
|
668
666
|
messages: Input messages.
|
|
669
667
|
|
|
@@ -722,12 +720,12 @@ class Messages(SyncAPIResource):
|
|
|
722
720
|
{ "role": "user", "content": [{ "type": "text", "text": "Hello, Claude" }] }
|
|
723
721
|
```
|
|
724
722
|
|
|
725
|
-
See [input examples](https://docs.
|
|
723
|
+
See [input examples](https://docs.claude.com/en/api/messages-examples).
|
|
726
724
|
|
|
727
725
|
Note that if you want to include a
|
|
728
|
-
[system prompt](https://docs.
|
|
729
|
-
|
|
730
|
-
|
|
726
|
+
[system prompt](https://docs.claude.com/en/docs/system-prompts), you can use the
|
|
727
|
+
top-level `system` parameter — there is no `"system"` role for input messages in
|
|
728
|
+
the Messages API.
|
|
731
729
|
|
|
732
730
|
There is a limit of 100,000 messages in a single request.
|
|
733
731
|
|
|
@@ -737,8 +735,7 @@ class Messages(SyncAPIResource):
|
|
|
737
735
|
|
|
738
736
|
stream: Whether to incrementally stream the response using server-sent events.
|
|
739
737
|
|
|
740
|
-
See [streaming](https://docs.
|
|
741
|
-
details.
|
|
738
|
+
See [streaming](https://docs.claude.com/en/api/messages-streaming) for details.
|
|
742
739
|
|
|
743
740
|
metadata: An object describing metadata about the request.
|
|
744
741
|
|
|
@@ -746,7 +743,7 @@ class Messages(SyncAPIResource):
|
|
|
746
743
|
for this request.
|
|
747
744
|
|
|
748
745
|
Anthropic offers different levels of service for your API requests. See
|
|
749
|
-
[service-tiers](https://docs.
|
|
746
|
+
[service-tiers](https://docs.claude.com/en/api/service-tiers) for details.
|
|
750
747
|
|
|
751
748
|
stop_sequences: Custom text sequences that will cause the model to stop generating.
|
|
752
749
|
|
|
@@ -762,7 +759,7 @@ class Messages(SyncAPIResource):
|
|
|
762
759
|
|
|
763
760
|
A system prompt is a way of providing context and instructions to Claude, such
|
|
764
761
|
as specifying a particular goal or role. See our
|
|
765
|
-
[guide to system prompts](https://docs.
|
|
762
|
+
[guide to system prompts](https://docs.claude.com/en/docs/system-prompts).
|
|
766
763
|
|
|
767
764
|
temperature: Amount of randomness injected into the response.
|
|
768
765
|
|
|
@@ -780,7 +777,7 @@ class Messages(SyncAPIResource):
|
|
|
780
777
|
tokens and counts towards your `max_tokens` limit.
|
|
781
778
|
|
|
782
779
|
See
|
|
783
|
-
[extended thinking](https://docs.
|
|
780
|
+
[extended thinking](https://docs.claude.com/en/docs/build-with-claude/extended-thinking)
|
|
784
781
|
for details.
|
|
785
782
|
|
|
786
783
|
tool_choice: How the model should use the provided tools. The model can use a specific tool,
|
|
@@ -795,9 +792,9 @@ class Messages(SyncAPIResource):
|
|
|
795
792
|
|
|
796
793
|
There are two types of tools: **client tools** and **server tools**. The
|
|
797
794
|
behavior described below applies to client tools. For
|
|
798
|
-
[server tools](https://docs.
|
|
795
|
+
[server tools](https://docs.claude.com/en/docs/agents-and-tools/tool-use/overview#server-tools),
|
|
799
796
|
see their individual documentation as each has its own behavior (e.g., the
|
|
800
|
-
[web search tool](https://docs.
|
|
797
|
+
[web search tool](https://docs.claude.com/en/docs/agents-and-tools/tool-use/web-search-tool)).
|
|
801
798
|
|
|
802
799
|
Each tool definition includes:
|
|
803
800
|
|
|
@@ -860,7 +857,7 @@ class Messages(SyncAPIResource):
|
|
|
860
857
|
functions, or more generally whenever you want the model to produce a particular
|
|
861
858
|
JSON structure of output.
|
|
862
859
|
|
|
863
|
-
See our [guide](https://docs.
|
|
860
|
+
See our [guide](https://docs.claude.com/en/docs/tool-use) for more details.
|
|
864
861
|
|
|
865
862
|
top_k: Only sample from the top K options for each subsequent token.
|
|
866
863
|
|
|
@@ -1109,12 +1106,12 @@ class Messages(SyncAPIResource):
|
|
|
1109
1106
|
{ "role": "user", "content": [{ "type": "text", "text": "Hello, Claude" }] }
|
|
1110
1107
|
```
|
|
1111
1108
|
|
|
1112
|
-
See [input examples](https://docs.
|
|
1109
|
+
See [input examples](https://docs.claude.com/en/api/messages-examples).
|
|
1113
1110
|
|
|
1114
1111
|
Note that if you want to include a
|
|
1115
|
-
[system prompt](https://docs.
|
|
1116
|
-
|
|
1117
|
-
|
|
1112
|
+
[system prompt](https://docs.claude.com/en/docs/system-prompts), you can use the
|
|
1113
|
+
top-level `system` parameter — there is no `"system"` role for input messages in
|
|
1114
|
+
the Messages API.
|
|
1118
1115
|
|
|
1119
1116
|
There is a limit of 100,000 messages in a single request.
|
|
1120
1117
|
|
|
@@ -1126,7 +1123,7 @@ class Messages(SyncAPIResource):
|
|
|
1126
1123
|
|
|
1127
1124
|
A system prompt is a way of providing context and instructions to Claude, such
|
|
1128
1125
|
as specifying a particular goal or role. See our
|
|
1129
|
-
[guide to system prompts](https://docs.
|
|
1126
|
+
[guide to system prompts](https://docs.claude.com/en/docs/system-prompts).
|
|
1130
1127
|
|
|
1131
1128
|
thinking: Configuration for enabling Claude's extended thinking.
|
|
1132
1129
|
|
|
@@ -1135,7 +1132,7 @@ class Messages(SyncAPIResource):
|
|
|
1135
1132
|
tokens and counts towards your `max_tokens` limit.
|
|
1136
1133
|
|
|
1137
1134
|
See
|
|
1138
|
-
[extended thinking](https://docs.
|
|
1135
|
+
[extended thinking](https://docs.claude.com/en/docs/build-with-claude/extended-thinking)
|
|
1139
1136
|
for details.
|
|
1140
1137
|
|
|
1141
1138
|
tool_choice: How the model should use the provided tools. The model can use a specific tool,
|
|
@@ -1150,9 +1147,9 @@ class Messages(SyncAPIResource):
|
|
|
1150
1147
|
|
|
1151
1148
|
There are two types of tools: **client tools** and **server tools**. The
|
|
1152
1149
|
behavior described below applies to client tools. For
|
|
1153
|
-
[server tools](https://docs.
|
|
1150
|
+
[server tools](https://docs.claude.com/en/docs/agents-and-tools/tool-use/overview#server-tools),
|
|
1154
1151
|
see their individual documentation as each has its own behavior (e.g., the
|
|
1155
|
-
[web search tool](https://docs.
|
|
1152
|
+
[web search tool](https://docs.claude.com/en/docs/agents-and-tools/tool-use/web-search-tool)).
|
|
1156
1153
|
|
|
1157
1154
|
Each tool definition includes:
|
|
1158
1155
|
|
|
@@ -1215,7 +1212,7 @@ class Messages(SyncAPIResource):
|
|
|
1215
1212
|
functions, or more generally whenever you want the model to produce a particular
|
|
1216
1213
|
JSON structure of output.
|
|
1217
1214
|
|
|
1218
|
-
See our [guide](https://docs.
|
|
1215
|
+
See our [guide](https://docs.claude.com/en/docs/tool-use) for more details.
|
|
1219
1216
|
|
|
1220
1217
|
extra_headers: Send extra headers
|
|
1221
1218
|
|
|
@@ -1310,7 +1307,7 @@ class AsyncMessages(AsyncAPIResource):
|
|
|
1310
1307
|
only specifies the absolute maximum number of tokens to generate.
|
|
1311
1308
|
|
|
1312
1309
|
Different models have different maximum values for this parameter. See
|
|
1313
|
-
[models](https://docs.
|
|
1310
|
+
[models](https://docs.claude.com/en/docs/models-overview) for details.
|
|
1314
1311
|
|
|
1315
1312
|
messages: Input messages.
|
|
1316
1313
|
|
|
@@ -1369,12 +1366,12 @@ class AsyncMessages(AsyncAPIResource):
|
|
|
1369
1366
|
{ "role": "user", "content": [{ "type": "text", "text": "Hello, Claude" }] }
|
|
1370
1367
|
```
|
|
1371
1368
|
|
|
1372
|
-
See [input examples](https://docs.
|
|
1369
|
+
See [input examples](https://docs.claude.com/en/api/messages-examples).
|
|
1373
1370
|
|
|
1374
1371
|
Note that if you want to include a
|
|
1375
|
-
[system prompt](https://docs.
|
|
1376
|
-
|
|
1377
|
-
|
|
1372
|
+
[system prompt](https://docs.claude.com/en/docs/system-prompts), you can use the
|
|
1373
|
+
top-level `system` parameter — there is no `"system"` role for input messages in
|
|
1374
|
+
the Messages API.
|
|
1378
1375
|
|
|
1379
1376
|
There is a limit of 100,000 messages in a single request.
|
|
1380
1377
|
|
|
@@ -1388,7 +1385,7 @@ class AsyncMessages(AsyncAPIResource):
|
|
|
1388
1385
|
for this request.
|
|
1389
1386
|
|
|
1390
1387
|
Anthropic offers different levels of service for your API requests. See
|
|
1391
|
-
[service-tiers](https://docs.
|
|
1388
|
+
[service-tiers](https://docs.claude.com/en/api/service-tiers) for details.
|
|
1392
1389
|
|
|
1393
1390
|
stop_sequences: Custom text sequences that will cause the model to stop generating.
|
|
1394
1391
|
|
|
@@ -1402,14 +1399,13 @@ class AsyncMessages(AsyncAPIResource):
|
|
|
1402
1399
|
|
|
1403
1400
|
stream: Whether to incrementally stream the response using server-sent events.
|
|
1404
1401
|
|
|
1405
|
-
See [streaming](https://docs.
|
|
1406
|
-
details.
|
|
1402
|
+
See [streaming](https://docs.claude.com/en/api/messages-streaming) for details.
|
|
1407
1403
|
|
|
1408
1404
|
system: System prompt.
|
|
1409
1405
|
|
|
1410
1406
|
A system prompt is a way of providing context and instructions to Claude, such
|
|
1411
1407
|
as specifying a particular goal or role. See our
|
|
1412
|
-
[guide to system prompts](https://docs.
|
|
1408
|
+
[guide to system prompts](https://docs.claude.com/en/docs/system-prompts).
|
|
1413
1409
|
|
|
1414
1410
|
temperature: Amount of randomness injected into the response.
|
|
1415
1411
|
|
|
@@ -1427,7 +1423,7 @@ class AsyncMessages(AsyncAPIResource):
|
|
|
1427
1423
|
tokens and counts towards your `max_tokens` limit.
|
|
1428
1424
|
|
|
1429
1425
|
See
|
|
1430
|
-
[extended thinking](https://docs.
|
|
1426
|
+
[extended thinking](https://docs.claude.com/en/docs/build-with-claude/extended-thinking)
|
|
1431
1427
|
for details.
|
|
1432
1428
|
|
|
1433
1429
|
tool_choice: How the model should use the provided tools. The model can use a specific tool,
|
|
@@ -1442,9 +1438,9 @@ class AsyncMessages(AsyncAPIResource):
|
|
|
1442
1438
|
|
|
1443
1439
|
There are two types of tools: **client tools** and **server tools**. The
|
|
1444
1440
|
behavior described below applies to client tools. For
|
|
1445
|
-
[server tools](https://docs.
|
|
1441
|
+
[server tools](https://docs.claude.com/en/docs/agents-and-tools/tool-use/overview#server-tools),
|
|
1446
1442
|
see their individual documentation as each has its own behavior (e.g., the
|
|
1447
|
-
[web search tool](https://docs.
|
|
1443
|
+
[web search tool](https://docs.claude.com/en/docs/agents-and-tools/tool-use/web-search-tool)).
|
|
1448
1444
|
|
|
1449
1445
|
Each tool definition includes:
|
|
1450
1446
|
|
|
@@ -1507,7 +1503,7 @@ class AsyncMessages(AsyncAPIResource):
|
|
|
1507
1503
|
functions, or more generally whenever you want the model to produce a particular
|
|
1508
1504
|
JSON structure of output.
|
|
1509
1505
|
|
|
1510
|
-
See our [guide](https://docs.
|
|
1506
|
+
See our [guide](https://docs.claude.com/en/docs/tool-use) for more details.
|
|
1511
1507
|
|
|
1512
1508
|
top_k: Only sample from the top K options for each subsequent token.
|
|
1513
1509
|
|
|
@@ -1578,7 +1574,7 @@ class AsyncMessages(AsyncAPIResource):
|
|
|
1578
1574
|
only specifies the absolute maximum number of tokens to generate.
|
|
1579
1575
|
|
|
1580
1576
|
Different models have different maximum values for this parameter. See
|
|
1581
|
-
[models](https://docs.
|
|
1577
|
+
[models](https://docs.claude.com/en/docs/models-overview) for details.
|
|
1582
1578
|
|
|
1583
1579
|
messages: Input messages.
|
|
1584
1580
|
|
|
@@ -1637,12 +1633,12 @@ class AsyncMessages(AsyncAPIResource):
|
|
|
1637
1633
|
{ "role": "user", "content": [{ "type": "text", "text": "Hello, Claude" }] }
|
|
1638
1634
|
```
|
|
1639
1635
|
|
|
1640
|
-
See [input examples](https://docs.
|
|
1636
|
+
See [input examples](https://docs.claude.com/en/api/messages-examples).
|
|
1641
1637
|
|
|
1642
1638
|
Note that if you want to include a
|
|
1643
|
-
[system prompt](https://docs.
|
|
1644
|
-
|
|
1645
|
-
|
|
1639
|
+
[system prompt](https://docs.claude.com/en/docs/system-prompts), you can use the
|
|
1640
|
+
top-level `system` parameter — there is no `"system"` role for input messages in
|
|
1641
|
+
the Messages API.
|
|
1646
1642
|
|
|
1647
1643
|
There is a limit of 100,000 messages in a single request.
|
|
1648
1644
|
|
|
@@ -1652,8 +1648,7 @@ class AsyncMessages(AsyncAPIResource):
|
|
|
1652
1648
|
|
|
1653
1649
|
stream: Whether to incrementally stream the response using server-sent events.
|
|
1654
1650
|
|
|
1655
|
-
See [streaming](https://docs.
|
|
1656
|
-
details.
|
|
1651
|
+
See [streaming](https://docs.claude.com/en/api/messages-streaming) for details.
|
|
1657
1652
|
|
|
1658
1653
|
metadata: An object describing metadata about the request.
|
|
1659
1654
|
|
|
@@ -1661,7 +1656,7 @@ class AsyncMessages(AsyncAPIResource):
|
|
|
1661
1656
|
for this request.
|
|
1662
1657
|
|
|
1663
1658
|
Anthropic offers different levels of service for your API requests. See
|
|
1664
|
-
[service-tiers](https://docs.
|
|
1659
|
+
[service-tiers](https://docs.claude.com/en/api/service-tiers) for details.
|
|
1665
1660
|
|
|
1666
1661
|
stop_sequences: Custom text sequences that will cause the model to stop generating.
|
|
1667
1662
|
|
|
@@ -1677,7 +1672,7 @@ class AsyncMessages(AsyncAPIResource):
|
|
|
1677
1672
|
|
|
1678
1673
|
A system prompt is a way of providing context and instructions to Claude, such
|
|
1679
1674
|
as specifying a particular goal or role. See our
|
|
1680
|
-
[guide to system prompts](https://docs.
|
|
1675
|
+
[guide to system prompts](https://docs.claude.com/en/docs/system-prompts).
|
|
1681
1676
|
|
|
1682
1677
|
temperature: Amount of randomness injected into the response.
|
|
1683
1678
|
|
|
@@ -1695,7 +1690,7 @@ class AsyncMessages(AsyncAPIResource):
|
|
|
1695
1690
|
tokens and counts towards your `max_tokens` limit.
|
|
1696
1691
|
|
|
1697
1692
|
See
|
|
1698
|
-
[extended thinking](https://docs.
|
|
1693
|
+
[extended thinking](https://docs.claude.com/en/docs/build-with-claude/extended-thinking)
|
|
1699
1694
|
for details.
|
|
1700
1695
|
|
|
1701
1696
|
tool_choice: How the model should use the provided tools. The model can use a specific tool,
|
|
@@ -1710,9 +1705,9 @@ class AsyncMessages(AsyncAPIResource):
|
|
|
1710
1705
|
|
|
1711
1706
|
There are two types of tools: **client tools** and **server tools**. The
|
|
1712
1707
|
behavior described below applies to client tools. For
|
|
1713
|
-
[server tools](https://docs.
|
|
1708
|
+
[server tools](https://docs.claude.com/en/docs/agents-and-tools/tool-use/overview#server-tools),
|
|
1714
1709
|
see their individual documentation as each has its own behavior (e.g., the
|
|
1715
|
-
[web search tool](https://docs.
|
|
1710
|
+
[web search tool](https://docs.claude.com/en/docs/agents-and-tools/tool-use/web-search-tool)).
|
|
1716
1711
|
|
|
1717
1712
|
Each tool definition includes:
|
|
1718
1713
|
|
|
@@ -1775,7 +1770,7 @@ class AsyncMessages(AsyncAPIResource):
|
|
|
1775
1770
|
functions, or more generally whenever you want the model to produce a particular
|
|
1776
1771
|
JSON structure of output.
|
|
1777
1772
|
|
|
1778
|
-
See our [guide](https://docs.
|
|
1773
|
+
See our [guide](https://docs.claude.com/en/docs/tool-use) for more details.
|
|
1779
1774
|
|
|
1780
1775
|
top_k: Only sample from the top K options for each subsequent token.
|
|
1781
1776
|
|
|
@@ -1846,7 +1841,7 @@ class AsyncMessages(AsyncAPIResource):
|
|
|
1846
1841
|
only specifies the absolute maximum number of tokens to generate.
|
|
1847
1842
|
|
|
1848
1843
|
Different models have different maximum values for this parameter. See
|
|
1849
|
-
[models](https://docs.
|
|
1844
|
+
[models](https://docs.claude.com/en/docs/models-overview) for details.
|
|
1850
1845
|
|
|
1851
1846
|
messages: Input messages.
|
|
1852
1847
|
|
|
@@ -1905,12 +1900,12 @@ class AsyncMessages(AsyncAPIResource):
|
|
|
1905
1900
|
{ "role": "user", "content": [{ "type": "text", "text": "Hello, Claude" }] }
|
|
1906
1901
|
```
|
|
1907
1902
|
|
|
1908
|
-
See [input examples](https://docs.
|
|
1903
|
+
See [input examples](https://docs.claude.com/en/api/messages-examples).
|
|
1909
1904
|
|
|
1910
1905
|
Note that if you want to include a
|
|
1911
|
-
[system prompt](https://docs.
|
|
1912
|
-
|
|
1913
|
-
|
|
1906
|
+
[system prompt](https://docs.claude.com/en/docs/system-prompts), you can use the
|
|
1907
|
+
top-level `system` parameter — there is no `"system"` role for input messages in
|
|
1908
|
+
the Messages API.
|
|
1914
1909
|
|
|
1915
1910
|
There is a limit of 100,000 messages in a single request.
|
|
1916
1911
|
|
|
@@ -1920,8 +1915,7 @@ class AsyncMessages(AsyncAPIResource):
|
|
|
1920
1915
|
|
|
1921
1916
|
stream: Whether to incrementally stream the response using server-sent events.
|
|
1922
1917
|
|
|
1923
|
-
See [streaming](https://docs.
|
|
1924
|
-
details.
|
|
1918
|
+
See [streaming](https://docs.claude.com/en/api/messages-streaming) for details.
|
|
1925
1919
|
|
|
1926
1920
|
metadata: An object describing metadata about the request.
|
|
1927
1921
|
|
|
@@ -1929,7 +1923,7 @@ class AsyncMessages(AsyncAPIResource):
|
|
|
1929
1923
|
for this request.
|
|
1930
1924
|
|
|
1931
1925
|
Anthropic offers different levels of service for your API requests. See
|
|
1932
|
-
[service-tiers](https://docs.
|
|
1926
|
+
[service-tiers](https://docs.claude.com/en/api/service-tiers) for details.
|
|
1933
1927
|
|
|
1934
1928
|
stop_sequences: Custom text sequences that will cause the model to stop generating.
|
|
1935
1929
|
|
|
@@ -1945,7 +1939,7 @@ class AsyncMessages(AsyncAPIResource):
|
|
|
1945
1939
|
|
|
1946
1940
|
A system prompt is a way of providing context and instructions to Claude, such
|
|
1947
1941
|
as specifying a particular goal or role. See our
|
|
1948
|
-
[guide to system prompts](https://docs.
|
|
1942
|
+
[guide to system prompts](https://docs.claude.com/en/docs/system-prompts).
|
|
1949
1943
|
|
|
1950
1944
|
temperature: Amount of randomness injected into the response.
|
|
1951
1945
|
|
|
@@ -1963,7 +1957,7 @@ class AsyncMessages(AsyncAPIResource):
|
|
|
1963
1957
|
tokens and counts towards your `max_tokens` limit.
|
|
1964
1958
|
|
|
1965
1959
|
See
|
|
1966
|
-
[extended thinking](https://docs.
|
|
1960
|
+
[extended thinking](https://docs.claude.com/en/docs/build-with-claude/extended-thinking)
|
|
1967
1961
|
for details.
|
|
1968
1962
|
|
|
1969
1963
|
tool_choice: How the model should use the provided tools. The model can use a specific tool,
|
|
@@ -1978,9 +1972,9 @@ class AsyncMessages(AsyncAPIResource):
|
|
|
1978
1972
|
|
|
1979
1973
|
There are two types of tools: **client tools** and **server tools**. The
|
|
1980
1974
|
behavior described below applies to client tools. For
|
|
1981
|
-
[server tools](https://docs.
|
|
1975
|
+
[server tools](https://docs.claude.com/en/docs/agents-and-tools/tool-use/overview#server-tools),
|
|
1982
1976
|
see their individual documentation as each has its own behavior (e.g., the
|
|
1983
|
-
[web search tool](https://docs.
|
|
1977
|
+
[web search tool](https://docs.claude.com/en/docs/agents-and-tools/tool-use/web-search-tool)).
|
|
1984
1978
|
|
|
1985
1979
|
Each tool definition includes:
|
|
1986
1980
|
|
|
@@ -2043,7 +2037,7 @@ class AsyncMessages(AsyncAPIResource):
|
|
|
2043
2037
|
functions, or more generally whenever you want the model to produce a particular
|
|
2044
2038
|
JSON structure of output.
|
|
2045
2039
|
|
|
2046
|
-
See our [guide](https://docs.
|
|
2040
|
+
See our [guide](https://docs.claude.com/en/docs/tool-use) for more details.
|
|
2047
2041
|
|
|
2048
2042
|
top_k: Only sample from the top K options for each subsequent token.
|
|
2049
2043
|
|
|
@@ -2291,12 +2285,12 @@ class AsyncMessages(AsyncAPIResource):
|
|
|
2291
2285
|
{ "role": "user", "content": [{ "type": "text", "text": "Hello, Claude" }] }
|
|
2292
2286
|
```
|
|
2293
2287
|
|
|
2294
|
-
See [input examples](https://docs.
|
|
2288
|
+
See [input examples](https://docs.claude.com/en/api/messages-examples).
|
|
2295
2289
|
|
|
2296
2290
|
Note that if you want to include a
|
|
2297
|
-
[system prompt](https://docs.
|
|
2298
|
-
|
|
2299
|
-
|
|
2291
|
+
[system prompt](https://docs.claude.com/en/docs/system-prompts), you can use the
|
|
2292
|
+
top-level `system` parameter — there is no `"system"` role for input messages in
|
|
2293
|
+
the Messages API.
|
|
2300
2294
|
|
|
2301
2295
|
There is a limit of 100,000 messages in a single request.
|
|
2302
2296
|
|
|
@@ -2308,7 +2302,7 @@ class AsyncMessages(AsyncAPIResource):
|
|
|
2308
2302
|
|
|
2309
2303
|
A system prompt is a way of providing context and instructions to Claude, such
|
|
2310
2304
|
as specifying a particular goal or role. See our
|
|
2311
|
-
[guide to system prompts](https://docs.
|
|
2305
|
+
[guide to system prompts](https://docs.claude.com/en/docs/system-prompts).
|
|
2312
2306
|
|
|
2313
2307
|
thinking: Configuration for enabling Claude's extended thinking.
|
|
2314
2308
|
|
|
@@ -2317,7 +2311,7 @@ class AsyncMessages(AsyncAPIResource):
|
|
|
2317
2311
|
tokens and counts towards your `max_tokens` limit.
|
|
2318
2312
|
|
|
2319
2313
|
See
|
|
2320
|
-
[extended thinking](https://docs.
|
|
2314
|
+
[extended thinking](https://docs.claude.com/en/docs/build-with-claude/extended-thinking)
|
|
2321
2315
|
for details.
|
|
2322
2316
|
|
|
2323
2317
|
tool_choice: How the model should use the provided tools. The model can use a specific tool,
|
|
@@ -2332,9 +2326,9 @@ class AsyncMessages(AsyncAPIResource):
|
|
|
2332
2326
|
|
|
2333
2327
|
There are two types of tools: **client tools** and **server tools**. The
|
|
2334
2328
|
behavior described below applies to client tools. For
|
|
2335
|
-
[server tools](https://docs.
|
|
2329
|
+
[server tools](https://docs.claude.com/en/docs/agents-and-tools/tool-use/overview#server-tools),
|
|
2336
2330
|
see their individual documentation as each has its own behavior (e.g., the
|
|
2337
|
-
[web search tool](https://docs.
|
|
2331
|
+
[web search tool](https://docs.claude.com/en/docs/agents-and-tools/tool-use/web-search-tool)).
|
|
2338
2332
|
|
|
2339
2333
|
Each tool definition includes:
|
|
2340
2334
|
|
|
@@ -2397,7 +2391,7 @@ class AsyncMessages(AsyncAPIResource):
|
|
|
2397
2391
|
functions, or more generally whenever you want the model to produce a particular
|
|
2398
2392
|
JSON structure of output.
|
|
2399
2393
|
|
|
2400
|
-
See our [guide](https://docs.
|
|
2394
|
+
See our [guide](https://docs.claude.com/en/docs/tool-use) for more details.
|
|
2401
2395
|
|
|
2402
2396
|
extra_headers: Send extra headers
|
|
2403
2397
|
|
anthropic/types/beta/__init__.py
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
+
from .beta_skill import BetaSkill as BetaSkill
|
|
5
6
|
from .beta_usage import BetaUsage as BetaUsage
|
|
6
7
|
from .beta_message import BetaMessage as BetaMessage
|
|
7
8
|
from .deleted_file import DeletedFile as DeletedFile
|
|
@@ -13,7 +14,9 @@ from .beta_text_delta import BetaTextDelta as BetaTextDelta
|
|
|
13
14
|
from .beta_tool_param import BetaToolParam as BetaToolParam
|
|
14
15
|
from .beta_stop_reason import BetaStopReason as BetaStopReason
|
|
15
16
|
from .file_list_params import FileListParams as FileListParams
|
|
17
|
+
from .beta_skill_params import BetaSkillParams as BetaSkillParams
|
|
16
18
|
from .model_list_params import ModelListParams as ModelListParams
|
|
19
|
+
from .skill_list_params import SkillListParams as SkillListParams
|
|
17
20
|
from .beta_content_block import BetaContentBlock as BetaContentBlock
|
|
18
21
|
from .beta_message_param import BetaMessageParam as BetaMessageParam
|
|
19
22
|
from .beta_text_citation import BetaTextCitation as BetaTextCitation
|
|
@@ -24,20 +27,26 @@ from .beta_metadata_param import BetaMetadataParam as BetaMetadataParam
|
|
|
24
27
|
from .beta_thinking_block import BetaThinkingBlock as BetaThinkingBlock
|
|
25
28
|
from .beta_thinking_delta import BetaThinkingDelta as BetaThinkingDelta
|
|
26
29
|
from .beta_tool_use_block import BetaToolUseBlock as BetaToolUseBlock
|
|
30
|
+
from .skill_create_params import SkillCreateParams as SkillCreateParams
|
|
31
|
+
from .skill_list_response import SkillListResponse as SkillListResponse
|
|
27
32
|
from .beta_citation_config import BetaCitationConfig as BetaCitationConfig
|
|
28
33
|
from .beta_citations_delta import BetaCitationsDelta as BetaCitationsDelta
|
|
29
34
|
from .beta_signature_delta import BetaSignatureDelta as BetaSignatureDelta
|
|
30
35
|
from .beta_web_fetch_block import BetaWebFetchBlock as BetaWebFetchBlock
|
|
36
|
+
from .beta_container_params import BetaContainerParams as BetaContainerParams
|
|
31
37
|
from .beta_input_json_delta import BetaInputJSONDelta as BetaInputJSONDelta
|
|
32
38
|
from .beta_text_block_param import BetaTextBlockParam as BetaTextBlockParam
|
|
33
39
|
from .beta_tool_union_param import BetaToolUnionParam as BetaToolUnionParam
|
|
34
40
|
from .message_create_params import MessageCreateParams as MessageCreateParams
|
|
41
|
+
from .skill_create_response import SkillCreateResponse as SkillCreateResponse
|
|
42
|
+
from .skill_delete_response import SkillDeleteResponse as SkillDeleteResponse
|
|
35
43
|
from .beta_base64_pdf_source import BetaBase64PDFSource as BetaBase64PDFSource
|
|
36
44
|
from .beta_image_block_param import BetaImageBlockParam as BetaImageBlockParam
|
|
37
45
|
from .beta_plain_text_source import BetaPlainTextSource as BetaPlainTextSource
|
|
38
46
|
from .beta_server_tool_usage import BetaServerToolUsage as BetaServerToolUsage
|
|
39
47
|
from .beta_tool_choice_param import BetaToolChoiceParam as BetaToolChoiceParam
|
|
40
48
|
from .beta_mcp_tool_use_block import BetaMCPToolUseBlock as BetaMCPToolUseBlock
|
|
49
|
+
from .skill_retrieve_response import SkillRetrieveResponse as SkillRetrieveResponse
|
|
41
50
|
from .beta_content_block_param import BetaContentBlockParam as BetaContentBlockParam
|
|
42
51
|
from .beta_message_delta_usage import BetaMessageDeltaUsage as BetaMessageDeltaUsage
|
|
43
52
|
from .beta_text_citation_param import BetaTextCitationParam as BetaTextCitationParam
|