@effect/ai-anthropic 0.6.2 → 0.6.4
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.
- package/dist/cjs/AnthropicClient.js +1 -2
- package/dist/cjs/AnthropicClient.js.map +1 -1
- package/dist/cjs/AnthropicConfig.js +2 -3
- package/dist/cjs/AnthropicConfig.js.map +1 -1
- package/dist/cjs/AnthropicLanguageModel.js +2 -3
- package/dist/cjs/AnthropicLanguageModel.js.map +1 -1
- package/dist/cjs/AnthropicTokenizer.js +1 -2
- package/dist/cjs/AnthropicTokenizer.js.map +1 -1
- package/dist/cjs/Generated.js +135 -136
- package/dist/cjs/Generated.js.map +1 -1
- package/dist/cjs/index.js +1 -2
- package/dist/cjs/internal/utilities.js +1 -2
- package/dist/cjs/internal/utilities.js.map +1 -1
- package/dist/dts/AnthropicClient.d.ts.map +1 -1
- package/dist/dts/AnthropicLanguageModel.d.ts.map +1 -1
- package/dist/dts/Generated.d.ts.map +1 -1
- package/dist/esm/AnthropicConfig.js +1 -1
- package/dist/esm/AnthropicConfig.js.map +1 -1
- package/dist/esm/AnthropicLanguageModel.js +1 -1
- package/dist/esm/AnthropicLanguageModel.js.map +1 -1
- package/dist/esm/Generated.js +134 -134
- package/dist/esm/Generated.js.map +1 -1
- package/package.json +5 -5
package/dist/esm/Generated.js
CHANGED
|
@@ -8,7 +8,7 @@ export class MessagesPostParams extends /*#__PURE__*/S.Struct({
|
|
|
8
8
|
nullable: true
|
|
9
9
|
})
|
|
10
10
|
}) {}
|
|
11
|
-
export class Model extends /*#__PURE__*/S.Union(
|
|
11
|
+
export class Model extends /*#__PURE__*/S.Union(/*#__PURE__*/S.Literal("claude-3-7-sonnet-latest"), /*#__PURE__*/S.Literal("claude-3-7-sonnet-20250219"), /*#__PURE__*/S.Literal("claude-3-5-haiku-latest"), /*#__PURE__*/S.Literal("claude-3-5-haiku-20241022"), /*#__PURE__*/S.Literal("claude-3-5-sonnet-latest"), /*#__PURE__*/S.Literal("claude-3-5-sonnet-20241022"), /*#__PURE__*/S.Literal("claude-3-5-sonnet-20240620"), /*#__PURE__*/S.Literal("claude-3-opus-latest"), /*#__PURE__*/S.Literal("claude-3-opus-20240229"), /*#__PURE__*/S.Literal("claude-3-sonnet-20240229"), /*#__PURE__*/S.Literal("claude-3-haiku-20240307"), /*#__PURE__*/S.Literal("claude-2.1"), /*#__PURE__*/S.Literal("claude-2.0")) {}
|
|
12
12
|
export class InputMessageRole extends /*#__PURE__*/S.Literal("user", "assistant") {}
|
|
13
13
|
export class CacheControlEphemeralType extends /*#__PURE__*/S.Literal("ephemeral") {}
|
|
14
14
|
export class CacheControlEphemeral extends /*#__PURE__*/S.Struct({
|
|
@@ -18,38 +18,38 @@ export class RequestCharLocationCitationType extends /*#__PURE__*/S.Literal("cha
|
|
|
18
18
|
export class RequestCharLocationCitation extends /*#__PURE__*/S.Struct({
|
|
19
19
|
"type": RequestCharLocationCitationType,
|
|
20
20
|
"cited_text": S.String,
|
|
21
|
-
"document_index": /*#__PURE__*/S.Int.pipe(
|
|
22
|
-
"document_title": /*#__PURE__*/S.Union(
|
|
23
|
-
"start_char_index": /*#__PURE__*/S.Int.pipe(
|
|
21
|
+
"document_index": /*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(0)),
|
|
22
|
+
"document_title": /*#__PURE__*/S.Union(/*#__PURE__*/S.String.pipe(/*#__PURE__*/S.minLength(1), /*#__PURE__*/S.maxLength(255)), S.Null),
|
|
23
|
+
"start_char_index": /*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(0)),
|
|
24
24
|
"end_char_index": S.Int
|
|
25
25
|
}) {}
|
|
26
26
|
export class RequestPageLocationCitationType extends /*#__PURE__*/S.Literal("page_location") {}
|
|
27
27
|
export class RequestPageLocationCitation extends /*#__PURE__*/S.Struct({
|
|
28
28
|
"type": RequestPageLocationCitationType,
|
|
29
29
|
"cited_text": S.String,
|
|
30
|
-
"document_index": /*#__PURE__*/S.Int.pipe(
|
|
31
|
-
"document_title": /*#__PURE__*/S.Union(
|
|
32
|
-
"start_page_number": /*#__PURE__*/S.Int.pipe(
|
|
30
|
+
"document_index": /*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(0)),
|
|
31
|
+
"document_title": /*#__PURE__*/S.Union(/*#__PURE__*/S.String.pipe(/*#__PURE__*/S.minLength(1), /*#__PURE__*/S.maxLength(255)), S.Null),
|
|
32
|
+
"start_page_number": /*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(1)),
|
|
33
33
|
"end_page_number": S.Int
|
|
34
34
|
}) {}
|
|
35
35
|
export class RequestContentBlockLocationCitationType extends /*#__PURE__*/S.Literal("content_block_location") {}
|
|
36
36
|
export class RequestContentBlockLocationCitation extends /*#__PURE__*/S.Struct({
|
|
37
37
|
"type": RequestContentBlockLocationCitationType,
|
|
38
38
|
"cited_text": S.String,
|
|
39
|
-
"document_index": /*#__PURE__*/S.Int.pipe(
|
|
40
|
-
"document_title": /*#__PURE__*/S.Union(
|
|
41
|
-
"start_block_index": /*#__PURE__*/S.Int.pipe(
|
|
39
|
+
"document_index": /*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(0)),
|
|
40
|
+
"document_title": /*#__PURE__*/S.Union(/*#__PURE__*/S.String.pipe(/*#__PURE__*/S.minLength(1), /*#__PURE__*/S.maxLength(255)), S.Null),
|
|
41
|
+
"start_block_index": /*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(0)),
|
|
42
42
|
"end_block_index": S.Int
|
|
43
43
|
}) {}
|
|
44
44
|
export class RequestTextBlockType extends /*#__PURE__*/S.Literal("text") {}
|
|
45
45
|
export class RequestTextBlock extends /*#__PURE__*/S.Struct({
|
|
46
|
-
"cache_control": /*#__PURE__*/S.optionalWith(
|
|
46
|
+
"cache_control": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(CacheControlEphemeral, S.Null), {
|
|
47
47
|
nullable: true
|
|
48
48
|
}),
|
|
49
|
-
"citations": /*#__PURE__*/S.optionalWith(
|
|
49
|
+
"citations": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(/*#__PURE__*/S.Array(/*#__PURE__*/S.Union(RequestCharLocationCitation, RequestPageLocationCitation, RequestContentBlockLocationCitation)), S.Null), {
|
|
50
50
|
nullable: true
|
|
51
51
|
}),
|
|
52
|
-
"text": /*#__PURE__*/S.String.pipe(
|
|
52
|
+
"text": /*#__PURE__*/S.String.pipe(/*#__PURE__*/S.minLength(1)),
|
|
53
53
|
"type": RequestTextBlockType
|
|
54
54
|
}) {}
|
|
55
55
|
export class RequestImageBlockType extends /*#__PURE__*/S.Literal("image") {}
|
|
@@ -66,7 +66,7 @@ export class URLImageSource extends /*#__PURE__*/S.Struct({
|
|
|
66
66
|
"url": S.String
|
|
67
67
|
}) {}
|
|
68
68
|
export class RequestImageBlock extends /*#__PURE__*/S.Struct({
|
|
69
|
-
"cache_control": /*#__PURE__*/S.optionalWith(
|
|
69
|
+
"cache_control": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(CacheControlEphemeral, S.Null), {
|
|
70
70
|
nullable: true
|
|
71
71
|
}),
|
|
72
72
|
"type": RequestImageBlockType,
|
|
@@ -74,12 +74,12 @@ export class RequestImageBlock extends /*#__PURE__*/S.Struct({
|
|
|
74
74
|
}) {}
|
|
75
75
|
export class RequestToolUseBlockType extends /*#__PURE__*/S.Literal("tool_use") {}
|
|
76
76
|
export class RequestToolUseBlock extends /*#__PURE__*/S.Struct({
|
|
77
|
-
"cache_control": /*#__PURE__*/S.optionalWith(
|
|
77
|
+
"cache_control": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(CacheControlEphemeral, S.Null), {
|
|
78
78
|
nullable: true
|
|
79
79
|
}),
|
|
80
80
|
"type": RequestToolUseBlockType,
|
|
81
|
-
"id": /*#__PURE__*/S.String.pipe(
|
|
82
|
-
"name": /*#__PURE__*/S.String.pipe(
|
|
81
|
+
"id": /*#__PURE__*/S.String.pipe(/*#__PURE__*/S.pattern(/*#__PURE__*/new RegExp("^[a-zA-Z0-9_-]+$"))),
|
|
82
|
+
"name": /*#__PURE__*/S.String.pipe(/*#__PURE__*/S.minLength(1), /*#__PURE__*/S.maxLength(64), /*#__PURE__*/S.pattern(/*#__PURE__*/new RegExp("^[a-zA-Z0-9_-]{1,64}$"))),
|
|
83
83
|
"input": /*#__PURE__*/S.Record({
|
|
84
84
|
key: S.String,
|
|
85
85
|
value: S.Unknown
|
|
@@ -87,15 +87,15 @@ export class RequestToolUseBlock extends /*#__PURE__*/S.Struct({
|
|
|
87
87
|
}) {}
|
|
88
88
|
export class RequestToolResultBlockType extends /*#__PURE__*/S.Literal("tool_result") {}
|
|
89
89
|
export class RequestToolResultBlock extends /*#__PURE__*/S.Struct({
|
|
90
|
-
"cache_control": /*#__PURE__*/S.optionalWith(
|
|
90
|
+
"cache_control": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(CacheControlEphemeral, S.Null), {
|
|
91
91
|
nullable: true
|
|
92
92
|
}),
|
|
93
93
|
"type": RequestToolResultBlockType,
|
|
94
|
-
"tool_use_id": /*#__PURE__*/S.String.pipe(
|
|
94
|
+
"tool_use_id": /*#__PURE__*/S.String.pipe(/*#__PURE__*/S.pattern(/*#__PURE__*/new RegExp("^[a-zA-Z0-9_-]+$"))),
|
|
95
95
|
"is_error": /*#__PURE__*/S.optionalWith(S.Boolean, {
|
|
96
96
|
nullable: true
|
|
97
97
|
}),
|
|
98
|
-
"content": /*#__PURE__*/S.optionalWith(
|
|
98
|
+
"content": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(S.String, /*#__PURE__*/S.Array(/*#__PURE__*/S.Union(RequestTextBlock, RequestImageBlock))), {
|
|
99
99
|
nullable: true
|
|
100
100
|
})
|
|
101
101
|
}) {}
|
|
@@ -117,7 +117,7 @@ export class PlainTextSource extends /*#__PURE__*/S.Struct({
|
|
|
117
117
|
export class ContentBlockSourceType extends /*#__PURE__*/S.Literal("content") {}
|
|
118
118
|
export class ContentBlockSource extends /*#__PURE__*/S.Struct({
|
|
119
119
|
"type": ContentBlockSourceType,
|
|
120
|
-
"content": /*#__PURE__*/S.Union(S.String, /*#__PURE__*/S.Array(
|
|
120
|
+
"content": /*#__PURE__*/S.Union(S.String, /*#__PURE__*/S.Array(/*#__PURE__*/S.Union(RequestTextBlock, RequestImageBlock)))
|
|
121
121
|
}) {}
|
|
122
122
|
export class URLPDFSourceType extends /*#__PURE__*/S.Literal("url") {}
|
|
123
123
|
export class URLPDFSource extends /*#__PURE__*/S.Struct({
|
|
@@ -130,15 +130,15 @@ export class RequestCitationsConfig extends /*#__PURE__*/S.Struct({
|
|
|
130
130
|
})
|
|
131
131
|
}) {}
|
|
132
132
|
export class RequestDocumentBlock extends /*#__PURE__*/S.Struct({
|
|
133
|
-
"cache_control": /*#__PURE__*/S.optionalWith(
|
|
133
|
+
"cache_control": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(CacheControlEphemeral, S.Null), {
|
|
134
134
|
nullable: true
|
|
135
135
|
}),
|
|
136
136
|
"type": RequestDocumentBlockType,
|
|
137
137
|
"source": /*#__PURE__*/S.Union(Base64PDFSource, PlainTextSource, ContentBlockSource, URLPDFSource),
|
|
138
|
-
"title": /*#__PURE__*/S.optionalWith(
|
|
138
|
+
"title": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(/*#__PURE__*/S.String.pipe(/*#__PURE__*/S.minLength(1), /*#__PURE__*/S.maxLength(500)), S.Null), {
|
|
139
139
|
nullable: true
|
|
140
140
|
}),
|
|
141
|
-
"context": /*#__PURE__*/S.optionalWith(
|
|
141
|
+
"context": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(/*#__PURE__*/S.String.pipe(/*#__PURE__*/S.minLength(1)), S.Null), {
|
|
142
142
|
nullable: true
|
|
143
143
|
}),
|
|
144
144
|
"citations": /*#__PURE__*/S.optionalWith(RequestCitationsConfig, {
|
|
@@ -162,14 +162,14 @@ export class InputMessage extends /*#__PURE__*/S.Struct({
|
|
|
162
162
|
"content": /*#__PURE__*/S.Union(S.String, /*#__PURE__*/S.Array(InputContentBlock))
|
|
163
163
|
}) {}
|
|
164
164
|
export class Metadata extends /*#__PURE__*/S.Struct({
|
|
165
|
-
"user_id": /*#__PURE__*/S.optionalWith(
|
|
165
|
+
"user_id": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(/*#__PURE__*/S.String.pipe(/*#__PURE__*/S.maxLength(256)), S.Null), {
|
|
166
166
|
nullable: true
|
|
167
167
|
})
|
|
168
168
|
}) {}
|
|
169
169
|
export class ThinkingConfigEnabledType extends /*#__PURE__*/S.Literal("enabled") {}
|
|
170
170
|
export class ThinkingConfigEnabled extends /*#__PURE__*/S.Struct({
|
|
171
171
|
"type": ThinkingConfigEnabledType,
|
|
172
|
-
"budget_tokens": /*#__PURE__*/S.Int.pipe(
|
|
172
|
+
"budget_tokens": /*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(1024))
|
|
173
173
|
}) {}
|
|
174
174
|
export class ThinkingConfigDisabledType extends /*#__PURE__*/S.Literal("disabled") {}
|
|
175
175
|
export class ThinkingConfigDisabled extends /*#__PURE__*/S.Struct({
|
|
@@ -206,7 +206,7 @@ export class ToolChoice extends /*#__PURE__*/S.Union(ToolChoiceAuto, ToolChoiceA
|
|
|
206
206
|
export class InputSchemaType extends /*#__PURE__*/S.Literal("object") {}
|
|
207
207
|
export class InputSchema extends /*#__PURE__*/S.Struct({
|
|
208
208
|
"type": InputSchemaType,
|
|
209
|
-
"properties": /*#__PURE__*/S.optionalWith(
|
|
209
|
+
"properties": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(/*#__PURE__*/S.Record({
|
|
210
210
|
key: S.String,
|
|
211
211
|
value: S.Unknown
|
|
212
212
|
}), S.Null), {
|
|
@@ -217,16 +217,16 @@ export class Tool extends /*#__PURE__*/S.Struct({
|
|
|
217
217
|
"description": /*#__PURE__*/S.optionalWith(S.String, {
|
|
218
218
|
nullable: true
|
|
219
219
|
}),
|
|
220
|
-
"name": /*#__PURE__*/S.String.pipe(
|
|
220
|
+
"name": /*#__PURE__*/S.String.pipe(/*#__PURE__*/S.minLength(1), /*#__PURE__*/S.maxLength(64), /*#__PURE__*/S.pattern(/*#__PURE__*/new RegExp("^[a-zA-Z0-9_-]{1,64}$"))),
|
|
221
221
|
"input_schema": InputSchema,
|
|
222
|
-
"cache_control": /*#__PURE__*/S.optionalWith(
|
|
222
|
+
"cache_control": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(CacheControlEphemeral, S.Null), {
|
|
223
223
|
nullable: true
|
|
224
224
|
})
|
|
225
225
|
}) {}
|
|
226
226
|
export class BashTool20250124Type extends /*#__PURE__*/S.Literal("bash_20250124") {}
|
|
227
227
|
export class BashTool20250124Name extends /*#__PURE__*/S.Literal("bash") {}
|
|
228
228
|
export class BashTool20250124 extends /*#__PURE__*/S.Struct({
|
|
229
|
-
"cache_control": /*#__PURE__*/S.optionalWith(
|
|
229
|
+
"cache_control": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(CacheControlEphemeral, S.Null), {
|
|
230
230
|
nullable: true
|
|
231
231
|
}),
|
|
232
232
|
"type": BashTool20250124Type,
|
|
@@ -235,7 +235,7 @@ export class BashTool20250124 extends /*#__PURE__*/S.Struct({
|
|
|
235
235
|
export class TextEditor20250124Type extends /*#__PURE__*/S.Literal("text_editor_20250124") {}
|
|
236
236
|
export class TextEditor20250124Name extends /*#__PURE__*/S.Literal("str_replace_editor") {}
|
|
237
237
|
export class TextEditor20250124 extends /*#__PURE__*/S.Struct({
|
|
238
|
-
"cache_control": /*#__PURE__*/S.optionalWith(
|
|
238
|
+
"cache_control": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(CacheControlEphemeral, S.Null), {
|
|
239
239
|
nullable: true
|
|
240
240
|
}),
|
|
241
241
|
"type": TextEditor20250124Type,
|
|
@@ -244,20 +244,20 @@ export class TextEditor20250124 extends /*#__PURE__*/S.Struct({
|
|
|
244
244
|
export class CreateMessageParams extends /*#__PURE__*/S.Class("CreateMessageParams")({
|
|
245
245
|
"model": Model,
|
|
246
246
|
"messages": /*#__PURE__*/S.Array(InputMessage),
|
|
247
|
-
"max_tokens": /*#__PURE__*/S.Int.pipe(
|
|
247
|
+
"max_tokens": /*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(1)),
|
|
248
248
|
"metadata": /*#__PURE__*/S.optionalWith(Metadata, {
|
|
249
249
|
nullable: true
|
|
250
250
|
}),
|
|
251
|
-
"stop_sequences": /*#__PURE__*/S.optionalWith(
|
|
251
|
+
"stop_sequences": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(S.String), {
|
|
252
252
|
nullable: true
|
|
253
253
|
}),
|
|
254
254
|
"stream": /*#__PURE__*/S.optionalWith(S.Boolean, {
|
|
255
255
|
nullable: true
|
|
256
256
|
}),
|
|
257
|
-
"system": /*#__PURE__*/S.optionalWith(
|
|
257
|
+
"system": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(S.String, /*#__PURE__*/S.Array(RequestTextBlock)), {
|
|
258
258
|
nullable: true
|
|
259
259
|
}),
|
|
260
|
-
"temperature": /*#__PURE__*/S.optionalWith(
|
|
260
|
+
"temperature": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Number.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(0), /*#__PURE__*/S.lessThanOrEqualTo(1)), {
|
|
261
261
|
nullable: true
|
|
262
262
|
}),
|
|
263
263
|
"thinking": /*#__PURE__*/S.optionalWith(ThinkingConfigParam, {
|
|
@@ -266,13 +266,13 @@ export class CreateMessageParams extends /*#__PURE__*/S.Class("CreateMessagePara
|
|
|
266
266
|
"tool_choice": /*#__PURE__*/S.optionalWith(ToolChoice, {
|
|
267
267
|
nullable: true
|
|
268
268
|
}),
|
|
269
|
-
"tools": /*#__PURE__*/S.optionalWith(
|
|
269
|
+
"tools": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(/*#__PURE__*/S.Union(Tool, BashTool20250124, TextEditor20250124)), {
|
|
270
270
|
nullable: true
|
|
271
271
|
}),
|
|
272
|
-
"top_k": /*#__PURE__*/S.optionalWith(
|
|
272
|
+
"top_k": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(0)), {
|
|
273
273
|
nullable: true
|
|
274
274
|
}),
|
|
275
|
-
"top_p": /*#__PURE__*/S.optionalWith(
|
|
275
|
+
"top_p": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Number.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(0), /*#__PURE__*/S.lessThanOrEqualTo(1)), {
|
|
276
276
|
nullable: true
|
|
277
277
|
})
|
|
278
278
|
}) {}
|
|
@@ -283,41 +283,41 @@ export class ResponseCharLocationCitationType extends /*#__PURE__*/S.Literal("ch
|
|
|
283
283
|
export class ResponseCharLocationCitation extends /*#__PURE__*/S.Struct({
|
|
284
284
|
"type": /*#__PURE__*/ResponseCharLocationCitationType.pipe(S.propertySignature, /*#__PURE__*/S.withConstructorDefault(() => "char_location")),
|
|
285
285
|
"cited_text": S.String,
|
|
286
|
-
"document_index": /*#__PURE__*/S.Int.pipe(
|
|
286
|
+
"document_index": /*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(0)),
|
|
287
287
|
"document_title": /*#__PURE__*/S.Union(S.String, S.Null),
|
|
288
|
-
"start_char_index": /*#__PURE__*/S.Int.pipe(
|
|
288
|
+
"start_char_index": /*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(0)),
|
|
289
289
|
"end_char_index": S.Int
|
|
290
290
|
}) {}
|
|
291
291
|
export class ResponsePageLocationCitationType extends /*#__PURE__*/S.Literal("page_location") {}
|
|
292
292
|
export class ResponsePageLocationCitation extends /*#__PURE__*/S.Struct({
|
|
293
293
|
"type": /*#__PURE__*/ResponsePageLocationCitationType.pipe(S.propertySignature, /*#__PURE__*/S.withConstructorDefault(() => "page_location")),
|
|
294
294
|
"cited_text": S.String,
|
|
295
|
-
"document_index": /*#__PURE__*/S.Int.pipe(
|
|
295
|
+
"document_index": /*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(0)),
|
|
296
296
|
"document_title": /*#__PURE__*/S.Union(S.String, S.Null),
|
|
297
|
-
"start_page_number": /*#__PURE__*/S.Int.pipe(
|
|
297
|
+
"start_page_number": /*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(1)),
|
|
298
298
|
"end_page_number": S.Int
|
|
299
299
|
}) {}
|
|
300
300
|
export class ResponseContentBlockLocationCitationType extends /*#__PURE__*/S.Literal("content_block_location") {}
|
|
301
301
|
export class ResponseContentBlockLocationCitation extends /*#__PURE__*/S.Struct({
|
|
302
302
|
"type": /*#__PURE__*/ResponseContentBlockLocationCitationType.pipe(S.propertySignature, /*#__PURE__*/S.withConstructorDefault(() => "content_block_location")),
|
|
303
303
|
"cited_text": S.String,
|
|
304
|
-
"document_index": /*#__PURE__*/S.Int.pipe(
|
|
304
|
+
"document_index": /*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(0)),
|
|
305
305
|
"document_title": /*#__PURE__*/S.Union(S.String, S.Null),
|
|
306
|
-
"start_block_index": /*#__PURE__*/S.Int.pipe(
|
|
306
|
+
"start_block_index": /*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(0)),
|
|
307
307
|
"end_block_index": S.Int
|
|
308
308
|
}) {}
|
|
309
309
|
export class ResponseTextBlock extends /*#__PURE__*/S.Struct({
|
|
310
310
|
"type": /*#__PURE__*/ResponseTextBlockType.pipe(S.propertySignature, /*#__PURE__*/S.withConstructorDefault(() => "text")),
|
|
311
|
-
"text": /*#__PURE__*/S.String.pipe(
|
|
312
|
-
"citations": /*#__PURE__*/S.optionalWith(
|
|
311
|
+
"text": /*#__PURE__*/S.String.pipe(/*#__PURE__*/S.minLength(0), /*#__PURE__*/S.maxLength(5000000)),
|
|
312
|
+
"citations": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.NullOr(/*#__PURE__*/S.Union(/*#__PURE__*/S.Array(/*#__PURE__*/S.Union(ResponseCharLocationCitation, ResponsePageLocationCitation, ResponseContentBlockLocationCitation)), S.Null)), {
|
|
313
313
|
default: () => null
|
|
314
314
|
})
|
|
315
315
|
}) {}
|
|
316
316
|
export class ResponseToolUseBlockType extends /*#__PURE__*/S.Literal("tool_use") {}
|
|
317
317
|
export class ResponseToolUseBlock extends /*#__PURE__*/S.Struct({
|
|
318
318
|
"type": /*#__PURE__*/ResponseToolUseBlockType.pipe(S.propertySignature, /*#__PURE__*/S.withConstructorDefault(() => "tool_use")),
|
|
319
|
-
"id": /*#__PURE__*/S.String.pipe(
|
|
320
|
-
"name": /*#__PURE__*/S.String.pipe(
|
|
319
|
+
"id": /*#__PURE__*/S.String.pipe(/*#__PURE__*/S.pattern(/*#__PURE__*/new RegExp("^[a-zA-Z0-9_-]+$"))),
|
|
320
|
+
"name": /*#__PURE__*/S.String.pipe(/*#__PURE__*/S.minLength(1)),
|
|
321
321
|
"input": /*#__PURE__*/S.Record({
|
|
322
322
|
key: S.String,
|
|
323
323
|
value: S.Unknown
|
|
@@ -337,14 +337,14 @@ export class ResponseRedactedThinkingBlock extends /*#__PURE__*/S.Struct({
|
|
|
337
337
|
export class ContentBlock extends /*#__PURE__*/S.Union(ResponseTextBlock, ResponseToolUseBlock, ResponseThinkingBlock, ResponseRedactedThinkingBlock) {}
|
|
338
338
|
export class MessageStopReasonEnum extends /*#__PURE__*/S.Literal("end_turn", "max_tokens", "stop_sequence", "tool_use") {}
|
|
339
339
|
export class Usage extends /*#__PURE__*/S.Struct({
|
|
340
|
-
"input_tokens": /*#__PURE__*/S.Int.pipe(
|
|
341
|
-
"cache_creation_input_tokens": /*#__PURE__*/S.optionalWith(
|
|
340
|
+
"input_tokens": /*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(0)),
|
|
341
|
+
"cache_creation_input_tokens": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.NullOr(/*#__PURE__*/S.Union(/*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(0)), S.Null)), {
|
|
342
342
|
default: () => null
|
|
343
343
|
}),
|
|
344
|
-
"cache_read_input_tokens": /*#__PURE__*/S.optionalWith(
|
|
344
|
+
"cache_read_input_tokens": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.NullOr(/*#__PURE__*/S.Union(/*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(0)), S.Null)), {
|
|
345
345
|
default: () => null
|
|
346
346
|
}),
|
|
347
|
-
"output_tokens": /*#__PURE__*/S.Int.pipe(
|
|
347
|
+
"output_tokens": /*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(0))
|
|
348
348
|
}) {}
|
|
349
349
|
export class Message extends /*#__PURE__*/S.Class("Message")({
|
|
350
350
|
"id": S.String,
|
|
@@ -353,7 +353,7 @@ export class Message extends /*#__PURE__*/S.Class("Message")({
|
|
|
353
353
|
"content": /*#__PURE__*/S.Array(ContentBlock),
|
|
354
354
|
"model": Model,
|
|
355
355
|
"stop_reason": /*#__PURE__*/S.Union(MessageStopReasonEnum, S.Null),
|
|
356
|
-
"stop_sequence": /*#__PURE__*/S.optionalWith(
|
|
356
|
+
"stop_sequence": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.NullOr(/*#__PURE__*/S.Union(S.String, S.Null)), {
|
|
357
357
|
default: () => null
|
|
358
358
|
}),
|
|
359
359
|
"usage": Usage
|
|
@@ -415,18 +415,18 @@ export class CompletePostParams extends /*#__PURE__*/S.Struct({
|
|
|
415
415
|
}) {}
|
|
416
416
|
export class CompletionRequest extends /*#__PURE__*/S.Class("CompletionRequest")({
|
|
417
417
|
"model": Model,
|
|
418
|
-
"prompt": /*#__PURE__*/S.String.pipe(
|
|
419
|
-
"max_tokens_to_sample": /*#__PURE__*/S.Int.pipe(
|
|
420
|
-
"stop_sequences": /*#__PURE__*/S.optionalWith(
|
|
418
|
+
"prompt": /*#__PURE__*/S.String.pipe(/*#__PURE__*/S.minLength(1)),
|
|
419
|
+
"max_tokens_to_sample": /*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(1)),
|
|
420
|
+
"stop_sequences": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(S.String), {
|
|
421
421
|
nullable: true
|
|
422
422
|
}),
|
|
423
|
-
"temperature": /*#__PURE__*/S.optionalWith(
|
|
423
|
+
"temperature": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Number.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(0), /*#__PURE__*/S.lessThanOrEqualTo(1)), {
|
|
424
424
|
nullable: true
|
|
425
425
|
}),
|
|
426
|
-
"top_p": /*#__PURE__*/S.optionalWith(
|
|
426
|
+
"top_p": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Number.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(0), /*#__PURE__*/S.lessThanOrEqualTo(1)), {
|
|
427
427
|
nullable: true
|
|
428
428
|
}),
|
|
429
|
-
"top_k": /*#__PURE__*/S.optionalWith(
|
|
429
|
+
"top_k": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(0)), {
|
|
430
430
|
nullable: true
|
|
431
431
|
}),
|
|
432
432
|
"metadata": /*#__PURE__*/S.optionalWith(Metadata, {
|
|
@@ -451,7 +451,7 @@ export class ModelsListParams extends /*#__PURE__*/S.Struct({
|
|
|
451
451
|
"after_id": /*#__PURE__*/S.optionalWith(S.String, {
|
|
452
452
|
nullable: true
|
|
453
453
|
}),
|
|
454
|
-
"limit": /*#__PURE__*/S.optionalWith(
|
|
454
|
+
"limit": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(1), /*#__PURE__*/S.lessThanOrEqualTo(1000)), {
|
|
455
455
|
nullable: true,
|
|
456
456
|
default: () => 20
|
|
457
457
|
}),
|
|
@@ -490,7 +490,7 @@ export class MessageBatchesListParams extends /*#__PURE__*/S.Struct({
|
|
|
490
490
|
"after_id": /*#__PURE__*/S.optionalWith(S.String, {
|
|
491
491
|
nullable: true
|
|
492
492
|
}),
|
|
493
|
-
"limit": /*#__PURE__*/S.optionalWith(
|
|
493
|
+
"limit": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(1), /*#__PURE__*/S.lessThanOrEqualTo(1000)), {
|
|
494
494
|
nullable: true,
|
|
495
495
|
default: () => 20
|
|
496
496
|
}),
|
|
@@ -534,11 +534,11 @@ export class MessageBatchesPostParams extends /*#__PURE__*/S.Struct({
|
|
|
534
534
|
})
|
|
535
535
|
}) {}
|
|
536
536
|
export class MessageBatchIndividualRequestParams extends /*#__PURE__*/S.Struct({
|
|
537
|
-
"custom_id": /*#__PURE__*/S.String.pipe(
|
|
537
|
+
"custom_id": /*#__PURE__*/S.String.pipe(/*#__PURE__*/S.minLength(1), /*#__PURE__*/S.maxLength(64), /*#__PURE__*/S.pattern(/*#__PURE__*/new RegExp("^[a-zA-Z0-9_-]{1,64}$"))),
|
|
538
538
|
"params": CreateMessageParams
|
|
539
539
|
}) {}
|
|
540
540
|
export class CreateMessageBatchParams extends /*#__PURE__*/S.Class("CreateMessageBatchParams")({
|
|
541
|
-
"requests": /*#__PURE__*/S.Array(MessageBatchIndividualRequestParams).pipe(
|
|
541
|
+
"requests": /*#__PURE__*/S.Array(MessageBatchIndividualRequestParams).pipe(/*#__PURE__*/S.minItems(1), /*#__PURE__*/S.maxItems(10000))
|
|
542
542
|
}) {}
|
|
543
543
|
export class MessageBatchesRetrieveParams extends /*#__PURE__*/S.Struct({
|
|
544
544
|
"anthropic-version": /*#__PURE__*/S.optionalWith(S.String, {
|
|
@@ -583,11 +583,11 @@ export class CountMessageTokensParams extends /*#__PURE__*/S.Class("CountMessage
|
|
|
583
583
|
"tool_choice": /*#__PURE__*/S.optionalWith(ToolChoice, {
|
|
584
584
|
nullable: true
|
|
585
585
|
}),
|
|
586
|
-
"tools": /*#__PURE__*/S.optionalWith(
|
|
586
|
+
"tools": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(/*#__PURE__*/S.Union(Tool, BashTool20250124, TextEditor20250124)), {
|
|
587
587
|
nullable: true
|
|
588
588
|
}),
|
|
589
589
|
"messages": /*#__PURE__*/S.Array(InputMessage),
|
|
590
|
-
"system": /*#__PURE__*/S.optionalWith(
|
|
590
|
+
"system": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(S.String, /*#__PURE__*/S.Array(RequestTextBlock)), {
|
|
591
591
|
nullable: true
|
|
592
592
|
}),
|
|
593
593
|
"thinking": /*#__PURE__*/S.optionalWith(ThinkingConfigParam, {
|
|
@@ -615,38 +615,38 @@ export class BetaRequestCharLocationCitationType extends /*#__PURE__*/S.Literal(
|
|
|
615
615
|
export class BetaRequestCharLocationCitation extends /*#__PURE__*/S.Struct({
|
|
616
616
|
"type": BetaRequestCharLocationCitationType,
|
|
617
617
|
"cited_text": S.String,
|
|
618
|
-
"document_index": /*#__PURE__*/S.Int.pipe(
|
|
619
|
-
"document_title": /*#__PURE__*/S.Union(
|
|
620
|
-
"start_char_index": /*#__PURE__*/S.Int.pipe(
|
|
618
|
+
"document_index": /*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(0)),
|
|
619
|
+
"document_title": /*#__PURE__*/S.Union(/*#__PURE__*/S.String.pipe(/*#__PURE__*/S.minLength(1), /*#__PURE__*/S.maxLength(255)), S.Null),
|
|
620
|
+
"start_char_index": /*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(0)),
|
|
621
621
|
"end_char_index": S.Int
|
|
622
622
|
}) {}
|
|
623
623
|
export class BetaRequestPageLocationCitationType extends /*#__PURE__*/S.Literal("page_location") {}
|
|
624
624
|
export class BetaRequestPageLocationCitation extends /*#__PURE__*/S.Struct({
|
|
625
625
|
"type": BetaRequestPageLocationCitationType,
|
|
626
626
|
"cited_text": S.String,
|
|
627
|
-
"document_index": /*#__PURE__*/S.Int.pipe(
|
|
628
|
-
"document_title": /*#__PURE__*/S.Union(
|
|
629
|
-
"start_page_number": /*#__PURE__*/S.Int.pipe(
|
|
627
|
+
"document_index": /*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(0)),
|
|
628
|
+
"document_title": /*#__PURE__*/S.Union(/*#__PURE__*/S.String.pipe(/*#__PURE__*/S.minLength(1), /*#__PURE__*/S.maxLength(255)), S.Null),
|
|
629
|
+
"start_page_number": /*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(1)),
|
|
630
630
|
"end_page_number": S.Int
|
|
631
631
|
}) {}
|
|
632
632
|
export class BetaRequestContentBlockLocationCitationType extends /*#__PURE__*/S.Literal("content_block_location") {}
|
|
633
633
|
export class BetaRequestContentBlockLocationCitation extends /*#__PURE__*/S.Struct({
|
|
634
634
|
"type": BetaRequestContentBlockLocationCitationType,
|
|
635
635
|
"cited_text": S.String,
|
|
636
|
-
"document_index": /*#__PURE__*/S.Int.pipe(
|
|
637
|
-
"document_title": /*#__PURE__*/S.Union(
|
|
638
|
-
"start_block_index": /*#__PURE__*/S.Int.pipe(
|
|
636
|
+
"document_index": /*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(0)),
|
|
637
|
+
"document_title": /*#__PURE__*/S.Union(/*#__PURE__*/S.String.pipe(/*#__PURE__*/S.minLength(1), /*#__PURE__*/S.maxLength(255)), S.Null),
|
|
638
|
+
"start_block_index": /*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(0)),
|
|
639
639
|
"end_block_index": S.Int
|
|
640
640
|
}) {}
|
|
641
641
|
export class BetaRequestTextBlockType extends /*#__PURE__*/S.Literal("text") {}
|
|
642
642
|
export class BetaRequestTextBlock extends /*#__PURE__*/S.Struct({
|
|
643
|
-
"cache_control": /*#__PURE__*/S.optionalWith(
|
|
643
|
+
"cache_control": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(BetaCacheControlEphemeral, S.Null), {
|
|
644
644
|
nullable: true
|
|
645
645
|
}),
|
|
646
|
-
"citations": /*#__PURE__*/S.optionalWith(
|
|
646
|
+
"citations": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(/*#__PURE__*/S.Array(/*#__PURE__*/S.Union(BetaRequestCharLocationCitation, BetaRequestPageLocationCitation, BetaRequestContentBlockLocationCitation)), S.Null), {
|
|
647
647
|
nullable: true
|
|
648
648
|
}),
|
|
649
|
-
"text": /*#__PURE__*/S.String.pipe(
|
|
649
|
+
"text": /*#__PURE__*/S.String.pipe(/*#__PURE__*/S.minLength(1)),
|
|
650
650
|
"type": BetaRequestTextBlockType
|
|
651
651
|
}) {}
|
|
652
652
|
export class BetaRequestImageBlockType extends /*#__PURE__*/S.Literal("image") {}
|
|
@@ -663,7 +663,7 @@ export class BetaURLImageSource extends /*#__PURE__*/S.Struct({
|
|
|
663
663
|
"url": S.String
|
|
664
664
|
}) {}
|
|
665
665
|
export class BetaRequestImageBlock extends /*#__PURE__*/S.Struct({
|
|
666
|
-
"cache_control": /*#__PURE__*/S.optionalWith(
|
|
666
|
+
"cache_control": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(BetaCacheControlEphemeral, S.Null), {
|
|
667
667
|
nullable: true
|
|
668
668
|
}),
|
|
669
669
|
"type": BetaRequestImageBlockType,
|
|
@@ -671,12 +671,12 @@ export class BetaRequestImageBlock extends /*#__PURE__*/S.Struct({
|
|
|
671
671
|
}) {}
|
|
672
672
|
export class BetaRequestToolUseBlockType extends /*#__PURE__*/S.Literal("tool_use") {}
|
|
673
673
|
export class BetaRequestToolUseBlock extends /*#__PURE__*/S.Struct({
|
|
674
|
-
"cache_control": /*#__PURE__*/S.optionalWith(
|
|
674
|
+
"cache_control": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(BetaCacheControlEphemeral, S.Null), {
|
|
675
675
|
nullable: true
|
|
676
676
|
}),
|
|
677
677
|
"type": BetaRequestToolUseBlockType,
|
|
678
|
-
"id": /*#__PURE__*/S.String.pipe(
|
|
679
|
-
"name": /*#__PURE__*/S.String.pipe(
|
|
678
|
+
"id": /*#__PURE__*/S.String.pipe(/*#__PURE__*/S.pattern(/*#__PURE__*/new RegExp("^[a-zA-Z0-9_-]+$"))),
|
|
679
|
+
"name": /*#__PURE__*/S.String.pipe(/*#__PURE__*/S.minLength(1), /*#__PURE__*/S.maxLength(64), /*#__PURE__*/S.pattern(/*#__PURE__*/new RegExp("^[a-zA-Z0-9_-]{1,64}$"))),
|
|
680
680
|
"input": /*#__PURE__*/S.Record({
|
|
681
681
|
key: S.String,
|
|
682
682
|
value: S.Unknown
|
|
@@ -684,15 +684,15 @@ export class BetaRequestToolUseBlock extends /*#__PURE__*/S.Struct({
|
|
|
684
684
|
}) {}
|
|
685
685
|
export class BetaRequestToolResultBlockType extends /*#__PURE__*/S.Literal("tool_result") {}
|
|
686
686
|
export class BetaRequestToolResultBlock extends /*#__PURE__*/S.Struct({
|
|
687
|
-
"cache_control": /*#__PURE__*/S.optionalWith(
|
|
687
|
+
"cache_control": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(BetaCacheControlEphemeral, S.Null), {
|
|
688
688
|
nullable: true
|
|
689
689
|
}),
|
|
690
690
|
"type": BetaRequestToolResultBlockType,
|
|
691
|
-
"tool_use_id": /*#__PURE__*/S.String.pipe(
|
|
691
|
+
"tool_use_id": /*#__PURE__*/S.String.pipe(/*#__PURE__*/S.pattern(/*#__PURE__*/new RegExp("^[a-zA-Z0-9_-]+$"))),
|
|
692
692
|
"is_error": /*#__PURE__*/S.optionalWith(S.Boolean, {
|
|
693
693
|
nullable: true
|
|
694
694
|
}),
|
|
695
|
-
"content": /*#__PURE__*/S.optionalWith(
|
|
695
|
+
"content": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(S.String, /*#__PURE__*/S.Array(/*#__PURE__*/S.Union(BetaRequestTextBlock, BetaRequestImageBlock))), {
|
|
696
696
|
nullable: true
|
|
697
697
|
})
|
|
698
698
|
}) {}
|
|
@@ -714,7 +714,7 @@ export class BetaPlainTextSource extends /*#__PURE__*/S.Struct({
|
|
|
714
714
|
export class BetaContentBlockSourceType extends /*#__PURE__*/S.Literal("content") {}
|
|
715
715
|
export class BetaContentBlockSource extends /*#__PURE__*/S.Struct({
|
|
716
716
|
"type": BetaContentBlockSourceType,
|
|
717
|
-
"content": /*#__PURE__*/S.Union(S.String, /*#__PURE__*/S.Array(
|
|
717
|
+
"content": /*#__PURE__*/S.Union(S.String, /*#__PURE__*/S.Array(/*#__PURE__*/S.Union(BetaRequestTextBlock, BetaRequestImageBlock)))
|
|
718
718
|
}) {}
|
|
719
719
|
export class BetaURLPDFSourceType extends /*#__PURE__*/S.Literal("url") {}
|
|
720
720
|
export class BetaURLPDFSource extends /*#__PURE__*/S.Struct({
|
|
@@ -727,15 +727,15 @@ export class BetaRequestCitationsConfig extends /*#__PURE__*/S.Struct({
|
|
|
727
727
|
})
|
|
728
728
|
}) {}
|
|
729
729
|
export class BetaRequestDocumentBlock extends /*#__PURE__*/S.Struct({
|
|
730
|
-
"cache_control": /*#__PURE__*/S.optionalWith(
|
|
730
|
+
"cache_control": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(BetaCacheControlEphemeral, S.Null), {
|
|
731
731
|
nullable: true
|
|
732
732
|
}),
|
|
733
733
|
"type": BetaRequestDocumentBlockType,
|
|
734
734
|
"source": /*#__PURE__*/S.Union(BetaBase64PDFSource, BetaPlainTextSource, BetaContentBlockSource, BetaURLPDFSource),
|
|
735
|
-
"title": /*#__PURE__*/S.optionalWith(
|
|
735
|
+
"title": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(/*#__PURE__*/S.String.pipe(/*#__PURE__*/S.minLength(1), /*#__PURE__*/S.maxLength(500)), S.Null), {
|
|
736
736
|
nullable: true
|
|
737
737
|
}),
|
|
738
|
-
"context": /*#__PURE__*/S.optionalWith(
|
|
738
|
+
"context": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(/*#__PURE__*/S.String.pipe(/*#__PURE__*/S.minLength(1)), S.Null), {
|
|
739
739
|
nullable: true
|
|
740
740
|
}),
|
|
741
741
|
"citations": /*#__PURE__*/S.optionalWith(BetaRequestCitationsConfig, {
|
|
@@ -759,14 +759,14 @@ export class BetaInputMessage extends /*#__PURE__*/S.Struct({
|
|
|
759
759
|
"content": /*#__PURE__*/S.Union(S.String, /*#__PURE__*/S.Array(BetaInputContentBlock))
|
|
760
760
|
}) {}
|
|
761
761
|
export class BetaMetadata extends /*#__PURE__*/S.Struct({
|
|
762
|
-
"user_id": /*#__PURE__*/S.optionalWith(
|
|
762
|
+
"user_id": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(/*#__PURE__*/S.String.pipe(/*#__PURE__*/S.maxLength(256)), S.Null), {
|
|
763
763
|
nullable: true
|
|
764
764
|
})
|
|
765
765
|
}) {}
|
|
766
766
|
export class BetaThinkingConfigEnabledType extends /*#__PURE__*/S.Literal("enabled") {}
|
|
767
767
|
export class BetaThinkingConfigEnabled extends /*#__PURE__*/S.Struct({
|
|
768
768
|
"type": BetaThinkingConfigEnabledType,
|
|
769
|
-
"budget_tokens": /*#__PURE__*/S.Int.pipe(
|
|
769
|
+
"budget_tokens": /*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(1024))
|
|
770
770
|
}) {}
|
|
771
771
|
export class BetaThinkingConfigDisabledType extends /*#__PURE__*/S.Literal("disabled") {}
|
|
772
772
|
export class BetaThinkingConfigDisabled extends /*#__PURE__*/S.Struct({
|
|
@@ -804,7 +804,7 @@ export class BetaToolTypeEnum extends /*#__PURE__*/S.Literal("custom") {}
|
|
|
804
804
|
export class BetaInputSchemaType extends /*#__PURE__*/S.Literal("object") {}
|
|
805
805
|
export class BetaInputSchema extends /*#__PURE__*/S.Struct({
|
|
806
806
|
"type": BetaInputSchemaType,
|
|
807
|
-
"properties": /*#__PURE__*/S.optionalWith(
|
|
807
|
+
"properties": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(/*#__PURE__*/S.Record({
|
|
808
808
|
key: S.String,
|
|
809
809
|
value: S.Unknown
|
|
810
810
|
}), S.Null), {
|
|
@@ -812,36 +812,36 @@ export class BetaInputSchema extends /*#__PURE__*/S.Struct({
|
|
|
812
812
|
})
|
|
813
813
|
}) {}
|
|
814
814
|
export class BetaTool extends /*#__PURE__*/S.Struct({
|
|
815
|
-
"type": /*#__PURE__*/S.optionalWith(
|
|
815
|
+
"type": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(S.Null, BetaToolTypeEnum), {
|
|
816
816
|
nullable: true
|
|
817
817
|
}),
|
|
818
818
|
"description": /*#__PURE__*/S.optionalWith(S.String, {
|
|
819
819
|
nullable: true
|
|
820
820
|
}),
|
|
821
|
-
"name": /*#__PURE__*/S.String.pipe(
|
|
821
|
+
"name": /*#__PURE__*/S.String.pipe(/*#__PURE__*/S.minLength(1), /*#__PURE__*/S.maxLength(64), /*#__PURE__*/S.pattern(/*#__PURE__*/new RegExp("^[a-zA-Z0-9_-]{1,64}$"))),
|
|
822
822
|
"input_schema": BetaInputSchema,
|
|
823
|
-
"cache_control": /*#__PURE__*/S.optionalWith(
|
|
823
|
+
"cache_control": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(BetaCacheControlEphemeral, S.Null), {
|
|
824
824
|
nullable: true
|
|
825
825
|
})
|
|
826
826
|
}) {}
|
|
827
827
|
export class BetaComputerUseTool20241022Type extends /*#__PURE__*/S.Literal("computer_20241022") {}
|
|
828
828
|
export class BetaComputerUseTool20241022Name extends /*#__PURE__*/S.Literal("computer") {}
|
|
829
829
|
export class BetaComputerUseTool20241022 extends /*#__PURE__*/S.Struct({
|
|
830
|
-
"cache_control": /*#__PURE__*/S.optionalWith(
|
|
830
|
+
"cache_control": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(BetaCacheControlEphemeral, S.Null), {
|
|
831
831
|
nullable: true
|
|
832
832
|
}),
|
|
833
833
|
"type": BetaComputerUseTool20241022Type,
|
|
834
834
|
"name": BetaComputerUseTool20241022Name,
|
|
835
|
-
"display_height_px": /*#__PURE__*/S.Int.pipe(
|
|
836
|
-
"display_width_px": /*#__PURE__*/S.Int.pipe(
|
|
837
|
-
"display_number": /*#__PURE__*/S.optionalWith(
|
|
835
|
+
"display_height_px": /*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(1)),
|
|
836
|
+
"display_width_px": /*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(1)),
|
|
837
|
+
"display_number": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(/*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(0)), S.Null), {
|
|
838
838
|
nullable: true
|
|
839
839
|
})
|
|
840
840
|
}) {}
|
|
841
841
|
export class BetaBashTool20241022Type extends /*#__PURE__*/S.Literal("bash_20241022") {}
|
|
842
842
|
export class BetaBashTool20241022Name extends /*#__PURE__*/S.Literal("bash") {}
|
|
843
843
|
export class BetaBashTool20241022 extends /*#__PURE__*/S.Struct({
|
|
844
|
-
"cache_control": /*#__PURE__*/S.optionalWith(
|
|
844
|
+
"cache_control": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(BetaCacheControlEphemeral, S.Null), {
|
|
845
845
|
nullable: true
|
|
846
846
|
}),
|
|
847
847
|
"type": BetaBashTool20241022Type,
|
|
@@ -850,7 +850,7 @@ export class BetaBashTool20241022 extends /*#__PURE__*/S.Struct({
|
|
|
850
850
|
export class BetaTextEditor20241022Type extends /*#__PURE__*/S.Literal("text_editor_20241022") {}
|
|
851
851
|
export class BetaTextEditor20241022Name extends /*#__PURE__*/S.Literal("str_replace_editor") {}
|
|
852
852
|
export class BetaTextEditor20241022 extends /*#__PURE__*/S.Struct({
|
|
853
|
-
"cache_control": /*#__PURE__*/S.optionalWith(
|
|
853
|
+
"cache_control": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(BetaCacheControlEphemeral, S.Null), {
|
|
854
854
|
nullable: true
|
|
855
855
|
}),
|
|
856
856
|
"type": BetaTextEditor20241022Type,
|
|
@@ -859,21 +859,21 @@ export class BetaTextEditor20241022 extends /*#__PURE__*/S.Struct({
|
|
|
859
859
|
export class BetaComputerUseTool20250124Type extends /*#__PURE__*/S.Literal("computer_20250124") {}
|
|
860
860
|
export class BetaComputerUseTool20250124Name extends /*#__PURE__*/S.Literal("computer") {}
|
|
861
861
|
export class BetaComputerUseTool20250124 extends /*#__PURE__*/S.Struct({
|
|
862
|
-
"cache_control": /*#__PURE__*/S.optionalWith(
|
|
862
|
+
"cache_control": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(BetaCacheControlEphemeral, S.Null), {
|
|
863
863
|
nullable: true
|
|
864
864
|
}),
|
|
865
865
|
"type": BetaComputerUseTool20250124Type,
|
|
866
866
|
"name": BetaComputerUseTool20250124Name,
|
|
867
|
-
"display_height_px": /*#__PURE__*/S.Int.pipe(
|
|
868
|
-
"display_width_px": /*#__PURE__*/S.Int.pipe(
|
|
869
|
-
"display_number": /*#__PURE__*/S.optionalWith(
|
|
867
|
+
"display_height_px": /*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(1)),
|
|
868
|
+
"display_width_px": /*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(1)),
|
|
869
|
+
"display_number": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(/*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(0)), S.Null), {
|
|
870
870
|
nullable: true
|
|
871
871
|
})
|
|
872
872
|
}) {}
|
|
873
873
|
export class BetaBashTool20250124Type extends /*#__PURE__*/S.Literal("bash_20250124") {}
|
|
874
874
|
export class BetaBashTool20250124Name extends /*#__PURE__*/S.Literal("bash") {}
|
|
875
875
|
export class BetaBashTool20250124 extends /*#__PURE__*/S.Struct({
|
|
876
|
-
"cache_control": /*#__PURE__*/S.optionalWith(
|
|
876
|
+
"cache_control": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(BetaCacheControlEphemeral, S.Null), {
|
|
877
877
|
nullable: true
|
|
878
878
|
}),
|
|
879
879
|
"type": BetaBashTool20250124Type,
|
|
@@ -882,7 +882,7 @@ export class BetaBashTool20250124 extends /*#__PURE__*/S.Struct({
|
|
|
882
882
|
export class BetaTextEditor20250124Type extends /*#__PURE__*/S.Literal("text_editor_20250124") {}
|
|
883
883
|
export class BetaTextEditor20250124Name extends /*#__PURE__*/S.Literal("str_replace_editor") {}
|
|
884
884
|
export class BetaTextEditor20250124 extends /*#__PURE__*/S.Struct({
|
|
885
|
-
"cache_control": /*#__PURE__*/S.optionalWith(
|
|
885
|
+
"cache_control": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(BetaCacheControlEphemeral, S.Null), {
|
|
886
886
|
nullable: true
|
|
887
887
|
}),
|
|
888
888
|
"type": BetaTextEditor20250124Type,
|
|
@@ -891,20 +891,20 @@ export class BetaTextEditor20250124 extends /*#__PURE__*/S.Struct({
|
|
|
891
891
|
export class BetaCreateMessageParams extends /*#__PURE__*/S.Class("BetaCreateMessageParams")({
|
|
892
892
|
"model": Model,
|
|
893
893
|
"messages": /*#__PURE__*/S.Array(BetaInputMessage),
|
|
894
|
-
"max_tokens": /*#__PURE__*/S.Int.pipe(
|
|
894
|
+
"max_tokens": /*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(1)),
|
|
895
895
|
"metadata": /*#__PURE__*/S.optionalWith(BetaMetadata, {
|
|
896
896
|
nullable: true
|
|
897
897
|
}),
|
|
898
|
-
"stop_sequences": /*#__PURE__*/S.optionalWith(
|
|
898
|
+
"stop_sequences": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(S.String), {
|
|
899
899
|
nullable: true
|
|
900
900
|
}),
|
|
901
901
|
"stream": /*#__PURE__*/S.optionalWith(S.Boolean, {
|
|
902
902
|
nullable: true
|
|
903
903
|
}),
|
|
904
|
-
"system": /*#__PURE__*/S.optionalWith(
|
|
904
|
+
"system": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(S.String, /*#__PURE__*/S.Array(BetaRequestTextBlock)), {
|
|
905
905
|
nullable: true
|
|
906
906
|
}),
|
|
907
|
-
"temperature": /*#__PURE__*/S.optionalWith(
|
|
907
|
+
"temperature": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Number.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(0), /*#__PURE__*/S.lessThanOrEqualTo(1)), {
|
|
908
908
|
nullable: true
|
|
909
909
|
}),
|
|
910
910
|
"thinking": /*#__PURE__*/S.optionalWith(BetaThinkingConfigParam, {
|
|
@@ -913,13 +913,13 @@ export class BetaCreateMessageParams extends /*#__PURE__*/S.Class("BetaCreateMes
|
|
|
913
913
|
"tool_choice": /*#__PURE__*/S.optionalWith(BetaToolChoice, {
|
|
914
914
|
nullable: true
|
|
915
915
|
}),
|
|
916
|
-
"tools": /*#__PURE__*/S.optionalWith(
|
|
916
|
+
"tools": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(/*#__PURE__*/S.Union(BetaTool, BetaComputerUseTool20241022, BetaBashTool20241022, BetaTextEditor20241022, BetaComputerUseTool20250124, BetaBashTool20250124, BetaTextEditor20250124)), {
|
|
917
917
|
nullable: true
|
|
918
918
|
}),
|
|
919
|
-
"top_k": /*#__PURE__*/S.optionalWith(
|
|
919
|
+
"top_k": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(0)), {
|
|
920
920
|
nullable: true
|
|
921
921
|
}),
|
|
922
|
-
"top_p": /*#__PURE__*/S.optionalWith(
|
|
922
|
+
"top_p": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Number.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(0), /*#__PURE__*/S.lessThanOrEqualTo(1)), {
|
|
923
923
|
nullable: true
|
|
924
924
|
})
|
|
925
925
|
}) {}
|
|
@@ -930,41 +930,41 @@ export class BetaResponseCharLocationCitationType extends /*#__PURE__*/S.Literal
|
|
|
930
930
|
export class BetaResponseCharLocationCitation extends /*#__PURE__*/S.Struct({
|
|
931
931
|
"type": /*#__PURE__*/BetaResponseCharLocationCitationType.pipe(S.propertySignature, /*#__PURE__*/S.withConstructorDefault(() => "char_location")),
|
|
932
932
|
"cited_text": S.String,
|
|
933
|
-
"document_index": /*#__PURE__*/S.Int.pipe(
|
|
933
|
+
"document_index": /*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(0)),
|
|
934
934
|
"document_title": /*#__PURE__*/S.Union(S.String, S.Null),
|
|
935
|
-
"start_char_index": /*#__PURE__*/S.Int.pipe(
|
|
935
|
+
"start_char_index": /*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(0)),
|
|
936
936
|
"end_char_index": S.Int
|
|
937
937
|
}) {}
|
|
938
938
|
export class BetaResponsePageLocationCitationType extends /*#__PURE__*/S.Literal("page_location") {}
|
|
939
939
|
export class BetaResponsePageLocationCitation extends /*#__PURE__*/S.Struct({
|
|
940
940
|
"type": /*#__PURE__*/BetaResponsePageLocationCitationType.pipe(S.propertySignature, /*#__PURE__*/S.withConstructorDefault(() => "page_location")),
|
|
941
941
|
"cited_text": S.String,
|
|
942
|
-
"document_index": /*#__PURE__*/S.Int.pipe(
|
|
942
|
+
"document_index": /*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(0)),
|
|
943
943
|
"document_title": /*#__PURE__*/S.Union(S.String, S.Null),
|
|
944
|
-
"start_page_number": /*#__PURE__*/S.Int.pipe(
|
|
944
|
+
"start_page_number": /*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(1)),
|
|
945
945
|
"end_page_number": S.Int
|
|
946
946
|
}) {}
|
|
947
947
|
export class BetaResponseContentBlockLocationCitationType extends /*#__PURE__*/S.Literal("content_block_location") {}
|
|
948
948
|
export class BetaResponseContentBlockLocationCitation extends /*#__PURE__*/S.Struct({
|
|
949
949
|
"type": /*#__PURE__*/BetaResponseContentBlockLocationCitationType.pipe(S.propertySignature, /*#__PURE__*/S.withConstructorDefault(() => "content_block_location")),
|
|
950
950
|
"cited_text": S.String,
|
|
951
|
-
"document_index": /*#__PURE__*/S.Int.pipe(
|
|
951
|
+
"document_index": /*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(0)),
|
|
952
952
|
"document_title": /*#__PURE__*/S.Union(S.String, S.Null),
|
|
953
|
-
"start_block_index": /*#__PURE__*/S.Int.pipe(
|
|
953
|
+
"start_block_index": /*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(0)),
|
|
954
954
|
"end_block_index": S.Int
|
|
955
955
|
}) {}
|
|
956
956
|
export class BetaResponseTextBlock extends /*#__PURE__*/S.Struct({
|
|
957
957
|
"type": /*#__PURE__*/BetaResponseTextBlockType.pipe(S.propertySignature, /*#__PURE__*/S.withConstructorDefault(() => "text")),
|
|
958
|
-
"text": /*#__PURE__*/S.String.pipe(
|
|
959
|
-
"citations": /*#__PURE__*/S.optionalWith(
|
|
958
|
+
"text": /*#__PURE__*/S.String.pipe(/*#__PURE__*/S.minLength(0), /*#__PURE__*/S.maxLength(5000000)),
|
|
959
|
+
"citations": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.NullOr(/*#__PURE__*/S.Union(/*#__PURE__*/S.Array(/*#__PURE__*/S.Union(BetaResponseCharLocationCitation, BetaResponsePageLocationCitation, BetaResponseContentBlockLocationCitation)), S.Null)), {
|
|
960
960
|
default: () => null
|
|
961
961
|
})
|
|
962
962
|
}) {}
|
|
963
963
|
export class BetaResponseToolUseBlockType extends /*#__PURE__*/S.Literal("tool_use") {}
|
|
964
964
|
export class BetaResponseToolUseBlock extends /*#__PURE__*/S.Struct({
|
|
965
965
|
"type": /*#__PURE__*/BetaResponseToolUseBlockType.pipe(S.propertySignature, /*#__PURE__*/S.withConstructorDefault(() => "tool_use")),
|
|
966
|
-
"id": /*#__PURE__*/S.String.pipe(
|
|
967
|
-
"name": /*#__PURE__*/S.String.pipe(
|
|
966
|
+
"id": /*#__PURE__*/S.String.pipe(/*#__PURE__*/S.pattern(/*#__PURE__*/new RegExp("^[a-zA-Z0-9_-]+$"))),
|
|
967
|
+
"name": /*#__PURE__*/S.String.pipe(/*#__PURE__*/S.minLength(1)),
|
|
968
968
|
"input": /*#__PURE__*/S.Record({
|
|
969
969
|
key: S.String,
|
|
970
970
|
value: S.Unknown
|
|
@@ -984,14 +984,14 @@ export class BetaResponseRedactedThinkingBlock extends /*#__PURE__*/S.Struct({
|
|
|
984
984
|
export class BetaContentBlock extends /*#__PURE__*/S.Union(BetaResponseTextBlock, BetaResponseToolUseBlock, BetaResponseThinkingBlock, BetaResponseRedactedThinkingBlock) {}
|
|
985
985
|
export class BetaMessageStopReasonEnum extends /*#__PURE__*/S.Literal("end_turn", "max_tokens", "stop_sequence", "tool_use") {}
|
|
986
986
|
export class BetaUsage extends /*#__PURE__*/S.Struct({
|
|
987
|
-
"input_tokens": /*#__PURE__*/S.Int.pipe(
|
|
988
|
-
"cache_creation_input_tokens": /*#__PURE__*/S.optionalWith(
|
|
987
|
+
"input_tokens": /*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(0)),
|
|
988
|
+
"cache_creation_input_tokens": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.NullOr(/*#__PURE__*/S.Union(/*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(0)), S.Null)), {
|
|
989
989
|
default: () => null
|
|
990
990
|
}),
|
|
991
|
-
"cache_read_input_tokens": /*#__PURE__*/S.optionalWith(
|
|
991
|
+
"cache_read_input_tokens": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.NullOr(/*#__PURE__*/S.Union(/*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(0)), S.Null)), {
|
|
992
992
|
default: () => null
|
|
993
993
|
}),
|
|
994
|
-
"output_tokens": /*#__PURE__*/S.Int.pipe(
|
|
994
|
+
"output_tokens": /*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(0))
|
|
995
995
|
}) {}
|
|
996
996
|
export class BetaMessage extends /*#__PURE__*/S.Class("BetaMessage")({
|
|
997
997
|
"id": S.String,
|
|
@@ -1000,7 +1000,7 @@ export class BetaMessage extends /*#__PURE__*/S.Class("BetaMessage")({
|
|
|
1000
1000
|
"content": /*#__PURE__*/S.Array(BetaContentBlock),
|
|
1001
1001
|
"model": Model,
|
|
1002
1002
|
"stop_reason": /*#__PURE__*/S.Union(BetaMessageStopReasonEnum, S.Null),
|
|
1003
|
-
"stop_sequence": /*#__PURE__*/S.optionalWith(
|
|
1003
|
+
"stop_sequence": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.NullOr(/*#__PURE__*/S.Union(S.String, S.Null)), {
|
|
1004
1004
|
default: () => null
|
|
1005
1005
|
}),
|
|
1006
1006
|
"usage": BetaUsage
|
|
@@ -1062,7 +1062,7 @@ export class BetaModelsListParams extends /*#__PURE__*/S.Struct({
|
|
|
1062
1062
|
"after_id": /*#__PURE__*/S.optionalWith(S.String, {
|
|
1063
1063
|
nullable: true
|
|
1064
1064
|
}),
|
|
1065
|
-
"limit": /*#__PURE__*/S.optionalWith(
|
|
1065
|
+
"limit": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(1), /*#__PURE__*/S.lessThanOrEqualTo(1000)), {
|
|
1066
1066
|
nullable: true,
|
|
1067
1067
|
default: () => 20
|
|
1068
1068
|
}),
|
|
@@ -1101,7 +1101,7 @@ export class BetaMessageBatchesListParams extends /*#__PURE__*/S.Struct({
|
|
|
1101
1101
|
"after_id": /*#__PURE__*/S.optionalWith(S.String, {
|
|
1102
1102
|
nullable: true
|
|
1103
1103
|
}),
|
|
1104
|
-
"limit": /*#__PURE__*/S.optionalWith(
|
|
1104
|
+
"limit": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Int.pipe(/*#__PURE__*/S.greaterThanOrEqualTo(1), /*#__PURE__*/S.lessThanOrEqualTo(1000)), {
|
|
1105
1105
|
nullable: true,
|
|
1106
1106
|
default: () => 20
|
|
1107
1107
|
}),
|
|
@@ -1151,11 +1151,11 @@ export class BetaMessageBatchesPostParams extends /*#__PURE__*/S.Struct({
|
|
|
1151
1151
|
})
|
|
1152
1152
|
}) {}
|
|
1153
1153
|
export class BetaMessageBatchIndividualRequestParams extends /*#__PURE__*/S.Struct({
|
|
1154
|
-
"custom_id": /*#__PURE__*/S.String.pipe(
|
|
1154
|
+
"custom_id": /*#__PURE__*/S.String.pipe(/*#__PURE__*/S.minLength(1), /*#__PURE__*/S.maxLength(64), /*#__PURE__*/S.pattern(/*#__PURE__*/new RegExp("^[a-zA-Z0-9_-]{1,64}$"))),
|
|
1155
1155
|
"params": BetaCreateMessageParams
|
|
1156
1156
|
}) {}
|
|
1157
1157
|
export class BetaCreateMessageBatchParams extends /*#__PURE__*/S.Class("BetaCreateMessageBatchParams")({
|
|
1158
|
-
"requests": /*#__PURE__*/S.Array(BetaMessageBatchIndividualRequestParams).pipe(
|
|
1158
|
+
"requests": /*#__PURE__*/S.Array(BetaMessageBatchIndividualRequestParams).pipe(/*#__PURE__*/S.minItems(1), /*#__PURE__*/S.maxItems(10000))
|
|
1159
1159
|
}) {}
|
|
1160
1160
|
export class BetaMessageBatchesRetrieveParams extends /*#__PURE__*/S.Struct({
|
|
1161
1161
|
"anthropic-beta": /*#__PURE__*/S.optionalWith(S.String, {
|
|
@@ -1215,11 +1215,11 @@ export class BetaCountMessageTokensParams extends /*#__PURE__*/S.Class("BetaCoun
|
|
|
1215
1215
|
"tool_choice": /*#__PURE__*/S.optionalWith(BetaToolChoice, {
|
|
1216
1216
|
nullable: true
|
|
1217
1217
|
}),
|
|
1218
|
-
"tools": /*#__PURE__*/S.optionalWith(
|
|
1218
|
+
"tools": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Array(/*#__PURE__*/S.Union(BetaTool, BetaComputerUseTool20241022, BetaBashTool20241022, BetaTextEditor20241022, BetaComputerUseTool20250124, BetaBashTool20250124, BetaTextEditor20250124)), {
|
|
1219
1219
|
nullable: true
|
|
1220
1220
|
}),
|
|
1221
1221
|
"messages": /*#__PURE__*/S.Array(BetaInputMessage),
|
|
1222
|
-
"system": /*#__PURE__*/S.optionalWith(
|
|
1222
|
+
"system": /*#__PURE__*/S.optionalWith(/*#__PURE__*/S.Union(S.String, /*#__PURE__*/S.Array(BetaRequestTextBlock)), {
|
|
1223
1223
|
nullable: true
|
|
1224
1224
|
}),
|
|
1225
1225
|
"thinking": /*#__PURE__*/S.optionalWith(BetaThinkingConfigParam, {
|