anthropic 0.70.0__py3-none-any.whl → 0.71.1__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/_base_client.py +6 -2
- 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 +92 -98
- anthropic/types/anthropic_beta_param.py +1 -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 +0 -3
- anthropic/types/model_param.py +0 -3
- anthropic/types/stop_reason.py +1 -3
- anthropic/types/thinking_config_enabled_param.py +1 -1
- {anthropic-0.70.0.dist-info → anthropic-0.71.1.dist-info}/METADATA +2 -2
- {anthropic-0.70.0.dist-info → anthropic-0.71.1.dist-info}/RECORD +50 -30
- {anthropic-0.70.0.dist-info → anthropic-0.71.1.dist-info}/WHEEL +0 -0
- {anthropic-0.70.0.dist-info → anthropic-0.71.1.dist-info}/licenses/LICENSE +0 -0
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
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
+
from typing import List, Optional
|
|
3
4
|
from datetime import datetime
|
|
4
5
|
|
|
5
6
|
from ..._models import BaseModel
|
|
7
|
+
from .beta_skill import BetaSkill
|
|
6
8
|
|
|
7
9
|
__all__ = ["BetaContainer"]
|
|
8
10
|
|
|
@@ -13,3 +15,6 @@ class BetaContainer(BaseModel):
|
|
|
13
15
|
|
|
14
16
|
expires_at: datetime
|
|
15
17
|
"""The time at which the container will expire."""
|
|
18
|
+
|
|
19
|
+
skills: Optional[List[BetaSkill]] = None
|
|
20
|
+
"""Skills loaded in the container"""
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import Iterable, Optional
|
|
6
|
+
from typing_extensions import TypedDict
|
|
7
|
+
|
|
8
|
+
from .beta_skill_params import BetaSkillParams
|
|
9
|
+
|
|
10
|
+
__all__ = ["BetaContainerParams"]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class BetaContainerParams(TypedDict, total=False):
|
|
14
|
+
id: Optional[str]
|
|
15
|
+
"""Container id"""
|
|
16
|
+
|
|
17
|
+
skills: Optional[Iterable[BetaSkillParams]]
|
|
18
|
+
"""List of skills to load in the container"""
|
|
@@ -63,7 +63,10 @@ class BetaMessage(BaseModel):
|
|
|
63
63
|
"""
|
|
64
64
|
|
|
65
65
|
context_management: Optional[BetaContextManagementResponse] = None
|
|
66
|
-
"""
|
|
66
|
+
"""Context management response.
|
|
67
|
+
|
|
68
|
+
Information about context management strategies applied during the request.
|
|
69
|
+
"""
|
|
67
70
|
|
|
68
71
|
model: Model
|
|
69
72
|
"""
|
|
@@ -26,7 +26,7 @@ class Delta(BaseModel):
|
|
|
26
26
|
|
|
27
27
|
class BetaRawMessageDeltaEvent(BaseModel):
|
|
28
28
|
context_management: Optional[BetaContextManagementResponse] = None
|
|
29
|
-
"""Information about context management
|
|
29
|
+
"""Information about context management strategies applied during the request"""
|
|
30
30
|
|
|
31
31
|
delta: Delta
|
|
32
32
|
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing_extensions import Literal
|
|
4
|
+
|
|
5
|
+
from ..._models import BaseModel
|
|
6
|
+
|
|
7
|
+
__all__ = ["BetaSkill"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class BetaSkill(BaseModel):
|
|
11
|
+
skill_id: str
|
|
12
|
+
"""Skill ID"""
|
|
13
|
+
|
|
14
|
+
type: Literal["anthropic", "custom"]
|
|
15
|
+
"""Type of skill - either 'anthropic' (built-in) or 'custom' (user-defined)"""
|
|
16
|
+
|
|
17
|
+
version: str
|
|
18
|
+
"""Skill version or 'latest' for most recent version"""
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing_extensions import Literal, Required, TypedDict
|
|
6
|
+
|
|
7
|
+
__all__ = ["BetaSkillParams"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class BetaSkillParams(TypedDict, total=False):
|
|
11
|
+
skill_id: Required[str]
|
|
12
|
+
"""Skill ID"""
|
|
13
|
+
|
|
14
|
+
type: Required[Literal["anthropic", "custom"]]
|
|
15
|
+
"""Type of skill - either 'anthropic' (built-in) or 'custom' (user-defined)"""
|
|
16
|
+
|
|
17
|
+
version: str
|
|
18
|
+
"""Skill version or 'latest' for most recent version"""
|
|
@@ -17,7 +17,7 @@ class BetaThinkingConfigEnabledParam(TypedDict, total=False):
|
|
|
17
17
|
Must be ≥1024 and less than `max_tokens`.
|
|
18
18
|
|
|
19
19
|
See
|
|
20
|
-
[extended thinking](https://docs.
|
|
20
|
+
[extended thinking](https://docs.claude.com/en/docs/build-with-claude/extended-thinking)
|
|
21
21
|
for details.
|
|
22
22
|
"""
|
|
23
23
|
|
|
@@ -91,12 +91,12 @@ class MessageCountTokensParams(TypedDict, total=False):
|
|
|
91
91
|
{ "role": "user", "content": [{ "type": "text", "text": "Hello, Claude" }] }
|
|
92
92
|
```
|
|
93
93
|
|
|
94
|
-
See [input examples](https://docs.
|
|
94
|
+
See [input examples](https://docs.claude.com/en/api/messages-examples).
|
|
95
95
|
|
|
96
96
|
Note that if you want to include a
|
|
97
|
-
[system prompt](https://docs.
|
|
98
|
-
|
|
99
|
-
|
|
97
|
+
[system prompt](https://docs.claude.com/en/docs/system-prompts), you can use the
|
|
98
|
+
top-level `system` parameter — there is no `"system"` role for input messages in
|
|
99
|
+
the Messages API.
|
|
100
100
|
|
|
101
101
|
There is a limit of 100,000 messages in a single request.
|
|
102
102
|
"""
|
|
@@ -109,7 +109,11 @@ class MessageCountTokensParams(TypedDict, total=False):
|
|
|
109
109
|
"""
|
|
110
110
|
|
|
111
111
|
context_management: Optional[BetaContextManagementConfigParam]
|
|
112
|
-
"""
|
|
112
|
+
"""Context management configuration.
|
|
113
|
+
|
|
114
|
+
This allows you to control how Claude manages context across multiple requests,
|
|
115
|
+
such as whether to clear function results or not.
|
|
116
|
+
"""
|
|
113
117
|
|
|
114
118
|
mcp_servers: Iterable[BetaRequestMCPServerURLDefinitionParam]
|
|
115
119
|
"""MCP servers to be utilized in this request"""
|
|
@@ -119,7 +123,7 @@ class MessageCountTokensParams(TypedDict, total=False):
|
|
|
119
123
|
|
|
120
124
|
A system prompt is a way of providing context and instructions to Claude, such
|
|
121
125
|
as specifying a particular goal or role. See our
|
|
122
|
-
[guide to system prompts](https://docs.
|
|
126
|
+
[guide to system prompts](https://docs.claude.com/en/docs/system-prompts).
|
|
123
127
|
"""
|
|
124
128
|
|
|
125
129
|
thinking: BetaThinkingConfigParam
|
|
@@ -130,7 +134,7 @@ class MessageCountTokensParams(TypedDict, total=False):
|
|
|
130
134
|
tokens and counts towards your `max_tokens` limit.
|
|
131
135
|
|
|
132
136
|
See
|
|
133
|
-
[extended thinking](https://docs.
|
|
137
|
+
[extended thinking](https://docs.claude.com/en/docs/build-with-claude/extended-thinking)
|
|
134
138
|
for details.
|
|
135
139
|
"""
|
|
136
140
|
|
|
@@ -151,9 +155,9 @@ class MessageCountTokensParams(TypedDict, total=False):
|
|
|
151
155
|
|
|
152
156
|
There are two types of tools: **client tools** and **server tools**. The
|
|
153
157
|
behavior described below applies to client tools. For
|
|
154
|
-
[server tools](https://docs.
|
|
158
|
+
[server tools](https://docs.claude.com/en/docs/agents-and-tools/tool-use/overview#server-tools),
|
|
155
159
|
see their individual documentation as each has its own behavior (e.g., the
|
|
156
|
-
[web search tool](https://docs.
|
|
160
|
+
[web search tool](https://docs.claude.com/en/docs/agents-and-tools/tool-use/web-search-tool)).
|
|
157
161
|
|
|
158
162
|
Each tool definition includes:
|
|
159
163
|
|
|
@@ -216,7 +220,7 @@ class MessageCountTokensParams(TypedDict, total=False):
|
|
|
216
220
|
functions, or more generally whenever you want the model to produce a particular
|
|
217
221
|
JSON structure of output.
|
|
218
222
|
|
|
219
|
-
See our [guide](https://docs.
|
|
223
|
+
See our [guide](https://docs.claude.com/en/docs/tool-use) for more details.
|
|
220
224
|
"""
|
|
221
225
|
|
|
222
226
|
betas: Annotated[List[AnthropicBetaParam], PropertyInfo(alias="anthropic-beta")]
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
5
|
from typing import List, Union, Iterable, Optional
|
|
6
|
-
from typing_extensions import Literal, Required, Annotated, TypedDict
|
|
6
|
+
from typing_extensions import Literal, Required, Annotated, TypeAlias, TypedDict
|
|
7
7
|
|
|
8
8
|
from ..._types import SequenceNotStr
|
|
9
9
|
from ..._utils import PropertyInfo
|
|
@@ -11,6 +11,7 @@ from ..model_param import ModelParam
|
|
|
11
11
|
from .beta_message_param import BetaMessageParam
|
|
12
12
|
from .beta_metadata_param import BetaMetadataParam
|
|
13
13
|
from ..anthropic_beta_param import AnthropicBetaParam
|
|
14
|
+
from .beta_container_params import BetaContainerParams
|
|
14
15
|
from .beta_text_block_param import BetaTextBlockParam
|
|
15
16
|
from .beta_tool_union_param import BetaToolUnionParam
|
|
16
17
|
from .beta_tool_choice_param import BetaToolChoiceParam
|
|
@@ -18,7 +19,7 @@ from .beta_thinking_config_param import BetaThinkingConfigParam
|
|
|
18
19
|
from .beta_context_management_config_param import BetaContextManagementConfigParam
|
|
19
20
|
from .beta_request_mcp_server_url_definition_param import BetaRequestMCPServerURLDefinitionParam
|
|
20
21
|
|
|
21
|
-
__all__ = ["MessageCreateParamsBase", "MessageCreateParamsNonStreaming", "MessageCreateParamsStreaming"]
|
|
22
|
+
__all__ = ["MessageCreateParamsBase", "Container", "MessageCreateParamsNonStreaming", "MessageCreateParamsStreaming"]
|
|
22
23
|
|
|
23
24
|
|
|
24
25
|
class MessageCreateParamsBase(TypedDict, total=False):
|
|
@@ -29,7 +30,7 @@ class MessageCreateParamsBase(TypedDict, total=False):
|
|
|
29
30
|
only specifies the absolute maximum number of tokens to generate.
|
|
30
31
|
|
|
31
32
|
Different models have different maximum values for this parameter. See
|
|
32
|
-
[models](https://docs.
|
|
33
|
+
[models](https://docs.claude.com/en/docs/models-overview) for details.
|
|
33
34
|
"""
|
|
34
35
|
|
|
35
36
|
messages: Required[Iterable[BetaMessageParam]]
|
|
@@ -90,12 +91,12 @@ class MessageCreateParamsBase(TypedDict, total=False):
|
|
|
90
91
|
{ "role": "user", "content": [{ "type": "text", "text": "Hello, Claude" }] }
|
|
91
92
|
```
|
|
92
93
|
|
|
93
|
-
See [input examples](https://docs.
|
|
94
|
+
See [input examples](https://docs.claude.com/en/api/messages-examples).
|
|
94
95
|
|
|
95
96
|
Note that if you want to include a
|
|
96
|
-
[system prompt](https://docs.
|
|
97
|
-
|
|
98
|
-
|
|
97
|
+
[system prompt](https://docs.claude.com/en/docs/system-prompts), you can use the
|
|
98
|
+
top-level `system` parameter — there is no `"system"` role for input messages in
|
|
99
|
+
the Messages API.
|
|
99
100
|
|
|
100
101
|
There is a limit of 100,000 messages in a single request.
|
|
101
102
|
"""
|
|
@@ -107,11 +108,15 @@ class MessageCreateParamsBase(TypedDict, total=False):
|
|
|
107
108
|
details and options.
|
|
108
109
|
"""
|
|
109
110
|
|
|
110
|
-
container: Optional[
|
|
111
|
+
container: Optional[Container]
|
|
111
112
|
"""Container identifier for reuse across requests."""
|
|
112
113
|
|
|
113
114
|
context_management: Optional[BetaContextManagementConfigParam]
|
|
114
|
-
"""
|
|
115
|
+
"""Context management configuration.
|
|
116
|
+
|
|
117
|
+
This allows you to control how Claude manages context across multiple requests,
|
|
118
|
+
such as whether to clear function results or not.
|
|
119
|
+
"""
|
|
115
120
|
|
|
116
121
|
mcp_servers: Iterable[BetaRequestMCPServerURLDefinitionParam]
|
|
117
122
|
"""MCP servers to be utilized in this request"""
|
|
@@ -125,7 +130,7 @@ class MessageCreateParamsBase(TypedDict, total=False):
|
|
|
125
130
|
for this request.
|
|
126
131
|
|
|
127
132
|
Anthropic offers different levels of service for your API requests. See
|
|
128
|
-
[service-tiers](https://docs.
|
|
133
|
+
[service-tiers](https://docs.claude.com/en/api/service-tiers) for details.
|
|
129
134
|
"""
|
|
130
135
|
|
|
131
136
|
stop_sequences: SequenceNotStr[str]
|
|
@@ -145,7 +150,7 @@ class MessageCreateParamsBase(TypedDict, total=False):
|
|
|
145
150
|
|
|
146
151
|
A system prompt is a way of providing context and instructions to Claude, such
|
|
147
152
|
as specifying a particular goal or role. See our
|
|
148
|
-
[guide to system prompts](https://docs.
|
|
153
|
+
[guide to system prompts](https://docs.claude.com/en/docs/system-prompts).
|
|
149
154
|
"""
|
|
150
155
|
|
|
151
156
|
temperature: float
|
|
@@ -167,7 +172,7 @@ class MessageCreateParamsBase(TypedDict, total=False):
|
|
|
167
172
|
tokens and counts towards your `max_tokens` limit.
|
|
168
173
|
|
|
169
174
|
See
|
|
170
|
-
[extended thinking](https://docs.
|
|
175
|
+
[extended thinking](https://docs.claude.com/en/docs/build-with-claude/extended-thinking)
|
|
171
176
|
for details.
|
|
172
177
|
"""
|
|
173
178
|
|
|
@@ -188,9 +193,9 @@ class MessageCreateParamsBase(TypedDict, total=False):
|
|
|
188
193
|
|
|
189
194
|
There are two types of tools: **client tools** and **server tools**. The
|
|
190
195
|
behavior described below applies to client tools. For
|
|
191
|
-
[server tools](https://docs.
|
|
196
|
+
[server tools](https://docs.claude.com/en/docs/agents-and-tools/tool-use/overview#server-tools),
|
|
192
197
|
see their individual documentation as each has its own behavior (e.g., the
|
|
193
|
-
[web search tool](https://docs.
|
|
198
|
+
[web search tool](https://docs.claude.com/en/docs/agents-and-tools/tool-use/web-search-tool)).
|
|
194
199
|
|
|
195
200
|
Each tool definition includes:
|
|
196
201
|
|
|
@@ -253,7 +258,7 @@ class MessageCreateParamsBase(TypedDict, total=False):
|
|
|
253
258
|
functions, or more generally whenever you want the model to produce a particular
|
|
254
259
|
JSON structure of output.
|
|
255
260
|
|
|
256
|
-
See our [guide](https://docs.
|
|
261
|
+
See our [guide](https://docs.claude.com/en/docs/tool-use) for more details.
|
|
257
262
|
"""
|
|
258
263
|
|
|
259
264
|
top_k: int
|
|
@@ -282,12 +287,14 @@ class MessageCreateParamsBase(TypedDict, total=False):
|
|
|
282
287
|
"""Optional header to specify the beta version(s) you want to use."""
|
|
283
288
|
|
|
284
289
|
|
|
290
|
+
Container: TypeAlias = Union[BetaContainerParams, str]
|
|
291
|
+
|
|
292
|
+
|
|
285
293
|
class MessageCreateParamsNonStreaming(MessageCreateParamsBase, total=False):
|
|
286
294
|
stream: Literal[False]
|
|
287
295
|
"""Whether to incrementally stream the response using server-sent events.
|
|
288
296
|
|
|
289
|
-
See [streaming](https://docs.
|
|
290
|
-
details.
|
|
297
|
+
See [streaming](https://docs.claude.com/en/api/messages-streaming) for details.
|
|
291
298
|
"""
|
|
292
299
|
|
|
293
300
|
|
|
@@ -295,8 +302,7 @@ class MessageCreateParamsStreaming(MessageCreateParamsBase):
|
|
|
295
302
|
stream: Required[Literal[True]]
|
|
296
303
|
"""Whether to incrementally stream the response using server-sent events.
|
|
297
304
|
|
|
298
|
-
See [streaming](https://docs.
|
|
299
|
-
details.
|
|
305
|
+
See [streaming](https://docs.claude.com/en/api/messages-streaming) for details.
|
|
300
306
|
"""
|
|
301
307
|
|
|
302
308
|
|
|
@@ -23,6 +23,7 @@ class BatchCreateParams(TypedDict, total=False):
|
|
|
23
23
|
"""Optional header to specify the beta version(s) you want to use."""
|
|
24
24
|
|
|
25
25
|
|
|
26
|
+
|
|
26
27
|
class Request(TypedDict, total=False):
|
|
27
28
|
custom_id: Required[str]
|
|
28
29
|
"""Developer-provided ID created for each request in a Message Batch.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import List, Optional
|
|
6
|
+
from typing_extensions import Annotated, TypedDict
|
|
7
|
+
|
|
8
|
+
from ..._types import FileTypes, SequenceNotStr
|
|
9
|
+
from ..._utils import PropertyInfo
|
|
10
|
+
from ..anthropic_beta_param import AnthropicBetaParam
|
|
11
|
+
|
|
12
|
+
__all__ = ["SkillCreateParams"]
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class SkillCreateParams(TypedDict, total=False):
|
|
16
|
+
display_title: Optional[str]
|
|
17
|
+
"""Display title for the skill.
|
|
18
|
+
|
|
19
|
+
This is a human-readable label that is not included in the prompt sent to the
|
|
20
|
+
model.
|
|
21
|
+
"""
|
|
22
|
+
|
|
23
|
+
files: Optional[SequenceNotStr[FileTypes]]
|
|
24
|
+
"""Files to upload for the skill.
|
|
25
|
+
|
|
26
|
+
All files must be in the same top-level directory and must include a SKILL.md
|
|
27
|
+
file at the root of that directory.
|
|
28
|
+
"""
|
|
29
|
+
|
|
30
|
+
betas: Annotated[List[AnthropicBetaParam], PropertyInfo(alias="anthropic-beta")]
|
|
31
|
+
"""Optional header to specify the beta version(s) you want to use."""
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import Optional
|
|
4
|
+
|
|
5
|
+
from ..._models import BaseModel
|
|
6
|
+
|
|
7
|
+
__all__ = ["SkillCreateResponse"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class SkillCreateResponse(BaseModel):
|
|
11
|
+
id: str
|
|
12
|
+
"""Unique identifier for the skill.
|
|
13
|
+
|
|
14
|
+
The format and length of IDs may change over time.
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
created_at: str
|
|
18
|
+
"""ISO 8601 timestamp of when the skill was created."""
|
|
19
|
+
|
|
20
|
+
display_title: Optional[str] = None
|
|
21
|
+
"""Display title for the skill.
|
|
22
|
+
|
|
23
|
+
This is a human-readable label that is not included in the prompt sent to the
|
|
24
|
+
model.
|
|
25
|
+
"""
|
|
26
|
+
|
|
27
|
+
latest_version: Optional[str] = None
|
|
28
|
+
"""The latest version identifier for the skill.
|
|
29
|
+
|
|
30
|
+
This represents the most recent version of the skill that has been created.
|
|
31
|
+
"""
|
|
32
|
+
|
|
33
|
+
source: str
|
|
34
|
+
"""Source of the skill.
|
|
35
|
+
|
|
36
|
+
This may be one of the following values:
|
|
37
|
+
|
|
38
|
+
- `"custom"`: the skill was created by a user
|
|
39
|
+
- `"anthropic"`: the skill was created by Anthropic
|
|
40
|
+
"""
|
|
41
|
+
|
|
42
|
+
type: str
|
|
43
|
+
"""Object type.
|
|
44
|
+
|
|
45
|
+
For Skills, this is always `"skill"`.
|
|
46
|
+
"""
|
|
47
|
+
|
|
48
|
+
updated_at: str
|
|
49
|
+
"""ISO 8601 timestamp of when the skill was last updated."""
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from ..._models import BaseModel
|
|
4
|
+
|
|
5
|
+
__all__ = ["SkillDeleteResponse"]
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class SkillDeleteResponse(BaseModel):
|
|
9
|
+
id: str
|
|
10
|
+
"""Unique identifier for the skill.
|
|
11
|
+
|
|
12
|
+
The format and length of IDs may change over time.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
type: str
|
|
16
|
+
"""Deleted object type.
|
|
17
|
+
|
|
18
|
+
For Skills, this is always `"skill_deleted"`.
|
|
19
|
+
"""
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import List, Optional
|
|
6
|
+
from typing_extensions import Annotated, TypedDict
|
|
7
|
+
|
|
8
|
+
from ..._utils import PropertyInfo
|
|
9
|
+
from ..anthropic_beta_param import AnthropicBetaParam
|
|
10
|
+
|
|
11
|
+
__all__ = ["SkillListParams"]
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class SkillListParams(TypedDict, total=False):
|
|
15
|
+
limit: int
|
|
16
|
+
"""Number of results to return per page.
|
|
17
|
+
|
|
18
|
+
Maximum value is 100. Defaults to 20.
|
|
19
|
+
"""
|
|
20
|
+
|
|
21
|
+
page: Optional[str]
|
|
22
|
+
"""Pagination token for fetching a specific page of results.
|
|
23
|
+
|
|
24
|
+
Pass the value from a previous response's `next_page` field to get the next page
|
|
25
|
+
of results.
|
|
26
|
+
"""
|
|
27
|
+
|
|
28
|
+
source: Optional[str]
|
|
29
|
+
"""Filter skills by source.
|
|
30
|
+
|
|
31
|
+
If provided, only skills from the specified source will be returned:
|
|
32
|
+
|
|
33
|
+
- `"custom"`: only return user-created skills
|
|
34
|
+
- `"anthropic"`: only return Anthropic-created skills
|
|
35
|
+
"""
|
|
36
|
+
|
|
37
|
+
betas: Annotated[List[AnthropicBetaParam], PropertyInfo(alias="anthropic-beta")]
|
|
38
|
+
"""Optional header to specify the beta version(s) you want to use."""
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import Optional
|
|
4
|
+
|
|
5
|
+
from ..._models import BaseModel
|
|
6
|
+
|
|
7
|
+
__all__ = ["SkillListResponse"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class SkillListResponse(BaseModel):
|
|
11
|
+
id: str
|
|
12
|
+
"""Unique identifier for the skill.
|
|
13
|
+
|
|
14
|
+
The format and length of IDs may change over time.
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
created_at: str
|
|
18
|
+
"""ISO 8601 timestamp of when the skill was created."""
|
|
19
|
+
|
|
20
|
+
display_title: Optional[str] = None
|
|
21
|
+
"""Display title for the skill.
|
|
22
|
+
|
|
23
|
+
This is a human-readable label that is not included in the prompt sent to the
|
|
24
|
+
model.
|
|
25
|
+
"""
|
|
26
|
+
|
|
27
|
+
latest_version: Optional[str] = None
|
|
28
|
+
"""The latest version identifier for the skill.
|
|
29
|
+
|
|
30
|
+
This represents the most recent version of the skill that has been created.
|
|
31
|
+
"""
|
|
32
|
+
|
|
33
|
+
source: str
|
|
34
|
+
"""Source of the skill.
|
|
35
|
+
|
|
36
|
+
This may be one of the following values:
|
|
37
|
+
|
|
38
|
+
- `"custom"`: the skill was created by a user
|
|
39
|
+
- `"anthropic"`: the skill was created by Anthropic
|
|
40
|
+
"""
|
|
41
|
+
|
|
42
|
+
type: str
|
|
43
|
+
"""Object type.
|
|
44
|
+
|
|
45
|
+
For Skills, this is always `"skill"`.
|
|
46
|
+
"""
|
|
47
|
+
|
|
48
|
+
updated_at: str
|
|
49
|
+
"""ISO 8601 timestamp of when the skill was last updated."""
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import Optional
|
|
4
|
+
|
|
5
|
+
from ..._models import BaseModel
|
|
6
|
+
|
|
7
|
+
__all__ = ["SkillRetrieveResponse"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class SkillRetrieveResponse(BaseModel):
|
|
11
|
+
id: str
|
|
12
|
+
"""Unique identifier for the skill.
|
|
13
|
+
|
|
14
|
+
The format and length of IDs may change over time.
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
created_at: str
|
|
18
|
+
"""ISO 8601 timestamp of when the skill was created."""
|
|
19
|
+
|
|
20
|
+
display_title: Optional[str] = None
|
|
21
|
+
"""Display title for the skill.
|
|
22
|
+
|
|
23
|
+
This is a human-readable label that is not included in the prompt sent to the
|
|
24
|
+
model.
|
|
25
|
+
"""
|
|
26
|
+
|
|
27
|
+
latest_version: Optional[str] = None
|
|
28
|
+
"""The latest version identifier for the skill.
|
|
29
|
+
|
|
30
|
+
This represents the most recent version of the skill that has been created.
|
|
31
|
+
"""
|
|
32
|
+
|
|
33
|
+
source: str
|
|
34
|
+
"""Source of the skill.
|
|
35
|
+
|
|
36
|
+
This may be one of the following values:
|
|
37
|
+
|
|
38
|
+
- `"custom"`: the skill was created by a user
|
|
39
|
+
- `"anthropic"`: the skill was created by Anthropic
|
|
40
|
+
"""
|
|
41
|
+
|
|
42
|
+
type: str
|
|
43
|
+
"""Object type.
|
|
44
|
+
|
|
45
|
+
For Skills, this is always `"skill"`.
|
|
46
|
+
"""
|
|
47
|
+
|
|
48
|
+
updated_at: str
|
|
49
|
+
"""ISO 8601 timestamp of when the skill was last updated."""
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from .version_list_params import VersionListParams as VersionListParams
|
|
6
|
+
from .version_create_params import VersionCreateParams as VersionCreateParams
|
|
7
|
+
from .version_list_response import VersionListResponse as VersionListResponse
|
|
8
|
+
from .version_create_response import VersionCreateResponse as VersionCreateResponse
|
|
9
|
+
from .version_delete_response import VersionDeleteResponse as VersionDeleteResponse
|
|
10
|
+
from .version_retrieve_response import VersionRetrieveResponse as VersionRetrieveResponse
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import List, Optional
|
|
6
|
+
from typing_extensions import Annotated, TypedDict
|
|
7
|
+
|
|
8
|
+
from ...._types import FileTypes, SequenceNotStr
|
|
9
|
+
from ...._utils import PropertyInfo
|
|
10
|
+
from ...anthropic_beta_param import AnthropicBetaParam
|
|
11
|
+
|
|
12
|
+
__all__ = ["VersionCreateParams"]
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class VersionCreateParams(TypedDict, total=False):
|
|
16
|
+
files: Optional[SequenceNotStr[FileTypes]]
|
|
17
|
+
"""Files to upload for the skill.
|
|
18
|
+
|
|
19
|
+
All files must be in the same top-level directory and must include a SKILL.md
|
|
20
|
+
file at the root of that directory.
|
|
21
|
+
"""
|
|
22
|
+
|
|
23
|
+
betas: Annotated[List[AnthropicBetaParam], PropertyInfo(alias="anthropic-beta")]
|
|
24
|
+
"""Optional header to specify the beta version(s) you want to use."""
|