@effect/ai-anthropic 0.0.2 → 0.0.3
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 +3 -2
- package/dist/cjs/AnthropicClient.js.map +1 -1
- package/dist/cjs/AnthropicCompletions.js +60 -7
- package/dist/cjs/AnthropicCompletions.js.map +1 -1
- package/dist/cjs/AnthropicConfig.js.map +1 -1
- package/dist/cjs/AnthropicTokenizer.js +6 -2
- package/dist/cjs/AnthropicTokenizer.js.map +1 -1
- package/dist/cjs/Generated.js +1 -1
- package/dist/cjs/Generated.js.map +1 -1
- package/dist/dts/AnthropicClient.d.ts +2 -1
- package/dist/dts/AnthropicClient.d.ts.map +1 -1
- package/dist/dts/AnthropicCompletions.d.ts +51 -1
- package/dist/dts/AnthropicCompletions.d.ts.map +1 -1
- package/dist/dts/AnthropicConfig.d.ts +1 -3
- package/dist/dts/AnthropicConfig.d.ts.map +1 -1
- package/dist/dts/AnthropicTokenizer.d.ts +5 -0
- package/dist/dts/AnthropicTokenizer.d.ts.map +1 -1
- package/dist/dts/Generated.d.ts +100 -1056
- package/dist/dts/Generated.d.ts.map +1 -1
- package/dist/esm/AnthropicClient.js +3 -2
- package/dist/esm/AnthropicClient.js.map +1 -1
- package/dist/esm/AnthropicCompletions.js +57 -6
- package/dist/esm/AnthropicCompletions.js.map +1 -1
- package/dist/esm/AnthropicConfig.js.map +1 -1
- package/dist/esm/AnthropicTokenizer.js +5 -1
- package/dist/esm/AnthropicTokenizer.js.map +1 -1
- package/dist/esm/Generated.js +1 -1
- package/dist/esm/Generated.js.map +1 -1
- package/package.json +5 -5
- package/src/AnthropicClient.ts +8 -2
- package/src/AnthropicCompletions.ts +197 -90
- package/src/AnthropicConfig.ts +1 -12
- package/src/AnthropicTokenizer.ts +5 -1
- package/src/Generated.ts +6 -7
package/dist/dts/Generated.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ declare const MessagesPostParams_base: S.Struct<{
|
|
|
13
13
|
}>;
|
|
14
14
|
export declare class MessagesPostParams extends MessagesPostParams_base {
|
|
15
15
|
}
|
|
16
|
-
declare const ModelEnum_base: S.Literal<["claude-3-
|
|
16
|
+
declare const ModelEnum_base: S.Literal<["claude-3-7-sonnet-latest", "claude-3-7-sonnet-20250219", "claude-3-5-sonnet-latest", "claude-3-5-sonnet-20241022", "claude-3-5-sonnet-20240620", "claude-3-5-haiku-latest", "claude-3-5-haiku-20241022", "claude-3-5-haiku-20240307", "claude-3-opus-latest", "claude-3-opus-20240229"]>;
|
|
17
17
|
export declare class ModelEnum extends ModelEnum_base {
|
|
18
18
|
}
|
|
19
19
|
declare const Model_base: S.Union<[typeof S.String, typeof ModelEnum]>;
|
|
@@ -36,9 +36,9 @@ export declare class RequestCharLocationCitationType extends RequestCharLocation
|
|
|
36
36
|
declare const RequestCharLocationCitation_base: S.Struct<{
|
|
37
37
|
type: typeof RequestCharLocationCitationType;
|
|
38
38
|
cited_text: typeof S.String;
|
|
39
|
-
document_index: S.filter<S.
|
|
40
|
-
document_title: S.Union<[S.filter<S.
|
|
41
|
-
start_char_index: S.filter<S.
|
|
39
|
+
document_index: S.filter<typeof S.Int>;
|
|
40
|
+
document_title: S.Union<[S.filter<S.filter<typeof S.String>>, typeof S.Null]>;
|
|
41
|
+
start_char_index: S.filter<typeof S.Int>;
|
|
42
42
|
end_char_index: typeof S.Int;
|
|
43
43
|
}>;
|
|
44
44
|
export declare class RequestCharLocationCitation extends RequestCharLocationCitation_base {
|
|
@@ -49,9 +49,9 @@ export declare class RequestPageLocationCitationType extends RequestPageLocation
|
|
|
49
49
|
declare const RequestPageLocationCitation_base: S.Struct<{
|
|
50
50
|
type: typeof RequestPageLocationCitationType;
|
|
51
51
|
cited_text: typeof S.String;
|
|
52
|
-
document_index: S.filter<S.
|
|
53
|
-
document_title: S.Union<[S.filter<S.
|
|
54
|
-
start_page_number: S.filter<S.
|
|
52
|
+
document_index: S.filter<typeof S.Int>;
|
|
53
|
+
document_title: S.Union<[S.filter<S.filter<typeof S.String>>, typeof S.Null]>;
|
|
54
|
+
start_page_number: S.filter<typeof S.Int>;
|
|
55
55
|
end_page_number: typeof S.Int;
|
|
56
56
|
}>;
|
|
57
57
|
export declare class RequestPageLocationCitation extends RequestPageLocationCitation_base {
|
|
@@ -62,9 +62,9 @@ export declare class RequestContentBlockLocationCitationType extends RequestCont
|
|
|
62
62
|
declare const RequestContentBlockLocationCitation_base: S.Struct<{
|
|
63
63
|
type: typeof RequestContentBlockLocationCitationType;
|
|
64
64
|
cited_text: typeof S.String;
|
|
65
|
-
document_index: S.filter<S.
|
|
66
|
-
document_title: S.Union<[S.filter<S.
|
|
67
|
-
start_block_index: S.filter<S.
|
|
65
|
+
document_index: S.filter<typeof S.Int>;
|
|
66
|
+
document_title: S.Union<[S.filter<S.filter<typeof S.String>>, typeof S.Null]>;
|
|
67
|
+
start_block_index: S.filter<typeof S.Int>;
|
|
68
68
|
end_block_index: typeof S.Int;
|
|
69
69
|
}>;
|
|
70
70
|
export declare class RequestContentBlockLocationCitation extends RequestContentBlockLocationCitation_base {
|
|
@@ -79,7 +79,7 @@ declare const RequestTextBlock_base: S.Struct<{
|
|
|
79
79
|
citations: S.optionalWith<S.Union<[S.Array$<S.Union<[typeof RequestCharLocationCitation, typeof RequestPageLocationCitation, typeof RequestContentBlockLocationCitation]>>, typeof S.Null]>, {
|
|
80
80
|
nullable: true;
|
|
81
81
|
}>;
|
|
82
|
-
text: S.filter<S.
|
|
82
|
+
text: S.filter<typeof S.String>;
|
|
83
83
|
type: typeof RequestTextBlockType;
|
|
84
84
|
}>;
|
|
85
85
|
export declare class RequestTextBlock extends RequestTextBlock_base {
|
|
@@ -117,8 +117,8 @@ declare const RequestToolUseBlock_base: S.Struct<{
|
|
|
117
117
|
nullable: true;
|
|
118
118
|
}>;
|
|
119
119
|
type: typeof RequestToolUseBlockType;
|
|
120
|
-
id: S.filter<S.
|
|
121
|
-
name: S.filter<S.
|
|
120
|
+
id: S.filter<typeof S.String>;
|
|
121
|
+
name: S.filter<S.filter<S.filter<typeof S.String>>>;
|
|
122
122
|
input: S.Record$<typeof S.String, typeof S.Unknown>;
|
|
123
123
|
}>;
|
|
124
124
|
export declare class RequestToolUseBlock extends RequestToolUseBlock_base {
|
|
@@ -131,7 +131,7 @@ declare const RequestToolResultBlock_base: S.Struct<{
|
|
|
131
131
|
nullable: true;
|
|
132
132
|
}>;
|
|
133
133
|
type: typeof RequestToolResultBlockType;
|
|
134
|
-
tool_use_id: S.filter<S.
|
|
134
|
+
tool_use_id: S.filter<typeof S.String>;
|
|
135
135
|
is_error: S.optionalWith<typeof S.Boolean, {
|
|
136
136
|
nullable: true;
|
|
137
137
|
}>;
|
|
@@ -192,10 +192,10 @@ declare const RequestDocumentBlock_base: S.Struct<{
|
|
|
192
192
|
}>;
|
|
193
193
|
type: typeof RequestDocumentBlockType;
|
|
194
194
|
source: S.Union<[typeof Base64PDFSource, typeof PlainTextSource, typeof ContentBlockSource]>;
|
|
195
|
-
title: S.optionalWith<S.Union<[S.filter<S.
|
|
195
|
+
title: S.optionalWith<S.Union<[S.filter<S.filter<typeof S.String>>, typeof S.Null]>, {
|
|
196
196
|
nullable: true;
|
|
197
197
|
}>;
|
|
198
|
-
context: S.optionalWith<S.Union<[S.filter<S.
|
|
198
|
+
context: S.optionalWith<S.Union<[S.filter<typeof S.String>, typeof S.Null]>, {
|
|
199
199
|
nullable: true;
|
|
200
200
|
}>;
|
|
201
201
|
citations: S.optionalWith<typeof RequestCitationsConfig, {
|
|
@@ -214,7 +214,7 @@ declare const InputMessage_base: S.Struct<{
|
|
|
214
214
|
export declare class InputMessage extends InputMessage_base {
|
|
215
215
|
}
|
|
216
216
|
declare const Metadata_base: S.Struct<{
|
|
217
|
-
user_id: S.optionalWith<S.Union<[S.filter<S.
|
|
217
|
+
user_id: S.optionalWith<S.Union<[S.filter<typeof S.String>, typeof S.Null]>, {
|
|
218
218
|
nullable: true;
|
|
219
219
|
}>;
|
|
220
220
|
}>;
|
|
@@ -272,7 +272,7 @@ declare const Tool_base: S.Struct<{
|
|
|
272
272
|
description: S.optionalWith<typeof S.String, {
|
|
273
273
|
nullable: true;
|
|
274
274
|
}>;
|
|
275
|
-
name: S.filter<S.
|
|
275
|
+
name: S.filter<S.filter<S.filter<typeof S.String>>>;
|
|
276
276
|
input_schema: typeof InputSchema;
|
|
277
277
|
cache_control: S.optionalWith<S.Union<[typeof CacheControlEphemeral, typeof S.Null]>, {
|
|
278
278
|
nullable: true;
|
|
@@ -283,7 +283,7 @@ export declare class Tool extends Tool_base {
|
|
|
283
283
|
declare const CreateMessageParams_base: S.Class<CreateMessageParams, {
|
|
284
284
|
model: typeof Model;
|
|
285
285
|
messages: S.Array$<typeof InputMessage>;
|
|
286
|
-
max_tokens: S.filter<S.
|
|
286
|
+
max_tokens: S.filter<typeof S.Int>;
|
|
287
287
|
metadata: S.optionalWith<typeof Metadata, {
|
|
288
288
|
nullable: true;
|
|
289
289
|
}>;
|
|
@@ -296,7 +296,7 @@ declare const CreateMessageParams_base: S.Class<CreateMessageParams, {
|
|
|
296
296
|
system: S.optionalWith<S.Union<[typeof S.String, S.Array$<typeof RequestTextBlock>]>, {
|
|
297
297
|
nullable: true;
|
|
298
298
|
}>;
|
|
299
|
-
temperature: S.optionalWith<S.filter<S.
|
|
299
|
+
temperature: S.optionalWith<S.filter<S.filter<typeof S.Number>>, {
|
|
300
300
|
nullable: true;
|
|
301
301
|
}>;
|
|
302
302
|
tool_choice: S.optionalWith<typeof ToolChoice, {
|
|
@@ -305,16 +305,16 @@ declare const CreateMessageParams_base: S.Class<CreateMessageParams, {
|
|
|
305
305
|
tools: S.optionalWith<S.Array$<typeof Tool>, {
|
|
306
306
|
nullable: true;
|
|
307
307
|
}>;
|
|
308
|
-
top_k: S.optionalWith<S.filter<S.
|
|
308
|
+
top_k: S.optionalWith<S.filter<typeof S.Int>, {
|
|
309
309
|
nullable: true;
|
|
310
310
|
}>;
|
|
311
|
-
top_p: S.optionalWith<S.filter<S.
|
|
311
|
+
top_p: S.optionalWith<S.filter<S.filter<typeof S.Number>>, {
|
|
312
312
|
nullable: true;
|
|
313
313
|
}>;
|
|
314
314
|
}, S.Struct.Encoded<{
|
|
315
315
|
model: typeof Model;
|
|
316
316
|
messages: S.Array$<typeof InputMessage>;
|
|
317
|
-
max_tokens: S.filter<S.
|
|
317
|
+
max_tokens: S.filter<typeof S.Int>;
|
|
318
318
|
metadata: S.optionalWith<typeof Metadata, {
|
|
319
319
|
nullable: true;
|
|
320
320
|
}>;
|
|
@@ -327,7 +327,7 @@ declare const CreateMessageParams_base: S.Class<CreateMessageParams, {
|
|
|
327
327
|
system: S.optionalWith<S.Union<[typeof S.String, S.Array$<typeof RequestTextBlock>]>, {
|
|
328
328
|
nullable: true;
|
|
329
329
|
}>;
|
|
330
|
-
temperature: S.optionalWith<S.filter<S.
|
|
330
|
+
temperature: S.optionalWith<S.filter<S.filter<typeof S.Number>>, {
|
|
331
331
|
nullable: true;
|
|
332
332
|
}>;
|
|
333
333
|
tool_choice: S.optionalWith<typeof ToolChoice, {
|
|
@@ -336,10 +336,10 @@ declare const CreateMessageParams_base: S.Class<CreateMessageParams, {
|
|
|
336
336
|
tools: S.optionalWith<S.Array$<typeof Tool>, {
|
|
337
337
|
nullable: true;
|
|
338
338
|
}>;
|
|
339
|
-
top_k: S.optionalWith<S.filter<S.
|
|
339
|
+
top_k: S.optionalWith<S.filter<typeof S.Int>, {
|
|
340
340
|
nullable: true;
|
|
341
341
|
}>;
|
|
342
|
-
top_p: S.optionalWith<S.filter<S.
|
|
342
|
+
top_p: S.optionalWith<S.filter<S.filter<typeof S.Number>>, {
|
|
343
343
|
nullable: true;
|
|
344
344
|
}>;
|
|
345
345
|
}>, never, {
|
|
@@ -593,9 +593,9 @@ export declare class ResponseCharLocationCitationType extends ResponseCharLocati
|
|
|
593
593
|
declare const ResponseCharLocationCitation_base: S.Struct<{
|
|
594
594
|
type: S.PropertySignature<":", "char_location", never, ":", "char_location", true, never>;
|
|
595
595
|
cited_text: typeof S.String;
|
|
596
|
-
document_index: S.filter<S.
|
|
596
|
+
document_index: S.filter<typeof S.Int>;
|
|
597
597
|
document_title: S.Union<[typeof S.String, typeof S.Null]>;
|
|
598
|
-
start_char_index: S.filter<S.
|
|
598
|
+
start_char_index: S.filter<typeof S.Int>;
|
|
599
599
|
end_char_index: typeof S.Int;
|
|
600
600
|
}>;
|
|
601
601
|
export declare class ResponseCharLocationCitation extends ResponseCharLocationCitation_base {
|
|
@@ -606,9 +606,9 @@ export declare class ResponsePageLocationCitationType extends ResponsePageLocati
|
|
|
606
606
|
declare const ResponsePageLocationCitation_base: S.Struct<{
|
|
607
607
|
type: S.PropertySignature<":", "page_location", never, ":", "page_location", true, never>;
|
|
608
608
|
cited_text: typeof S.String;
|
|
609
|
-
document_index: S.filter<S.
|
|
609
|
+
document_index: S.filter<typeof S.Int>;
|
|
610
610
|
document_title: S.Union<[typeof S.String, typeof S.Null]>;
|
|
611
|
-
start_page_number: S.filter<S.
|
|
611
|
+
start_page_number: S.filter<typeof S.Int>;
|
|
612
612
|
end_page_number: typeof S.Int;
|
|
613
613
|
}>;
|
|
614
614
|
export declare class ResponsePageLocationCitation extends ResponsePageLocationCitation_base {
|
|
@@ -619,16 +619,16 @@ export declare class ResponseContentBlockLocationCitationType extends ResponseCo
|
|
|
619
619
|
declare const ResponseContentBlockLocationCitation_base: S.Struct<{
|
|
620
620
|
type: S.PropertySignature<":", "content_block_location", never, ":", "content_block_location", true, never>;
|
|
621
621
|
cited_text: typeof S.String;
|
|
622
|
-
document_index: S.filter<S.
|
|
622
|
+
document_index: S.filter<typeof S.Int>;
|
|
623
623
|
document_title: S.Union<[typeof S.String, typeof S.Null]>;
|
|
624
|
-
start_block_index: S.filter<S.
|
|
624
|
+
start_block_index: S.filter<typeof S.Int>;
|
|
625
625
|
end_block_index: typeof S.Int;
|
|
626
626
|
}>;
|
|
627
627
|
export declare class ResponseContentBlockLocationCitation extends ResponseContentBlockLocationCitation_base {
|
|
628
628
|
}
|
|
629
629
|
declare const ResponseTextBlock_base: S.Struct<{
|
|
630
630
|
type: S.PropertySignature<":", "text", never, ":", "text", true, never>;
|
|
631
|
-
text: S.filter<S.
|
|
631
|
+
text: S.filter<S.filter<typeof S.String>>;
|
|
632
632
|
citations: S.optionalWith<S.NullOr<S.Union<[S.Array$<S.Union<[typeof ResponseCharLocationCitation, typeof ResponsePageLocationCitation, typeof ResponseContentBlockLocationCitation]>>, typeof S.Null]>>, {
|
|
633
633
|
default: () => null;
|
|
634
634
|
}>;
|
|
@@ -640,8 +640,8 @@ export declare class ResponseToolUseBlockType extends ResponseToolUseBlockType_b
|
|
|
640
640
|
}
|
|
641
641
|
declare const ResponseToolUseBlock_base: S.Struct<{
|
|
642
642
|
type: S.PropertySignature<":", "tool_use", never, ":", "tool_use", true, never>;
|
|
643
|
-
id: S.filter<S.
|
|
644
|
-
name: S.filter<S.
|
|
643
|
+
id: S.filter<typeof S.String>;
|
|
644
|
+
name: S.filter<typeof S.String>;
|
|
645
645
|
input: S.Record$<typeof S.String, typeof S.Unknown>;
|
|
646
646
|
}>;
|
|
647
647
|
export declare class ResponseToolUseBlock extends ResponseToolUseBlock_base {
|
|
@@ -653,14 +653,14 @@ declare const MessageStopReasonEnum_base: S.Literal<["end_turn", "max_tokens", "
|
|
|
653
653
|
export declare class MessageStopReasonEnum extends MessageStopReasonEnum_base {
|
|
654
654
|
}
|
|
655
655
|
declare const Usage_base: S.Struct<{
|
|
656
|
-
input_tokens: S.filter<S.
|
|
657
|
-
cache_creation_input_tokens: S.optionalWith<S.NullOr<S.Union<[S.filter<S.
|
|
656
|
+
input_tokens: S.filter<typeof S.Int>;
|
|
657
|
+
cache_creation_input_tokens: S.optionalWith<S.NullOr<S.Union<[S.filter<typeof S.Int>, typeof S.Null]>>, {
|
|
658
658
|
default: () => null;
|
|
659
659
|
}>;
|
|
660
|
-
cache_read_input_tokens: S.optionalWith<S.NullOr<S.Union<[S.filter<S.
|
|
660
|
+
cache_read_input_tokens: S.optionalWith<S.NullOr<S.Union<[S.filter<typeof S.Int>, typeof S.Null]>>, {
|
|
661
661
|
default: () => null;
|
|
662
662
|
}>;
|
|
663
|
-
output_tokens: S.filter<S.
|
|
663
|
+
output_tokens: S.filter<typeof S.Int>;
|
|
664
664
|
}>;
|
|
665
665
|
export declare class Usage extends Usage_base {
|
|
666
666
|
}
|
|
@@ -875,18 +875,18 @@ export declare class CompletePostParams extends CompletePostParams_base {
|
|
|
875
875
|
}
|
|
876
876
|
declare const CompletionRequest_base: S.Class<CompletionRequest, {
|
|
877
877
|
model: typeof Model;
|
|
878
|
-
prompt: S.filter<S.
|
|
879
|
-
max_tokens_to_sample: S.filter<S.
|
|
878
|
+
prompt: S.filter<typeof S.String>;
|
|
879
|
+
max_tokens_to_sample: S.filter<typeof S.Int>;
|
|
880
880
|
stop_sequences: S.optionalWith<S.Array$<typeof S.String>, {
|
|
881
881
|
nullable: true;
|
|
882
882
|
}>;
|
|
883
|
-
temperature: S.optionalWith<S.filter<S.
|
|
883
|
+
temperature: S.optionalWith<S.filter<S.filter<typeof S.Number>>, {
|
|
884
884
|
nullable: true;
|
|
885
885
|
}>;
|
|
886
|
-
top_p: S.optionalWith<S.filter<S.
|
|
886
|
+
top_p: S.optionalWith<S.filter<S.filter<typeof S.Number>>, {
|
|
887
887
|
nullable: true;
|
|
888
888
|
}>;
|
|
889
|
-
top_k: S.optionalWith<S.filter<S.
|
|
889
|
+
top_k: S.optionalWith<S.filter<typeof S.Int>, {
|
|
890
890
|
nullable: true;
|
|
891
891
|
}>;
|
|
892
892
|
metadata: S.optionalWith<typeof Metadata, {
|
|
@@ -897,18 +897,18 @@ declare const CompletionRequest_base: S.Class<CompletionRequest, {
|
|
|
897
897
|
}>;
|
|
898
898
|
}, S.Struct.Encoded<{
|
|
899
899
|
model: typeof Model;
|
|
900
|
-
prompt: S.filter<S.
|
|
901
|
-
max_tokens_to_sample: S.filter<S.
|
|
900
|
+
prompt: S.filter<typeof S.String>;
|
|
901
|
+
max_tokens_to_sample: S.filter<typeof S.Int>;
|
|
902
902
|
stop_sequences: S.optionalWith<S.Array$<typeof S.String>, {
|
|
903
903
|
nullable: true;
|
|
904
904
|
}>;
|
|
905
|
-
temperature: S.optionalWith<S.filter<S.
|
|
905
|
+
temperature: S.optionalWith<S.filter<S.filter<typeof S.Number>>, {
|
|
906
906
|
nullable: true;
|
|
907
907
|
}>;
|
|
908
|
-
top_p: S.optionalWith<S.filter<S.
|
|
908
|
+
top_p: S.optionalWith<S.filter<S.filter<typeof S.Number>>, {
|
|
909
909
|
nullable: true;
|
|
910
910
|
}>;
|
|
911
|
-
top_k: S.optionalWith<S.filter<S.
|
|
911
|
+
top_k: S.optionalWith<S.filter<typeof S.Int>, {
|
|
912
912
|
nullable: true;
|
|
913
913
|
}>;
|
|
914
914
|
metadata: S.optionalWith<typeof Metadata, {
|
|
@@ -975,7 +975,7 @@ declare const ModelsListParams_base: S.Struct<{
|
|
|
975
975
|
after_id: S.optionalWith<typeof S.String, {
|
|
976
976
|
nullable: true;
|
|
977
977
|
}>;
|
|
978
|
-
limit: S.optionalWith<S.filter<S.
|
|
978
|
+
limit: S.optionalWith<S.filter<S.filter<typeof S.Int>>, {
|
|
979
979
|
nullable: true;
|
|
980
980
|
default: () => 20;
|
|
981
981
|
}>;
|
|
@@ -1042,7 +1042,7 @@ declare const MessageBatchesListParams_base: S.Struct<{
|
|
|
1042
1042
|
after_id: S.optionalWith<typeof S.String, {
|
|
1043
1043
|
nullable: true;
|
|
1044
1044
|
}>;
|
|
1045
|
-
limit: S.optionalWith<S.filter<S.
|
|
1045
|
+
limit: S.optionalWith<S.filter<S.filter<typeof S.Int>>, {
|
|
1046
1046
|
nullable: true;
|
|
1047
1047
|
default: () => 20;
|
|
1048
1048
|
}>;
|
|
@@ -1130,471 +1130,15 @@ declare const MessageBatchesPostParams_base: S.Struct<{
|
|
|
1130
1130
|
export declare class MessageBatchesPostParams extends MessageBatchesPostParams_base {
|
|
1131
1131
|
}
|
|
1132
1132
|
declare const MessageBatchIndividualRequestParams_base: S.Struct<{
|
|
1133
|
-
custom_id: S.filter<S.
|
|
1133
|
+
custom_id: S.filter<S.filter<S.filter<typeof S.String>>>;
|
|
1134
1134
|
params: typeof CreateMessageParams;
|
|
1135
1135
|
}>;
|
|
1136
1136
|
export declare class MessageBatchIndividualRequestParams extends MessageBatchIndividualRequestParams_base {
|
|
1137
1137
|
}
|
|
1138
1138
|
declare const CreateMessageBatchParams_base: S.Class<CreateMessageBatchParams, {
|
|
1139
|
-
requests: S.filter<S.
|
|
1140
|
-
readonly custom_id: string;
|
|
1141
|
-
readonly params: CreateMessageParams;
|
|
1142
|
-
}[], readonly {
|
|
1143
|
-
readonly custom_id: string;
|
|
1144
|
-
readonly params: {
|
|
1145
|
-
readonly model: string;
|
|
1146
|
-
readonly messages: readonly {
|
|
1147
|
-
readonly content: string | readonly ({
|
|
1148
|
-
readonly type: "text";
|
|
1149
|
-
readonly text: string;
|
|
1150
|
-
readonly cache_control?: {
|
|
1151
|
-
readonly type: "ephemeral";
|
|
1152
|
-
} | null | undefined;
|
|
1153
|
-
readonly citations?: readonly ({
|
|
1154
|
-
readonly type: "char_location";
|
|
1155
|
-
readonly cited_text: string;
|
|
1156
|
-
readonly document_index: number;
|
|
1157
|
-
readonly document_title: string | null;
|
|
1158
|
-
readonly start_char_index: number;
|
|
1159
|
-
readonly end_char_index: number;
|
|
1160
|
-
} | {
|
|
1161
|
-
readonly type: "page_location";
|
|
1162
|
-
readonly cited_text: string;
|
|
1163
|
-
readonly document_index: number;
|
|
1164
|
-
readonly document_title: string | null;
|
|
1165
|
-
readonly start_page_number: number;
|
|
1166
|
-
readonly end_page_number: number;
|
|
1167
|
-
} | {
|
|
1168
|
-
readonly type: "content_block_location";
|
|
1169
|
-
readonly cited_text: string;
|
|
1170
|
-
readonly document_index: number;
|
|
1171
|
-
readonly document_title: string | null;
|
|
1172
|
-
readonly start_block_index: number;
|
|
1173
|
-
readonly end_block_index: number;
|
|
1174
|
-
})[] | null | undefined;
|
|
1175
|
-
} | {
|
|
1176
|
-
readonly type: "image";
|
|
1177
|
-
readonly source: {
|
|
1178
|
-
readonly type: "base64";
|
|
1179
|
-
readonly media_type: "image/jpeg" | "image/png" | "image/gif" | "image/webp";
|
|
1180
|
-
readonly data: string;
|
|
1181
|
-
};
|
|
1182
|
-
readonly cache_control?: {
|
|
1183
|
-
readonly type: "ephemeral";
|
|
1184
|
-
} | null | undefined;
|
|
1185
|
-
} | {
|
|
1186
|
-
readonly type: "tool_use";
|
|
1187
|
-
readonly id: string;
|
|
1188
|
-
readonly name: string;
|
|
1189
|
-
readonly input: {
|
|
1190
|
-
readonly [x: string]: unknown;
|
|
1191
|
-
};
|
|
1192
|
-
readonly cache_control?: {
|
|
1193
|
-
readonly type: "ephemeral";
|
|
1194
|
-
} | null | undefined;
|
|
1195
|
-
} | {
|
|
1196
|
-
readonly type: "tool_result";
|
|
1197
|
-
readonly tool_use_id: string;
|
|
1198
|
-
readonly cache_control?: {
|
|
1199
|
-
readonly type: "ephemeral";
|
|
1200
|
-
} | null | undefined;
|
|
1201
|
-
readonly is_error?: boolean | null | undefined;
|
|
1202
|
-
readonly content?: string | readonly ({
|
|
1203
|
-
readonly type: "text";
|
|
1204
|
-
readonly text: string;
|
|
1205
|
-
readonly cache_control?: {
|
|
1206
|
-
readonly type: "ephemeral";
|
|
1207
|
-
} | null | undefined;
|
|
1208
|
-
readonly citations?: readonly ({
|
|
1209
|
-
readonly type: "char_location";
|
|
1210
|
-
readonly cited_text: string;
|
|
1211
|
-
readonly document_index: number;
|
|
1212
|
-
readonly document_title: string | null;
|
|
1213
|
-
readonly start_char_index: number;
|
|
1214
|
-
readonly end_char_index: number;
|
|
1215
|
-
} | {
|
|
1216
|
-
readonly type: "page_location";
|
|
1217
|
-
readonly cited_text: string;
|
|
1218
|
-
readonly document_index: number;
|
|
1219
|
-
readonly document_title: string | null;
|
|
1220
|
-
readonly start_page_number: number;
|
|
1221
|
-
readonly end_page_number: number;
|
|
1222
|
-
} | {
|
|
1223
|
-
readonly type: "content_block_location";
|
|
1224
|
-
readonly cited_text: string;
|
|
1225
|
-
readonly document_index: number;
|
|
1226
|
-
readonly document_title: string | null;
|
|
1227
|
-
readonly start_block_index: number;
|
|
1228
|
-
readonly end_block_index: number;
|
|
1229
|
-
})[] | null | undefined;
|
|
1230
|
-
} | {
|
|
1231
|
-
readonly type: "image";
|
|
1232
|
-
readonly source: {
|
|
1233
|
-
readonly type: "base64";
|
|
1234
|
-
readonly media_type: "image/jpeg" | "image/png" | "image/gif" | "image/webp";
|
|
1235
|
-
readonly data: string;
|
|
1236
|
-
};
|
|
1237
|
-
readonly cache_control?: {
|
|
1238
|
-
readonly type: "ephemeral";
|
|
1239
|
-
} | null | undefined;
|
|
1240
|
-
})[] | null | undefined;
|
|
1241
|
-
} | {
|
|
1242
|
-
readonly type: "document";
|
|
1243
|
-
readonly source: {
|
|
1244
|
-
readonly type: "base64";
|
|
1245
|
-
readonly media_type: "application/pdf";
|
|
1246
|
-
readonly data: string;
|
|
1247
|
-
} | {
|
|
1248
|
-
readonly type: "text";
|
|
1249
|
-
readonly media_type: "text/plain";
|
|
1250
|
-
readonly data: string;
|
|
1251
|
-
} | {
|
|
1252
|
-
readonly type: "content";
|
|
1253
|
-
readonly content: string | readonly ({
|
|
1254
|
-
readonly type: "text";
|
|
1255
|
-
readonly text: string;
|
|
1256
|
-
readonly cache_control?: {
|
|
1257
|
-
readonly type: "ephemeral";
|
|
1258
|
-
} | null | undefined;
|
|
1259
|
-
readonly citations?: readonly ({
|
|
1260
|
-
readonly type: "char_location";
|
|
1261
|
-
readonly cited_text: string;
|
|
1262
|
-
readonly document_index: number;
|
|
1263
|
-
readonly document_title: string | null;
|
|
1264
|
-
readonly start_char_index: number;
|
|
1265
|
-
readonly end_char_index: number;
|
|
1266
|
-
} | {
|
|
1267
|
-
readonly type: "page_location";
|
|
1268
|
-
readonly cited_text: string;
|
|
1269
|
-
readonly document_index: number;
|
|
1270
|
-
readonly document_title: string | null;
|
|
1271
|
-
readonly start_page_number: number;
|
|
1272
|
-
readonly end_page_number: number;
|
|
1273
|
-
} | {
|
|
1274
|
-
readonly type: "content_block_location";
|
|
1275
|
-
readonly cited_text: string;
|
|
1276
|
-
readonly document_index: number;
|
|
1277
|
-
readonly document_title: string | null;
|
|
1278
|
-
readonly start_block_index: number;
|
|
1279
|
-
readonly end_block_index: number;
|
|
1280
|
-
})[] | null | undefined;
|
|
1281
|
-
} | {
|
|
1282
|
-
readonly type: "image";
|
|
1283
|
-
readonly source: {
|
|
1284
|
-
readonly type: "base64";
|
|
1285
|
-
readonly media_type: "image/jpeg" | "image/png" | "image/gif" | "image/webp";
|
|
1286
|
-
readonly data: string;
|
|
1287
|
-
};
|
|
1288
|
-
readonly cache_control?: {
|
|
1289
|
-
readonly type: "ephemeral";
|
|
1290
|
-
} | null | undefined;
|
|
1291
|
-
})[];
|
|
1292
|
-
};
|
|
1293
|
-
readonly cache_control?: {
|
|
1294
|
-
readonly type: "ephemeral";
|
|
1295
|
-
} | null | undefined;
|
|
1296
|
-
readonly citations?: {
|
|
1297
|
-
readonly enabled?: boolean | null | undefined;
|
|
1298
|
-
} | null | undefined;
|
|
1299
|
-
readonly title?: string | null | undefined;
|
|
1300
|
-
readonly context?: string | null | undefined;
|
|
1301
|
-
})[];
|
|
1302
|
-
readonly role: "user" | "assistant";
|
|
1303
|
-
}[];
|
|
1304
|
-
readonly max_tokens: number;
|
|
1305
|
-
readonly metadata?: {
|
|
1306
|
-
readonly user_id?: string | null | undefined;
|
|
1307
|
-
} | null | undefined;
|
|
1308
|
-
readonly stop_sequences?: readonly string[] | null | undefined;
|
|
1309
|
-
readonly stream?: boolean | null | undefined;
|
|
1310
|
-
readonly system?: string | readonly {
|
|
1311
|
-
readonly type: "text";
|
|
1312
|
-
readonly text: string;
|
|
1313
|
-
readonly cache_control?: {
|
|
1314
|
-
readonly type: "ephemeral";
|
|
1315
|
-
} | null | undefined;
|
|
1316
|
-
readonly citations?: readonly ({
|
|
1317
|
-
readonly type: "char_location";
|
|
1318
|
-
readonly cited_text: string;
|
|
1319
|
-
readonly document_index: number;
|
|
1320
|
-
readonly document_title: string | null;
|
|
1321
|
-
readonly start_char_index: number;
|
|
1322
|
-
readonly end_char_index: number;
|
|
1323
|
-
} | {
|
|
1324
|
-
readonly type: "page_location";
|
|
1325
|
-
readonly cited_text: string;
|
|
1326
|
-
readonly document_index: number;
|
|
1327
|
-
readonly document_title: string | null;
|
|
1328
|
-
readonly start_page_number: number;
|
|
1329
|
-
readonly end_page_number: number;
|
|
1330
|
-
} | {
|
|
1331
|
-
readonly type: "content_block_location";
|
|
1332
|
-
readonly cited_text: string;
|
|
1333
|
-
readonly document_index: number;
|
|
1334
|
-
readonly document_title: string | null;
|
|
1335
|
-
readonly start_block_index: number;
|
|
1336
|
-
readonly end_block_index: number;
|
|
1337
|
-
})[] | null | undefined;
|
|
1338
|
-
}[] | null | undefined;
|
|
1339
|
-
readonly temperature?: number | null | undefined;
|
|
1340
|
-
readonly tool_choice?: {
|
|
1341
|
-
readonly type: "auto";
|
|
1342
|
-
readonly disable_parallel_tool_use?: boolean | null | undefined;
|
|
1343
|
-
} | {
|
|
1344
|
-
readonly type: "any";
|
|
1345
|
-
readonly disable_parallel_tool_use?: boolean | null | undefined;
|
|
1346
|
-
} | {
|
|
1347
|
-
readonly type: "tool";
|
|
1348
|
-
readonly name: string;
|
|
1349
|
-
readonly disable_parallel_tool_use?: boolean | null | undefined;
|
|
1350
|
-
} | null | undefined;
|
|
1351
|
-
readonly tools?: readonly {
|
|
1352
|
-
readonly name: string;
|
|
1353
|
-
readonly input_schema: {
|
|
1354
|
-
readonly type: "object";
|
|
1355
|
-
readonly properties?: {
|
|
1356
|
-
readonly [x: string]: unknown;
|
|
1357
|
-
} | null | undefined;
|
|
1358
|
-
};
|
|
1359
|
-
readonly cache_control?: {
|
|
1360
|
-
readonly type: "ephemeral";
|
|
1361
|
-
} | null | undefined;
|
|
1362
|
-
readonly description?: string | null | undefined;
|
|
1363
|
-
}[] | null | undefined;
|
|
1364
|
-
readonly top_k?: number | null | undefined;
|
|
1365
|
-
readonly top_p?: number | null | undefined;
|
|
1366
|
-
};
|
|
1367
|
-
}[], never>>;
|
|
1139
|
+
requests: S.filter<S.filter<S.Array$<typeof MessageBatchIndividualRequestParams>>>;
|
|
1368
1140
|
}, S.Struct.Encoded<{
|
|
1369
|
-
requests: S.filter<S.
|
|
1370
|
-
readonly custom_id: string;
|
|
1371
|
-
readonly params: CreateMessageParams;
|
|
1372
|
-
}[], readonly {
|
|
1373
|
-
readonly custom_id: string;
|
|
1374
|
-
readonly params: {
|
|
1375
|
-
readonly model: string;
|
|
1376
|
-
readonly messages: readonly {
|
|
1377
|
-
readonly content: string | readonly ({
|
|
1378
|
-
readonly type: "text";
|
|
1379
|
-
readonly text: string;
|
|
1380
|
-
readonly cache_control?: {
|
|
1381
|
-
readonly type: "ephemeral";
|
|
1382
|
-
} | null | undefined;
|
|
1383
|
-
readonly citations?: readonly ({
|
|
1384
|
-
readonly type: "char_location";
|
|
1385
|
-
readonly cited_text: string;
|
|
1386
|
-
readonly document_index: number;
|
|
1387
|
-
readonly document_title: string | null;
|
|
1388
|
-
readonly start_char_index: number;
|
|
1389
|
-
readonly end_char_index: number;
|
|
1390
|
-
} | {
|
|
1391
|
-
readonly type: "page_location";
|
|
1392
|
-
readonly cited_text: string;
|
|
1393
|
-
readonly document_index: number;
|
|
1394
|
-
readonly document_title: string | null;
|
|
1395
|
-
readonly start_page_number: number;
|
|
1396
|
-
readonly end_page_number: number;
|
|
1397
|
-
} | {
|
|
1398
|
-
readonly type: "content_block_location";
|
|
1399
|
-
readonly cited_text: string;
|
|
1400
|
-
readonly document_index: number;
|
|
1401
|
-
readonly document_title: string | null;
|
|
1402
|
-
readonly start_block_index: number;
|
|
1403
|
-
readonly end_block_index: number;
|
|
1404
|
-
})[] | null | undefined;
|
|
1405
|
-
} | {
|
|
1406
|
-
readonly type: "image";
|
|
1407
|
-
readonly source: {
|
|
1408
|
-
readonly type: "base64";
|
|
1409
|
-
readonly media_type: "image/jpeg" | "image/png" | "image/gif" | "image/webp";
|
|
1410
|
-
readonly data: string;
|
|
1411
|
-
};
|
|
1412
|
-
readonly cache_control?: {
|
|
1413
|
-
readonly type: "ephemeral";
|
|
1414
|
-
} | null | undefined;
|
|
1415
|
-
} | {
|
|
1416
|
-
readonly type: "tool_use";
|
|
1417
|
-
readonly id: string;
|
|
1418
|
-
readonly name: string;
|
|
1419
|
-
readonly input: {
|
|
1420
|
-
readonly [x: string]: unknown;
|
|
1421
|
-
};
|
|
1422
|
-
readonly cache_control?: {
|
|
1423
|
-
readonly type: "ephemeral";
|
|
1424
|
-
} | null | undefined;
|
|
1425
|
-
} | {
|
|
1426
|
-
readonly type: "tool_result";
|
|
1427
|
-
readonly tool_use_id: string;
|
|
1428
|
-
readonly cache_control?: {
|
|
1429
|
-
readonly type: "ephemeral";
|
|
1430
|
-
} | null | undefined;
|
|
1431
|
-
readonly is_error?: boolean | null | undefined;
|
|
1432
|
-
readonly content?: string | readonly ({
|
|
1433
|
-
readonly type: "text";
|
|
1434
|
-
readonly text: string;
|
|
1435
|
-
readonly cache_control?: {
|
|
1436
|
-
readonly type: "ephemeral";
|
|
1437
|
-
} | null | undefined;
|
|
1438
|
-
readonly citations?: readonly ({
|
|
1439
|
-
readonly type: "char_location";
|
|
1440
|
-
readonly cited_text: string;
|
|
1441
|
-
readonly document_index: number;
|
|
1442
|
-
readonly document_title: string | null;
|
|
1443
|
-
readonly start_char_index: number;
|
|
1444
|
-
readonly end_char_index: number;
|
|
1445
|
-
} | {
|
|
1446
|
-
readonly type: "page_location";
|
|
1447
|
-
readonly cited_text: string;
|
|
1448
|
-
readonly document_index: number;
|
|
1449
|
-
readonly document_title: string | null;
|
|
1450
|
-
readonly start_page_number: number;
|
|
1451
|
-
readonly end_page_number: number;
|
|
1452
|
-
} | {
|
|
1453
|
-
readonly type: "content_block_location";
|
|
1454
|
-
readonly cited_text: string;
|
|
1455
|
-
readonly document_index: number;
|
|
1456
|
-
readonly document_title: string | null;
|
|
1457
|
-
readonly start_block_index: number;
|
|
1458
|
-
readonly end_block_index: number;
|
|
1459
|
-
})[] | null | undefined;
|
|
1460
|
-
} | {
|
|
1461
|
-
readonly type: "image";
|
|
1462
|
-
readonly source: {
|
|
1463
|
-
readonly type: "base64";
|
|
1464
|
-
readonly media_type: "image/jpeg" | "image/png" | "image/gif" | "image/webp";
|
|
1465
|
-
readonly data: string;
|
|
1466
|
-
};
|
|
1467
|
-
readonly cache_control?: {
|
|
1468
|
-
readonly type: "ephemeral";
|
|
1469
|
-
} | null | undefined;
|
|
1470
|
-
})[] | null | undefined;
|
|
1471
|
-
} | {
|
|
1472
|
-
readonly type: "document";
|
|
1473
|
-
readonly source: {
|
|
1474
|
-
readonly type: "base64";
|
|
1475
|
-
readonly media_type: "application/pdf";
|
|
1476
|
-
readonly data: string;
|
|
1477
|
-
} | {
|
|
1478
|
-
readonly type: "text";
|
|
1479
|
-
readonly media_type: "text/plain";
|
|
1480
|
-
readonly data: string;
|
|
1481
|
-
} | {
|
|
1482
|
-
readonly type: "content";
|
|
1483
|
-
readonly content: string | readonly ({
|
|
1484
|
-
readonly type: "text";
|
|
1485
|
-
readonly text: string;
|
|
1486
|
-
readonly cache_control?: {
|
|
1487
|
-
readonly type: "ephemeral";
|
|
1488
|
-
} | null | undefined;
|
|
1489
|
-
readonly citations?: readonly ({
|
|
1490
|
-
readonly type: "char_location";
|
|
1491
|
-
readonly cited_text: string;
|
|
1492
|
-
readonly document_index: number;
|
|
1493
|
-
readonly document_title: string | null;
|
|
1494
|
-
readonly start_char_index: number;
|
|
1495
|
-
readonly end_char_index: number;
|
|
1496
|
-
} | {
|
|
1497
|
-
readonly type: "page_location";
|
|
1498
|
-
readonly cited_text: string;
|
|
1499
|
-
readonly document_index: number;
|
|
1500
|
-
readonly document_title: string | null;
|
|
1501
|
-
readonly start_page_number: number;
|
|
1502
|
-
readonly end_page_number: number;
|
|
1503
|
-
} | {
|
|
1504
|
-
readonly type: "content_block_location";
|
|
1505
|
-
readonly cited_text: string;
|
|
1506
|
-
readonly document_index: number;
|
|
1507
|
-
readonly document_title: string | null;
|
|
1508
|
-
readonly start_block_index: number;
|
|
1509
|
-
readonly end_block_index: number;
|
|
1510
|
-
})[] | null | undefined;
|
|
1511
|
-
} | {
|
|
1512
|
-
readonly type: "image";
|
|
1513
|
-
readonly source: {
|
|
1514
|
-
readonly type: "base64";
|
|
1515
|
-
readonly media_type: "image/jpeg" | "image/png" | "image/gif" | "image/webp";
|
|
1516
|
-
readonly data: string;
|
|
1517
|
-
};
|
|
1518
|
-
readonly cache_control?: {
|
|
1519
|
-
readonly type: "ephemeral";
|
|
1520
|
-
} | null | undefined;
|
|
1521
|
-
})[];
|
|
1522
|
-
};
|
|
1523
|
-
readonly cache_control?: {
|
|
1524
|
-
readonly type: "ephemeral";
|
|
1525
|
-
} | null | undefined;
|
|
1526
|
-
readonly citations?: {
|
|
1527
|
-
readonly enabled?: boolean | null | undefined;
|
|
1528
|
-
} | null | undefined;
|
|
1529
|
-
readonly title?: string | null | undefined;
|
|
1530
|
-
readonly context?: string | null | undefined;
|
|
1531
|
-
})[];
|
|
1532
|
-
readonly role: "user" | "assistant";
|
|
1533
|
-
}[];
|
|
1534
|
-
readonly max_tokens: number;
|
|
1535
|
-
readonly metadata?: {
|
|
1536
|
-
readonly user_id?: string | null | undefined;
|
|
1537
|
-
} | null | undefined;
|
|
1538
|
-
readonly stop_sequences?: readonly string[] | null | undefined;
|
|
1539
|
-
readonly stream?: boolean | null | undefined;
|
|
1540
|
-
readonly system?: string | readonly {
|
|
1541
|
-
readonly type: "text";
|
|
1542
|
-
readonly text: string;
|
|
1543
|
-
readonly cache_control?: {
|
|
1544
|
-
readonly type: "ephemeral";
|
|
1545
|
-
} | null | undefined;
|
|
1546
|
-
readonly citations?: readonly ({
|
|
1547
|
-
readonly type: "char_location";
|
|
1548
|
-
readonly cited_text: string;
|
|
1549
|
-
readonly document_index: number;
|
|
1550
|
-
readonly document_title: string | null;
|
|
1551
|
-
readonly start_char_index: number;
|
|
1552
|
-
readonly end_char_index: number;
|
|
1553
|
-
} | {
|
|
1554
|
-
readonly type: "page_location";
|
|
1555
|
-
readonly cited_text: string;
|
|
1556
|
-
readonly document_index: number;
|
|
1557
|
-
readonly document_title: string | null;
|
|
1558
|
-
readonly start_page_number: number;
|
|
1559
|
-
readonly end_page_number: number;
|
|
1560
|
-
} | {
|
|
1561
|
-
readonly type: "content_block_location";
|
|
1562
|
-
readonly cited_text: string;
|
|
1563
|
-
readonly document_index: number;
|
|
1564
|
-
readonly document_title: string | null;
|
|
1565
|
-
readonly start_block_index: number;
|
|
1566
|
-
readonly end_block_index: number;
|
|
1567
|
-
})[] | null | undefined;
|
|
1568
|
-
}[] | null | undefined;
|
|
1569
|
-
readonly temperature?: number | null | undefined;
|
|
1570
|
-
readonly tool_choice?: {
|
|
1571
|
-
readonly type: "auto";
|
|
1572
|
-
readonly disable_parallel_tool_use?: boolean | null | undefined;
|
|
1573
|
-
} | {
|
|
1574
|
-
readonly type: "any";
|
|
1575
|
-
readonly disable_parallel_tool_use?: boolean | null | undefined;
|
|
1576
|
-
} | {
|
|
1577
|
-
readonly type: "tool";
|
|
1578
|
-
readonly name: string;
|
|
1579
|
-
readonly disable_parallel_tool_use?: boolean | null | undefined;
|
|
1580
|
-
} | null | undefined;
|
|
1581
|
-
readonly tools?: readonly {
|
|
1582
|
-
readonly name: string;
|
|
1583
|
-
readonly input_schema: {
|
|
1584
|
-
readonly type: "object";
|
|
1585
|
-
readonly properties?: {
|
|
1586
|
-
readonly [x: string]: unknown;
|
|
1587
|
-
} | null | undefined;
|
|
1588
|
-
};
|
|
1589
|
-
readonly cache_control?: {
|
|
1590
|
-
readonly type: "ephemeral";
|
|
1591
|
-
} | null | undefined;
|
|
1592
|
-
readonly description?: string | null | undefined;
|
|
1593
|
-
}[] | null | undefined;
|
|
1594
|
-
readonly top_k?: number | null | undefined;
|
|
1595
|
-
readonly top_p?: number | null | undefined;
|
|
1596
|
-
};
|
|
1597
|
-
}[], never>>;
|
|
1141
|
+
requests: S.filter<S.filter<S.Array$<typeof MessageBatchIndividualRequestParams>>>;
|
|
1598
1142
|
}>, never, {
|
|
1599
1143
|
readonly requests: readonly {
|
|
1600
1144
|
readonly custom_id: string;
|
|
@@ -1943,9 +1487,9 @@ export declare class BetaRequestCharLocationCitationType extends BetaRequestChar
|
|
|
1943
1487
|
declare const BetaRequestCharLocationCitation_base: S.Struct<{
|
|
1944
1488
|
type: typeof BetaRequestCharLocationCitationType;
|
|
1945
1489
|
cited_text: typeof S.String;
|
|
1946
|
-
document_index: S.filter<S.
|
|
1947
|
-
document_title: S.Union<[S.filter<S.
|
|
1948
|
-
start_char_index: S.filter<S.
|
|
1490
|
+
document_index: S.filter<typeof S.Int>;
|
|
1491
|
+
document_title: S.Union<[S.filter<S.filter<typeof S.String>>, typeof S.Null]>;
|
|
1492
|
+
start_char_index: S.filter<typeof S.Int>;
|
|
1949
1493
|
end_char_index: typeof S.Int;
|
|
1950
1494
|
}>;
|
|
1951
1495
|
export declare class BetaRequestCharLocationCitation extends BetaRequestCharLocationCitation_base {
|
|
@@ -1956,9 +1500,9 @@ export declare class BetaRequestPageLocationCitationType extends BetaRequestPage
|
|
|
1956
1500
|
declare const BetaRequestPageLocationCitation_base: S.Struct<{
|
|
1957
1501
|
type: typeof BetaRequestPageLocationCitationType;
|
|
1958
1502
|
cited_text: typeof S.String;
|
|
1959
|
-
document_index: S.filter<S.
|
|
1960
|
-
document_title: S.Union<[S.filter<S.
|
|
1961
|
-
start_page_number: S.filter<S.
|
|
1503
|
+
document_index: S.filter<typeof S.Int>;
|
|
1504
|
+
document_title: S.Union<[S.filter<S.filter<typeof S.String>>, typeof S.Null]>;
|
|
1505
|
+
start_page_number: S.filter<typeof S.Int>;
|
|
1962
1506
|
end_page_number: typeof S.Int;
|
|
1963
1507
|
}>;
|
|
1964
1508
|
export declare class BetaRequestPageLocationCitation extends BetaRequestPageLocationCitation_base {
|
|
@@ -1969,9 +1513,9 @@ export declare class BetaRequestContentBlockLocationCitationType extends BetaReq
|
|
|
1969
1513
|
declare const BetaRequestContentBlockLocationCitation_base: S.Struct<{
|
|
1970
1514
|
type: typeof BetaRequestContentBlockLocationCitationType;
|
|
1971
1515
|
cited_text: typeof S.String;
|
|
1972
|
-
document_index: S.filter<S.
|
|
1973
|
-
document_title: S.Union<[S.filter<S.
|
|
1974
|
-
start_block_index: S.filter<S.
|
|
1516
|
+
document_index: S.filter<typeof S.Int>;
|
|
1517
|
+
document_title: S.Union<[S.filter<S.filter<typeof S.String>>, typeof S.Null]>;
|
|
1518
|
+
start_block_index: S.filter<typeof S.Int>;
|
|
1975
1519
|
end_block_index: typeof S.Int;
|
|
1976
1520
|
}>;
|
|
1977
1521
|
export declare class BetaRequestContentBlockLocationCitation extends BetaRequestContentBlockLocationCitation_base {
|
|
@@ -1986,7 +1530,7 @@ declare const BetaRequestTextBlock_base: S.Struct<{
|
|
|
1986
1530
|
citations: S.optionalWith<S.Union<[S.Array$<S.Union<[typeof BetaRequestCharLocationCitation, typeof BetaRequestPageLocationCitation, typeof BetaRequestContentBlockLocationCitation]>>, typeof S.Null]>, {
|
|
1987
1531
|
nullable: true;
|
|
1988
1532
|
}>;
|
|
1989
|
-
text: S.filter<S.
|
|
1533
|
+
text: S.filter<typeof S.String>;
|
|
1990
1534
|
type: typeof BetaRequestTextBlockType;
|
|
1991
1535
|
}>;
|
|
1992
1536
|
export declare class BetaRequestTextBlock extends BetaRequestTextBlock_base {
|
|
@@ -2024,8 +1568,8 @@ declare const BetaRequestToolUseBlock_base: S.Struct<{
|
|
|
2024
1568
|
nullable: true;
|
|
2025
1569
|
}>;
|
|
2026
1570
|
type: typeof BetaRequestToolUseBlockType;
|
|
2027
|
-
id: S.filter<S.
|
|
2028
|
-
name: S.filter<S.
|
|
1571
|
+
id: S.filter<typeof S.String>;
|
|
1572
|
+
name: S.filter<S.filter<S.filter<typeof S.String>>>;
|
|
2029
1573
|
input: S.Record$<typeof S.String, typeof S.Unknown>;
|
|
2030
1574
|
}>;
|
|
2031
1575
|
export declare class BetaRequestToolUseBlock extends BetaRequestToolUseBlock_base {
|
|
@@ -2038,7 +1582,7 @@ declare const BetaRequestToolResultBlock_base: S.Struct<{
|
|
|
2038
1582
|
nullable: true;
|
|
2039
1583
|
}>;
|
|
2040
1584
|
type: typeof BetaRequestToolResultBlockType;
|
|
2041
|
-
tool_use_id: S.filter<S.
|
|
1585
|
+
tool_use_id: S.filter<typeof S.String>;
|
|
2042
1586
|
is_error: S.optionalWith<typeof S.Boolean, {
|
|
2043
1587
|
nullable: true;
|
|
2044
1588
|
}>;
|
|
@@ -2099,10 +1643,10 @@ declare const BetaRequestDocumentBlock_base: S.Struct<{
|
|
|
2099
1643
|
}>;
|
|
2100
1644
|
type: typeof BetaRequestDocumentBlockType;
|
|
2101
1645
|
source: S.Union<[typeof BetaBase64PDFSource, typeof BetaPlainTextSource, typeof BetaContentBlockSource]>;
|
|
2102
|
-
title: S.optionalWith<S.Union<[S.filter<S.
|
|
1646
|
+
title: S.optionalWith<S.Union<[S.filter<S.filter<typeof S.String>>, typeof S.Null]>, {
|
|
2103
1647
|
nullable: true;
|
|
2104
1648
|
}>;
|
|
2105
|
-
context: S.optionalWith<S.Union<[S.filter<S.
|
|
1649
|
+
context: S.optionalWith<S.Union<[S.filter<typeof S.String>, typeof S.Null]>, {
|
|
2106
1650
|
nullable: true;
|
|
2107
1651
|
}>;
|
|
2108
1652
|
citations: S.optionalWith<typeof BetaRequestCitationsConfig, {
|
|
@@ -2121,7 +1665,7 @@ declare const BetaInputMessage_base: S.Struct<{
|
|
|
2121
1665
|
export declare class BetaInputMessage extends BetaInputMessage_base {
|
|
2122
1666
|
}
|
|
2123
1667
|
declare const BetaMetadata_base: S.Struct<{
|
|
2124
|
-
user_id: S.optionalWith<S.Union<[S.filter<S.
|
|
1668
|
+
user_id: S.optionalWith<S.Union<[S.filter<typeof S.String>, typeof S.Null]>, {
|
|
2125
1669
|
nullable: true;
|
|
2126
1670
|
}>;
|
|
2127
1671
|
}>;
|
|
@@ -2185,7 +1729,7 @@ declare const BetaTool_base: S.Struct<{
|
|
|
2185
1729
|
description: S.optionalWith<typeof S.String, {
|
|
2186
1730
|
nullable: true;
|
|
2187
1731
|
}>;
|
|
2188
|
-
name: S.filter<S.
|
|
1732
|
+
name: S.filter<S.filter<S.filter<typeof S.String>>>;
|
|
2189
1733
|
input_schema: typeof BetaInputSchema;
|
|
2190
1734
|
cache_control: S.optionalWith<S.Union<[typeof BetaCacheControlEphemeral, typeof S.Null]>, {
|
|
2191
1735
|
nullable: true;
|
|
@@ -2205,9 +1749,9 @@ declare const BetaComputerUseTool20241022_base: S.Struct<{
|
|
|
2205
1749
|
}>;
|
|
2206
1750
|
type: typeof BetaComputerUseTool20241022Type;
|
|
2207
1751
|
name: typeof BetaComputerUseTool20241022Name;
|
|
2208
|
-
display_height_px: S.filter<S.
|
|
2209
|
-
display_width_px: S.filter<S.
|
|
2210
|
-
display_number: S.optionalWith<S.Union<[S.filter<S.
|
|
1752
|
+
display_height_px: S.filter<typeof S.Int>;
|
|
1753
|
+
display_width_px: S.filter<typeof S.Int>;
|
|
1754
|
+
display_number: S.optionalWith<S.Union<[S.filter<typeof S.Int>, typeof S.Null]>, {
|
|
2211
1755
|
nullable: true;
|
|
2212
1756
|
}>;
|
|
2213
1757
|
}>;
|
|
@@ -2246,7 +1790,7 @@ export declare class BetaTextEditor20241022 extends BetaTextEditor20241022_base
|
|
|
2246
1790
|
declare const BetaCreateMessageParams_base: S.Class<BetaCreateMessageParams, {
|
|
2247
1791
|
model: typeof Model;
|
|
2248
1792
|
messages: S.Array$<typeof BetaInputMessage>;
|
|
2249
|
-
max_tokens: S.filter<S.
|
|
1793
|
+
max_tokens: S.filter<typeof S.Int>;
|
|
2250
1794
|
metadata: S.optionalWith<typeof BetaMetadata, {
|
|
2251
1795
|
nullable: true;
|
|
2252
1796
|
}>;
|
|
@@ -2259,7 +1803,7 @@ declare const BetaCreateMessageParams_base: S.Class<BetaCreateMessageParams, {
|
|
|
2259
1803
|
system: S.optionalWith<S.Union<[typeof S.String, S.Array$<typeof BetaRequestTextBlock>]>, {
|
|
2260
1804
|
nullable: true;
|
|
2261
1805
|
}>;
|
|
2262
|
-
temperature: S.optionalWith<S.filter<S.
|
|
1806
|
+
temperature: S.optionalWith<S.filter<S.filter<typeof S.Number>>, {
|
|
2263
1807
|
nullable: true;
|
|
2264
1808
|
}>;
|
|
2265
1809
|
tool_choice: S.optionalWith<typeof BetaToolChoice, {
|
|
@@ -2268,16 +1812,16 @@ declare const BetaCreateMessageParams_base: S.Class<BetaCreateMessageParams, {
|
|
|
2268
1812
|
tools: S.optionalWith<S.Array$<S.Union<[typeof BetaTool, typeof BetaComputerUseTool20241022, typeof BetaBashTool20241022, typeof BetaTextEditor20241022]>>, {
|
|
2269
1813
|
nullable: true;
|
|
2270
1814
|
}>;
|
|
2271
|
-
top_k: S.optionalWith<S.filter<S.
|
|
1815
|
+
top_k: S.optionalWith<S.filter<typeof S.Int>, {
|
|
2272
1816
|
nullable: true;
|
|
2273
1817
|
}>;
|
|
2274
|
-
top_p: S.optionalWith<S.filter<S.
|
|
1818
|
+
top_p: S.optionalWith<S.filter<S.filter<typeof S.Number>>, {
|
|
2275
1819
|
nullable: true;
|
|
2276
1820
|
}>;
|
|
2277
1821
|
}, S.Struct.Encoded<{
|
|
2278
1822
|
model: typeof Model;
|
|
2279
1823
|
messages: S.Array$<typeof BetaInputMessage>;
|
|
2280
|
-
max_tokens: S.filter<S.
|
|
1824
|
+
max_tokens: S.filter<typeof S.Int>;
|
|
2281
1825
|
metadata: S.optionalWith<typeof BetaMetadata, {
|
|
2282
1826
|
nullable: true;
|
|
2283
1827
|
}>;
|
|
@@ -2290,7 +1834,7 @@ declare const BetaCreateMessageParams_base: S.Class<BetaCreateMessageParams, {
|
|
|
2290
1834
|
system: S.optionalWith<S.Union<[typeof S.String, S.Array$<typeof BetaRequestTextBlock>]>, {
|
|
2291
1835
|
nullable: true;
|
|
2292
1836
|
}>;
|
|
2293
|
-
temperature: S.optionalWith<S.filter<S.
|
|
1837
|
+
temperature: S.optionalWith<S.filter<S.filter<typeof S.Number>>, {
|
|
2294
1838
|
nullable: true;
|
|
2295
1839
|
}>;
|
|
2296
1840
|
tool_choice: S.optionalWith<typeof BetaToolChoice, {
|
|
@@ -2299,10 +1843,10 @@ declare const BetaCreateMessageParams_base: S.Class<BetaCreateMessageParams, {
|
|
|
2299
1843
|
tools: S.optionalWith<S.Array$<S.Union<[typeof BetaTool, typeof BetaComputerUseTool20241022, typeof BetaBashTool20241022, typeof BetaTextEditor20241022]>>, {
|
|
2300
1844
|
nullable: true;
|
|
2301
1845
|
}>;
|
|
2302
|
-
top_k: S.optionalWith<S.filter<S.
|
|
1846
|
+
top_k: S.optionalWith<S.filter<typeof S.Int>, {
|
|
2303
1847
|
nullable: true;
|
|
2304
1848
|
}>;
|
|
2305
|
-
top_p: S.optionalWith<S.filter<S.
|
|
1849
|
+
top_p: S.optionalWith<S.filter<S.filter<typeof S.Number>>, {
|
|
2306
1850
|
nullable: true;
|
|
2307
1851
|
}>;
|
|
2308
1852
|
}>, never, {
|
|
@@ -2578,9 +2122,9 @@ export declare class BetaResponseCharLocationCitationType extends BetaResponseCh
|
|
|
2578
2122
|
declare const BetaResponseCharLocationCitation_base: S.Struct<{
|
|
2579
2123
|
type: S.PropertySignature<":", "char_location", never, ":", "char_location", true, never>;
|
|
2580
2124
|
cited_text: typeof S.String;
|
|
2581
|
-
document_index: S.filter<S.
|
|
2125
|
+
document_index: S.filter<typeof S.Int>;
|
|
2582
2126
|
document_title: S.Union<[typeof S.String, typeof S.Null]>;
|
|
2583
|
-
start_char_index: S.filter<S.
|
|
2127
|
+
start_char_index: S.filter<typeof S.Int>;
|
|
2584
2128
|
end_char_index: typeof S.Int;
|
|
2585
2129
|
}>;
|
|
2586
2130
|
export declare class BetaResponseCharLocationCitation extends BetaResponseCharLocationCitation_base {
|
|
@@ -2591,9 +2135,9 @@ export declare class BetaResponsePageLocationCitationType extends BetaResponsePa
|
|
|
2591
2135
|
declare const BetaResponsePageLocationCitation_base: S.Struct<{
|
|
2592
2136
|
type: S.PropertySignature<":", "page_location", never, ":", "page_location", true, never>;
|
|
2593
2137
|
cited_text: typeof S.String;
|
|
2594
|
-
document_index: S.filter<S.
|
|
2138
|
+
document_index: S.filter<typeof S.Int>;
|
|
2595
2139
|
document_title: S.Union<[typeof S.String, typeof S.Null]>;
|
|
2596
|
-
start_page_number: S.filter<S.
|
|
2140
|
+
start_page_number: S.filter<typeof S.Int>;
|
|
2597
2141
|
end_page_number: typeof S.Int;
|
|
2598
2142
|
}>;
|
|
2599
2143
|
export declare class BetaResponsePageLocationCitation extends BetaResponsePageLocationCitation_base {
|
|
@@ -2604,16 +2148,16 @@ export declare class BetaResponseContentBlockLocationCitationType extends BetaRe
|
|
|
2604
2148
|
declare const BetaResponseContentBlockLocationCitation_base: S.Struct<{
|
|
2605
2149
|
type: S.PropertySignature<":", "content_block_location", never, ":", "content_block_location", true, never>;
|
|
2606
2150
|
cited_text: typeof S.String;
|
|
2607
|
-
document_index: S.filter<S.
|
|
2151
|
+
document_index: S.filter<typeof S.Int>;
|
|
2608
2152
|
document_title: S.Union<[typeof S.String, typeof S.Null]>;
|
|
2609
|
-
start_block_index: S.filter<S.
|
|
2153
|
+
start_block_index: S.filter<typeof S.Int>;
|
|
2610
2154
|
end_block_index: typeof S.Int;
|
|
2611
2155
|
}>;
|
|
2612
2156
|
export declare class BetaResponseContentBlockLocationCitation extends BetaResponseContentBlockLocationCitation_base {
|
|
2613
2157
|
}
|
|
2614
2158
|
declare const BetaResponseTextBlock_base: S.Struct<{
|
|
2615
2159
|
type: S.PropertySignature<":", "text", never, ":", "text", true, never>;
|
|
2616
|
-
text: S.filter<S.
|
|
2160
|
+
text: S.filter<S.filter<typeof S.String>>;
|
|
2617
2161
|
citations: S.optionalWith<S.NullOr<S.Union<[S.Array$<S.Union<[typeof BetaResponseCharLocationCitation, typeof BetaResponsePageLocationCitation, typeof BetaResponseContentBlockLocationCitation]>>, typeof S.Null]>>, {
|
|
2618
2162
|
default: () => null;
|
|
2619
2163
|
}>;
|
|
@@ -2625,8 +2169,8 @@ export declare class BetaResponseToolUseBlockType extends BetaResponseToolUseBlo
|
|
|
2625
2169
|
}
|
|
2626
2170
|
declare const BetaResponseToolUseBlock_base: S.Struct<{
|
|
2627
2171
|
type: S.PropertySignature<":", "tool_use", never, ":", "tool_use", true, never>;
|
|
2628
|
-
id: S.filter<S.
|
|
2629
|
-
name: S.filter<S.
|
|
2172
|
+
id: S.filter<typeof S.String>;
|
|
2173
|
+
name: S.filter<typeof S.String>;
|
|
2630
2174
|
input: S.Record$<typeof S.String, typeof S.Unknown>;
|
|
2631
2175
|
}>;
|
|
2632
2176
|
export declare class BetaResponseToolUseBlock extends BetaResponseToolUseBlock_base {
|
|
@@ -2638,14 +2182,14 @@ declare const BetaMessageStopReasonEnum_base: S.Literal<["end_turn", "max_tokens
|
|
|
2638
2182
|
export declare class BetaMessageStopReasonEnum extends BetaMessageStopReasonEnum_base {
|
|
2639
2183
|
}
|
|
2640
2184
|
declare const BetaUsage_base: S.Struct<{
|
|
2641
|
-
input_tokens: S.filter<S.
|
|
2642
|
-
cache_creation_input_tokens: S.optionalWith<S.NullOr<S.Union<[S.filter<S.
|
|
2185
|
+
input_tokens: S.filter<typeof S.Int>;
|
|
2186
|
+
cache_creation_input_tokens: S.optionalWith<S.NullOr<S.Union<[S.filter<typeof S.Int>, typeof S.Null]>>, {
|
|
2643
2187
|
default: () => null;
|
|
2644
2188
|
}>;
|
|
2645
|
-
cache_read_input_tokens: S.optionalWith<S.NullOr<S.Union<[S.filter<S.
|
|
2189
|
+
cache_read_input_tokens: S.optionalWith<S.NullOr<S.Union<[S.filter<typeof S.Int>, typeof S.Null]>>, {
|
|
2646
2190
|
default: () => null;
|
|
2647
2191
|
}>;
|
|
2648
|
-
output_tokens: S.filter<S.
|
|
2192
|
+
output_tokens: S.filter<typeof S.Int>;
|
|
2649
2193
|
}>;
|
|
2650
2194
|
export declare class BetaUsage extends BetaUsage_base {
|
|
2651
2195
|
}
|
|
@@ -2858,7 +2402,7 @@ declare const BetaModelsListParams_base: S.Struct<{
|
|
|
2858
2402
|
after_id: S.optionalWith<typeof S.String, {
|
|
2859
2403
|
nullable: true;
|
|
2860
2404
|
}>;
|
|
2861
|
-
limit: S.optionalWith<S.filter<S.
|
|
2405
|
+
limit: S.optionalWith<S.filter<S.filter<typeof S.Int>>, {
|
|
2862
2406
|
nullable: true;
|
|
2863
2407
|
default: () => 20;
|
|
2864
2408
|
}>;
|
|
@@ -2925,7 +2469,7 @@ declare const BetaMessageBatchesListParams_base: S.Struct<{
|
|
|
2925
2469
|
after_id: S.optionalWith<typeof S.String, {
|
|
2926
2470
|
nullable: true;
|
|
2927
2471
|
}>;
|
|
2928
|
-
limit: S.optionalWith<S.filter<S.
|
|
2472
|
+
limit: S.optionalWith<S.filter<S.filter<typeof S.Int>>, {
|
|
2929
2473
|
nullable: true;
|
|
2930
2474
|
default: () => 20;
|
|
2931
2475
|
}>;
|
|
@@ -3019,515 +2563,15 @@ declare const BetaMessageBatchesPostParams_base: S.Struct<{
|
|
|
3019
2563
|
export declare class BetaMessageBatchesPostParams extends BetaMessageBatchesPostParams_base {
|
|
3020
2564
|
}
|
|
3021
2565
|
declare const BetaMessageBatchIndividualRequestParams_base: S.Struct<{
|
|
3022
|
-
custom_id: S.filter<S.
|
|
2566
|
+
custom_id: S.filter<S.filter<S.filter<typeof S.String>>>;
|
|
3023
2567
|
params: typeof BetaCreateMessageParams;
|
|
3024
2568
|
}>;
|
|
3025
2569
|
export declare class BetaMessageBatchIndividualRequestParams extends BetaMessageBatchIndividualRequestParams_base {
|
|
3026
2570
|
}
|
|
3027
2571
|
declare const BetaCreateMessageBatchParams_base: S.Class<BetaCreateMessageBatchParams, {
|
|
3028
|
-
requests: S.filter<S.
|
|
3029
|
-
readonly custom_id: string;
|
|
3030
|
-
readonly params: BetaCreateMessageParams;
|
|
3031
|
-
}[], readonly {
|
|
3032
|
-
readonly custom_id: string;
|
|
3033
|
-
readonly params: {
|
|
3034
|
-
readonly model: string;
|
|
3035
|
-
readonly messages: readonly {
|
|
3036
|
-
readonly content: string | readonly ({
|
|
3037
|
-
readonly type: "text";
|
|
3038
|
-
readonly text: string;
|
|
3039
|
-
readonly cache_control?: {
|
|
3040
|
-
readonly type: "ephemeral";
|
|
3041
|
-
} | null | undefined;
|
|
3042
|
-
readonly citations?: readonly ({
|
|
3043
|
-
readonly type: "char_location";
|
|
3044
|
-
readonly cited_text: string;
|
|
3045
|
-
readonly document_index: number;
|
|
3046
|
-
readonly document_title: string | null;
|
|
3047
|
-
readonly start_char_index: number;
|
|
3048
|
-
readonly end_char_index: number;
|
|
3049
|
-
} | {
|
|
3050
|
-
readonly type: "page_location";
|
|
3051
|
-
readonly cited_text: string;
|
|
3052
|
-
readonly document_index: number;
|
|
3053
|
-
readonly document_title: string | null;
|
|
3054
|
-
readonly start_page_number: number;
|
|
3055
|
-
readonly end_page_number: number;
|
|
3056
|
-
} | {
|
|
3057
|
-
readonly type: "content_block_location";
|
|
3058
|
-
readonly cited_text: string;
|
|
3059
|
-
readonly document_index: number;
|
|
3060
|
-
readonly document_title: string | null;
|
|
3061
|
-
readonly start_block_index: number;
|
|
3062
|
-
readonly end_block_index: number;
|
|
3063
|
-
})[] | null | undefined;
|
|
3064
|
-
} | {
|
|
3065
|
-
readonly type: "image";
|
|
3066
|
-
readonly source: {
|
|
3067
|
-
readonly type: "base64";
|
|
3068
|
-
readonly media_type: "image/jpeg" | "image/png" | "image/gif" | "image/webp";
|
|
3069
|
-
readonly data: string;
|
|
3070
|
-
};
|
|
3071
|
-
readonly cache_control?: {
|
|
3072
|
-
readonly type: "ephemeral";
|
|
3073
|
-
} | null | undefined;
|
|
3074
|
-
} | {
|
|
3075
|
-
readonly type: "tool_use";
|
|
3076
|
-
readonly id: string;
|
|
3077
|
-
readonly name: string;
|
|
3078
|
-
readonly input: {
|
|
3079
|
-
readonly [x: string]: unknown;
|
|
3080
|
-
};
|
|
3081
|
-
readonly cache_control?: {
|
|
3082
|
-
readonly type: "ephemeral";
|
|
3083
|
-
} | null | undefined;
|
|
3084
|
-
} | {
|
|
3085
|
-
readonly type: "tool_result";
|
|
3086
|
-
readonly tool_use_id: string;
|
|
3087
|
-
readonly cache_control?: {
|
|
3088
|
-
readonly type: "ephemeral";
|
|
3089
|
-
} | null | undefined;
|
|
3090
|
-
readonly is_error?: boolean | null | undefined;
|
|
3091
|
-
readonly content?: string | readonly ({
|
|
3092
|
-
readonly type: "text";
|
|
3093
|
-
readonly text: string;
|
|
3094
|
-
readonly cache_control?: {
|
|
3095
|
-
readonly type: "ephemeral";
|
|
3096
|
-
} | null | undefined;
|
|
3097
|
-
readonly citations?: readonly ({
|
|
3098
|
-
readonly type: "char_location";
|
|
3099
|
-
readonly cited_text: string;
|
|
3100
|
-
readonly document_index: number;
|
|
3101
|
-
readonly document_title: string | null;
|
|
3102
|
-
readonly start_char_index: number;
|
|
3103
|
-
readonly end_char_index: number;
|
|
3104
|
-
} | {
|
|
3105
|
-
readonly type: "page_location";
|
|
3106
|
-
readonly cited_text: string;
|
|
3107
|
-
readonly document_index: number;
|
|
3108
|
-
readonly document_title: string | null;
|
|
3109
|
-
readonly start_page_number: number;
|
|
3110
|
-
readonly end_page_number: number;
|
|
3111
|
-
} | {
|
|
3112
|
-
readonly type: "content_block_location";
|
|
3113
|
-
readonly cited_text: string;
|
|
3114
|
-
readonly document_index: number;
|
|
3115
|
-
readonly document_title: string | null;
|
|
3116
|
-
readonly start_block_index: number;
|
|
3117
|
-
readonly end_block_index: number;
|
|
3118
|
-
})[] | null | undefined;
|
|
3119
|
-
} | {
|
|
3120
|
-
readonly type: "image";
|
|
3121
|
-
readonly source: {
|
|
3122
|
-
readonly type: "base64";
|
|
3123
|
-
readonly media_type: "image/jpeg" | "image/png" | "image/gif" | "image/webp";
|
|
3124
|
-
readonly data: string;
|
|
3125
|
-
};
|
|
3126
|
-
readonly cache_control?: {
|
|
3127
|
-
readonly type: "ephemeral";
|
|
3128
|
-
} | null | undefined;
|
|
3129
|
-
})[] | null | undefined;
|
|
3130
|
-
} | {
|
|
3131
|
-
readonly type: "document";
|
|
3132
|
-
readonly source: {
|
|
3133
|
-
readonly type: "base64";
|
|
3134
|
-
readonly media_type: "application/pdf";
|
|
3135
|
-
readonly data: string;
|
|
3136
|
-
} | {
|
|
3137
|
-
readonly type: "text";
|
|
3138
|
-
readonly media_type: "text/plain";
|
|
3139
|
-
readonly data: string;
|
|
3140
|
-
} | {
|
|
3141
|
-
readonly type: "content";
|
|
3142
|
-
readonly content: string | readonly ({
|
|
3143
|
-
readonly type: "text";
|
|
3144
|
-
readonly text: string;
|
|
3145
|
-
readonly cache_control?: {
|
|
3146
|
-
readonly type: "ephemeral";
|
|
3147
|
-
} | null | undefined;
|
|
3148
|
-
readonly citations?: readonly ({
|
|
3149
|
-
readonly type: "char_location";
|
|
3150
|
-
readonly cited_text: string;
|
|
3151
|
-
readonly document_index: number;
|
|
3152
|
-
readonly document_title: string | null;
|
|
3153
|
-
readonly start_char_index: number;
|
|
3154
|
-
readonly end_char_index: number;
|
|
3155
|
-
} | {
|
|
3156
|
-
readonly type: "page_location";
|
|
3157
|
-
readonly cited_text: string;
|
|
3158
|
-
readonly document_index: number;
|
|
3159
|
-
readonly document_title: string | null;
|
|
3160
|
-
readonly start_page_number: number;
|
|
3161
|
-
readonly end_page_number: number;
|
|
3162
|
-
} | {
|
|
3163
|
-
readonly type: "content_block_location";
|
|
3164
|
-
readonly cited_text: string;
|
|
3165
|
-
readonly document_index: number;
|
|
3166
|
-
readonly document_title: string | null;
|
|
3167
|
-
readonly start_block_index: number;
|
|
3168
|
-
readonly end_block_index: number;
|
|
3169
|
-
})[] | null | undefined;
|
|
3170
|
-
} | {
|
|
3171
|
-
readonly type: "image";
|
|
3172
|
-
readonly source: {
|
|
3173
|
-
readonly type: "base64";
|
|
3174
|
-
readonly media_type: "image/jpeg" | "image/png" | "image/gif" | "image/webp";
|
|
3175
|
-
readonly data: string;
|
|
3176
|
-
};
|
|
3177
|
-
readonly cache_control?: {
|
|
3178
|
-
readonly type: "ephemeral";
|
|
3179
|
-
} | null | undefined;
|
|
3180
|
-
})[];
|
|
3181
|
-
};
|
|
3182
|
-
readonly cache_control?: {
|
|
3183
|
-
readonly type: "ephemeral";
|
|
3184
|
-
} | null | undefined;
|
|
3185
|
-
readonly citations?: {
|
|
3186
|
-
readonly enabled?: boolean | null | undefined;
|
|
3187
|
-
} | null | undefined;
|
|
3188
|
-
readonly title?: string | null | undefined;
|
|
3189
|
-
readonly context?: string | null | undefined;
|
|
3190
|
-
})[];
|
|
3191
|
-
readonly role: "user" | "assistant";
|
|
3192
|
-
}[];
|
|
3193
|
-
readonly max_tokens: number;
|
|
3194
|
-
readonly metadata?: {
|
|
3195
|
-
readonly user_id?: string | null | undefined;
|
|
3196
|
-
} | null | undefined;
|
|
3197
|
-
readonly stop_sequences?: readonly string[] | null | undefined;
|
|
3198
|
-
readonly stream?: boolean | null | undefined;
|
|
3199
|
-
readonly system?: string | readonly {
|
|
3200
|
-
readonly type: "text";
|
|
3201
|
-
readonly text: string;
|
|
3202
|
-
readonly cache_control?: {
|
|
3203
|
-
readonly type: "ephemeral";
|
|
3204
|
-
} | null | undefined;
|
|
3205
|
-
readonly citations?: readonly ({
|
|
3206
|
-
readonly type: "char_location";
|
|
3207
|
-
readonly cited_text: string;
|
|
3208
|
-
readonly document_index: number;
|
|
3209
|
-
readonly document_title: string | null;
|
|
3210
|
-
readonly start_char_index: number;
|
|
3211
|
-
readonly end_char_index: number;
|
|
3212
|
-
} | {
|
|
3213
|
-
readonly type: "page_location";
|
|
3214
|
-
readonly cited_text: string;
|
|
3215
|
-
readonly document_index: number;
|
|
3216
|
-
readonly document_title: string | null;
|
|
3217
|
-
readonly start_page_number: number;
|
|
3218
|
-
readonly end_page_number: number;
|
|
3219
|
-
} | {
|
|
3220
|
-
readonly type: "content_block_location";
|
|
3221
|
-
readonly cited_text: string;
|
|
3222
|
-
readonly document_index: number;
|
|
3223
|
-
readonly document_title: string | null;
|
|
3224
|
-
readonly start_block_index: number;
|
|
3225
|
-
readonly end_block_index: number;
|
|
3226
|
-
})[] | null | undefined;
|
|
3227
|
-
}[] | null | undefined;
|
|
3228
|
-
readonly temperature?: number | null | undefined;
|
|
3229
|
-
readonly tool_choice?: {
|
|
3230
|
-
readonly type: "auto";
|
|
3231
|
-
readonly disable_parallel_tool_use?: boolean | null | undefined;
|
|
3232
|
-
} | {
|
|
3233
|
-
readonly type: "any";
|
|
3234
|
-
readonly disable_parallel_tool_use?: boolean | null | undefined;
|
|
3235
|
-
} | {
|
|
3236
|
-
readonly type: "tool";
|
|
3237
|
-
readonly name: string;
|
|
3238
|
-
readonly disable_parallel_tool_use?: boolean | null | undefined;
|
|
3239
|
-
} | null | undefined;
|
|
3240
|
-
readonly tools?: readonly ({
|
|
3241
|
-
readonly name: string;
|
|
3242
|
-
readonly input_schema: {
|
|
3243
|
-
readonly type: "object";
|
|
3244
|
-
readonly properties?: {
|
|
3245
|
-
readonly [x: string]: unknown;
|
|
3246
|
-
} | null | undefined;
|
|
3247
|
-
};
|
|
3248
|
-
readonly type?: "custom" | null | undefined;
|
|
3249
|
-
readonly cache_control?: {
|
|
3250
|
-
readonly type: "ephemeral";
|
|
3251
|
-
} | null | undefined;
|
|
3252
|
-
readonly description?: string | null | undefined;
|
|
3253
|
-
} | {
|
|
3254
|
-
readonly type: "computer_20241022";
|
|
3255
|
-
readonly name: "computer";
|
|
3256
|
-
readonly display_height_px: number;
|
|
3257
|
-
readonly display_width_px: number;
|
|
3258
|
-
readonly cache_control?: {
|
|
3259
|
-
readonly type: "ephemeral";
|
|
3260
|
-
} | null | undefined;
|
|
3261
|
-
readonly display_number?: number | null | undefined;
|
|
3262
|
-
} | {
|
|
3263
|
-
readonly type: "bash_20241022";
|
|
3264
|
-
readonly name: "bash";
|
|
3265
|
-
readonly cache_control?: {
|
|
3266
|
-
readonly type: "ephemeral";
|
|
3267
|
-
} | null | undefined;
|
|
3268
|
-
} | {
|
|
3269
|
-
readonly type: "text_editor_20241022";
|
|
3270
|
-
readonly name: "str_replace_editor";
|
|
3271
|
-
readonly cache_control?: {
|
|
3272
|
-
readonly type: "ephemeral";
|
|
3273
|
-
} | null | undefined;
|
|
3274
|
-
})[] | null | undefined;
|
|
3275
|
-
readonly top_k?: number | null | undefined;
|
|
3276
|
-
readonly top_p?: number | null | undefined;
|
|
3277
|
-
};
|
|
3278
|
-
}[], never>>;
|
|
2572
|
+
requests: S.filter<S.filter<S.Array$<typeof BetaMessageBatchIndividualRequestParams>>>;
|
|
3279
2573
|
}, S.Struct.Encoded<{
|
|
3280
|
-
requests: S.filter<S.
|
|
3281
|
-
readonly custom_id: string;
|
|
3282
|
-
readonly params: BetaCreateMessageParams;
|
|
3283
|
-
}[], readonly {
|
|
3284
|
-
readonly custom_id: string;
|
|
3285
|
-
readonly params: {
|
|
3286
|
-
readonly model: string;
|
|
3287
|
-
readonly messages: readonly {
|
|
3288
|
-
readonly content: string | readonly ({
|
|
3289
|
-
readonly type: "text";
|
|
3290
|
-
readonly text: string;
|
|
3291
|
-
readonly cache_control?: {
|
|
3292
|
-
readonly type: "ephemeral";
|
|
3293
|
-
} | null | undefined;
|
|
3294
|
-
readonly citations?: readonly ({
|
|
3295
|
-
readonly type: "char_location";
|
|
3296
|
-
readonly cited_text: string;
|
|
3297
|
-
readonly document_index: number;
|
|
3298
|
-
readonly document_title: string | null;
|
|
3299
|
-
readonly start_char_index: number;
|
|
3300
|
-
readonly end_char_index: number;
|
|
3301
|
-
} | {
|
|
3302
|
-
readonly type: "page_location";
|
|
3303
|
-
readonly cited_text: string;
|
|
3304
|
-
readonly document_index: number;
|
|
3305
|
-
readonly document_title: string | null;
|
|
3306
|
-
readonly start_page_number: number;
|
|
3307
|
-
readonly end_page_number: number;
|
|
3308
|
-
} | {
|
|
3309
|
-
readonly type: "content_block_location";
|
|
3310
|
-
readonly cited_text: string;
|
|
3311
|
-
readonly document_index: number;
|
|
3312
|
-
readonly document_title: string | null;
|
|
3313
|
-
readonly start_block_index: number;
|
|
3314
|
-
readonly end_block_index: number;
|
|
3315
|
-
})[] | null | undefined;
|
|
3316
|
-
} | {
|
|
3317
|
-
readonly type: "image";
|
|
3318
|
-
readonly source: {
|
|
3319
|
-
readonly type: "base64";
|
|
3320
|
-
readonly media_type: "image/jpeg" | "image/png" | "image/gif" | "image/webp";
|
|
3321
|
-
readonly data: string;
|
|
3322
|
-
};
|
|
3323
|
-
readonly cache_control?: {
|
|
3324
|
-
readonly type: "ephemeral";
|
|
3325
|
-
} | null | undefined;
|
|
3326
|
-
} | {
|
|
3327
|
-
readonly type: "tool_use";
|
|
3328
|
-
readonly id: string;
|
|
3329
|
-
readonly name: string;
|
|
3330
|
-
readonly input: {
|
|
3331
|
-
readonly [x: string]: unknown;
|
|
3332
|
-
};
|
|
3333
|
-
readonly cache_control?: {
|
|
3334
|
-
readonly type: "ephemeral";
|
|
3335
|
-
} | null | undefined;
|
|
3336
|
-
} | {
|
|
3337
|
-
readonly type: "tool_result";
|
|
3338
|
-
readonly tool_use_id: string;
|
|
3339
|
-
readonly cache_control?: {
|
|
3340
|
-
readonly type: "ephemeral";
|
|
3341
|
-
} | null | undefined;
|
|
3342
|
-
readonly is_error?: boolean | null | undefined;
|
|
3343
|
-
readonly content?: string | readonly ({
|
|
3344
|
-
readonly type: "text";
|
|
3345
|
-
readonly text: string;
|
|
3346
|
-
readonly cache_control?: {
|
|
3347
|
-
readonly type: "ephemeral";
|
|
3348
|
-
} | null | undefined;
|
|
3349
|
-
readonly citations?: readonly ({
|
|
3350
|
-
readonly type: "char_location";
|
|
3351
|
-
readonly cited_text: string;
|
|
3352
|
-
readonly document_index: number;
|
|
3353
|
-
readonly document_title: string | null;
|
|
3354
|
-
readonly start_char_index: number;
|
|
3355
|
-
readonly end_char_index: number;
|
|
3356
|
-
} | {
|
|
3357
|
-
readonly type: "page_location";
|
|
3358
|
-
readonly cited_text: string;
|
|
3359
|
-
readonly document_index: number;
|
|
3360
|
-
readonly document_title: string | null;
|
|
3361
|
-
readonly start_page_number: number;
|
|
3362
|
-
readonly end_page_number: number;
|
|
3363
|
-
} | {
|
|
3364
|
-
readonly type: "content_block_location";
|
|
3365
|
-
readonly cited_text: string;
|
|
3366
|
-
readonly document_index: number;
|
|
3367
|
-
readonly document_title: string | null;
|
|
3368
|
-
readonly start_block_index: number;
|
|
3369
|
-
readonly end_block_index: number;
|
|
3370
|
-
})[] | null | undefined;
|
|
3371
|
-
} | {
|
|
3372
|
-
readonly type: "image";
|
|
3373
|
-
readonly source: {
|
|
3374
|
-
readonly type: "base64";
|
|
3375
|
-
readonly media_type: "image/jpeg" | "image/png" | "image/gif" | "image/webp";
|
|
3376
|
-
readonly data: string;
|
|
3377
|
-
};
|
|
3378
|
-
readonly cache_control?: {
|
|
3379
|
-
readonly type: "ephemeral";
|
|
3380
|
-
} | null | undefined;
|
|
3381
|
-
})[] | null | undefined;
|
|
3382
|
-
} | {
|
|
3383
|
-
readonly type: "document";
|
|
3384
|
-
readonly source: {
|
|
3385
|
-
readonly type: "base64";
|
|
3386
|
-
readonly media_type: "application/pdf";
|
|
3387
|
-
readonly data: string;
|
|
3388
|
-
} | {
|
|
3389
|
-
readonly type: "text";
|
|
3390
|
-
readonly media_type: "text/plain";
|
|
3391
|
-
readonly data: string;
|
|
3392
|
-
} | {
|
|
3393
|
-
readonly type: "content";
|
|
3394
|
-
readonly content: string | readonly ({
|
|
3395
|
-
readonly type: "text";
|
|
3396
|
-
readonly text: string;
|
|
3397
|
-
readonly cache_control?: {
|
|
3398
|
-
readonly type: "ephemeral";
|
|
3399
|
-
} | null | undefined;
|
|
3400
|
-
readonly citations?: readonly ({
|
|
3401
|
-
readonly type: "char_location";
|
|
3402
|
-
readonly cited_text: string;
|
|
3403
|
-
readonly document_index: number;
|
|
3404
|
-
readonly document_title: string | null;
|
|
3405
|
-
readonly start_char_index: number;
|
|
3406
|
-
readonly end_char_index: number;
|
|
3407
|
-
} | {
|
|
3408
|
-
readonly type: "page_location";
|
|
3409
|
-
readonly cited_text: string;
|
|
3410
|
-
readonly document_index: number;
|
|
3411
|
-
readonly document_title: string | null;
|
|
3412
|
-
readonly start_page_number: number;
|
|
3413
|
-
readonly end_page_number: number;
|
|
3414
|
-
} | {
|
|
3415
|
-
readonly type: "content_block_location";
|
|
3416
|
-
readonly cited_text: string;
|
|
3417
|
-
readonly document_index: number;
|
|
3418
|
-
readonly document_title: string | null;
|
|
3419
|
-
readonly start_block_index: number;
|
|
3420
|
-
readonly end_block_index: number;
|
|
3421
|
-
})[] | null | undefined;
|
|
3422
|
-
} | {
|
|
3423
|
-
readonly type: "image";
|
|
3424
|
-
readonly source: {
|
|
3425
|
-
readonly type: "base64";
|
|
3426
|
-
readonly media_type: "image/jpeg" | "image/png" | "image/gif" | "image/webp";
|
|
3427
|
-
readonly data: string;
|
|
3428
|
-
};
|
|
3429
|
-
readonly cache_control?: {
|
|
3430
|
-
readonly type: "ephemeral";
|
|
3431
|
-
} | null | undefined;
|
|
3432
|
-
})[];
|
|
3433
|
-
};
|
|
3434
|
-
readonly cache_control?: {
|
|
3435
|
-
readonly type: "ephemeral";
|
|
3436
|
-
} | null | undefined;
|
|
3437
|
-
readonly citations?: {
|
|
3438
|
-
readonly enabled?: boolean | null | undefined;
|
|
3439
|
-
} | null | undefined;
|
|
3440
|
-
readonly title?: string | null | undefined;
|
|
3441
|
-
readonly context?: string | null | undefined;
|
|
3442
|
-
})[];
|
|
3443
|
-
readonly role: "user" | "assistant";
|
|
3444
|
-
}[];
|
|
3445
|
-
readonly max_tokens: number;
|
|
3446
|
-
readonly metadata?: {
|
|
3447
|
-
readonly user_id?: string | null | undefined;
|
|
3448
|
-
} | null | undefined;
|
|
3449
|
-
readonly stop_sequences?: readonly string[] | null | undefined;
|
|
3450
|
-
readonly stream?: boolean | null | undefined;
|
|
3451
|
-
readonly system?: string | readonly {
|
|
3452
|
-
readonly type: "text";
|
|
3453
|
-
readonly text: string;
|
|
3454
|
-
readonly cache_control?: {
|
|
3455
|
-
readonly type: "ephemeral";
|
|
3456
|
-
} | null | undefined;
|
|
3457
|
-
readonly citations?: readonly ({
|
|
3458
|
-
readonly type: "char_location";
|
|
3459
|
-
readonly cited_text: string;
|
|
3460
|
-
readonly document_index: number;
|
|
3461
|
-
readonly document_title: string | null;
|
|
3462
|
-
readonly start_char_index: number;
|
|
3463
|
-
readonly end_char_index: number;
|
|
3464
|
-
} | {
|
|
3465
|
-
readonly type: "page_location";
|
|
3466
|
-
readonly cited_text: string;
|
|
3467
|
-
readonly document_index: number;
|
|
3468
|
-
readonly document_title: string | null;
|
|
3469
|
-
readonly start_page_number: number;
|
|
3470
|
-
readonly end_page_number: number;
|
|
3471
|
-
} | {
|
|
3472
|
-
readonly type: "content_block_location";
|
|
3473
|
-
readonly cited_text: string;
|
|
3474
|
-
readonly document_index: number;
|
|
3475
|
-
readonly document_title: string | null;
|
|
3476
|
-
readonly start_block_index: number;
|
|
3477
|
-
readonly end_block_index: number;
|
|
3478
|
-
})[] | null | undefined;
|
|
3479
|
-
}[] | null | undefined;
|
|
3480
|
-
readonly temperature?: number | null | undefined;
|
|
3481
|
-
readonly tool_choice?: {
|
|
3482
|
-
readonly type: "auto";
|
|
3483
|
-
readonly disable_parallel_tool_use?: boolean | null | undefined;
|
|
3484
|
-
} | {
|
|
3485
|
-
readonly type: "any";
|
|
3486
|
-
readonly disable_parallel_tool_use?: boolean | null | undefined;
|
|
3487
|
-
} | {
|
|
3488
|
-
readonly type: "tool";
|
|
3489
|
-
readonly name: string;
|
|
3490
|
-
readonly disable_parallel_tool_use?: boolean | null | undefined;
|
|
3491
|
-
} | null | undefined;
|
|
3492
|
-
readonly tools?: readonly ({
|
|
3493
|
-
readonly name: string;
|
|
3494
|
-
readonly input_schema: {
|
|
3495
|
-
readonly type: "object";
|
|
3496
|
-
readonly properties?: {
|
|
3497
|
-
readonly [x: string]: unknown;
|
|
3498
|
-
} | null | undefined;
|
|
3499
|
-
};
|
|
3500
|
-
readonly type?: "custom" | null | undefined;
|
|
3501
|
-
readonly cache_control?: {
|
|
3502
|
-
readonly type: "ephemeral";
|
|
3503
|
-
} | null | undefined;
|
|
3504
|
-
readonly description?: string | null | undefined;
|
|
3505
|
-
} | {
|
|
3506
|
-
readonly type: "computer_20241022";
|
|
3507
|
-
readonly name: "computer";
|
|
3508
|
-
readonly display_height_px: number;
|
|
3509
|
-
readonly display_width_px: number;
|
|
3510
|
-
readonly cache_control?: {
|
|
3511
|
-
readonly type: "ephemeral";
|
|
3512
|
-
} | null | undefined;
|
|
3513
|
-
readonly display_number?: number | null | undefined;
|
|
3514
|
-
} | {
|
|
3515
|
-
readonly type: "bash_20241022";
|
|
3516
|
-
readonly name: "bash";
|
|
3517
|
-
readonly cache_control?: {
|
|
3518
|
-
readonly type: "ephemeral";
|
|
3519
|
-
} | null | undefined;
|
|
3520
|
-
} | {
|
|
3521
|
-
readonly type: "text_editor_20241022";
|
|
3522
|
-
readonly name: "str_replace_editor";
|
|
3523
|
-
readonly cache_control?: {
|
|
3524
|
-
readonly type: "ephemeral";
|
|
3525
|
-
} | null | undefined;
|
|
3526
|
-
})[] | null | undefined;
|
|
3527
|
-
readonly top_k?: number | null | undefined;
|
|
3528
|
-
readonly top_p?: number | null | undefined;
|
|
3529
|
-
};
|
|
3530
|
-
}[], never>>;
|
|
2574
|
+
requests: S.filter<S.filter<S.Array$<typeof BetaMessageBatchIndividualRequestParams>>>;
|
|
3531
2575
|
}>, never, {
|
|
3532
2576
|
readonly requests: readonly {
|
|
3533
2577
|
readonly custom_id: string;
|