@effect/ai-anthropic 0.0.1
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/AnthropicClient/package.json +6 -0
- package/AnthropicCompletions/package.json +6 -0
- package/AnthropicConfig/package.json +6 -0
- package/AnthropicTokenizer/package.json +6 -0
- package/Generated/package.json +6 -0
- package/LICENSE +21 -0
- package/README.md +5 -0
- package/dist/cjs/AnthropicClient.js +213 -0
- package/dist/cjs/AnthropicClient.js.map +1 -0
- package/dist/cjs/AnthropicCompletions.js +290 -0
- package/dist/cjs/AnthropicCompletions.js.map +1 -0
- package/dist/cjs/AnthropicConfig.js +31 -0
- package/dist/cjs/AnthropicConfig.js.map +1 -0
- package/dist/cjs/AnthropicTokenizer.js +50 -0
- package/dist/cjs/AnthropicTokenizer.js.map +1 -0
- package/dist/cjs/Generated.js +1510 -0
- package/dist/cjs/Generated.js.map +1 -0
- package/dist/cjs/index.js +19 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/dts/AnthropicClient.d.ts +126 -0
- package/dist/dts/AnthropicClient.d.ts.map +1 -0
- package/dist/dts/AnthropicCompletions.d.ts +25 -0
- package/dist/dts/AnthropicCompletions.d.ts.map +1 -0
- package/dist/dts/AnthropicConfig.d.ts +39 -0
- package/dist/dts/AnthropicConfig.d.ts.map +1 -0
- package/dist/dts/AnthropicTokenizer.d.ts +8 -0
- package/dist/dts/AnthropicTokenizer.d.ts.map +1 -0
- package/dist/dts/Generated.d.ts +3937 -0
- package/dist/dts/Generated.d.ts.map +1 -0
- package/dist/dts/index.d.ts +21 -0
- package/dist/dts/index.d.ts.map +1 -0
- package/dist/esm/AnthropicClient.js +199 -0
- package/dist/esm/AnthropicClient.js.map +1 -0
- package/dist/esm/AnthropicCompletions.js +279 -0
- package/dist/esm/AnthropicCompletions.js.map +1 -0
- package/dist/esm/AnthropicConfig.js +22 -0
- package/dist/esm/AnthropicConfig.js.map +1 -0
- package/dist/esm/AnthropicTokenizer.js +41 -0
- package/dist/esm/AnthropicTokenizer.js.map +1 -0
- package/dist/esm/Generated.js +1273 -0
- package/dist/esm/Generated.js.map +1 -0
- package/dist/esm/index.js +21 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/package.json +4 -0
- package/package.json +79 -0
- package/src/AnthropicClient.ts +415 -0
- package/src/AnthropicCompletions.ts +352 -0
- package/src/AnthropicConfig.ts +76 -0
- package/src/AnthropicTokenizer.ts +52 -0
- package/src/Generated.ts +1811 -0
- package/src/index.ts +24 -0
|
@@ -0,0 +1,3937 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @since 1.0.0
|
|
3
|
+
*/
|
|
4
|
+
import type * as HttpClient from "@effect/platform/HttpClient";
|
|
5
|
+
import * as HttpClientError from "@effect/platform/HttpClientError";
|
|
6
|
+
import * as Effect from "effect/Effect";
|
|
7
|
+
import type { ParseError } from "effect/ParseResult";
|
|
8
|
+
import * as S from "effect/Schema";
|
|
9
|
+
declare const MessagesPostParams_base: S.Struct<{
|
|
10
|
+
"anthropic-version": S.optionalWith<typeof S.String, {
|
|
11
|
+
nullable: true;
|
|
12
|
+
}>;
|
|
13
|
+
}>;
|
|
14
|
+
export declare class MessagesPostParams extends MessagesPostParams_base {
|
|
15
|
+
}
|
|
16
|
+
declare const ModelEnum_base: S.Literal<["claude-3-5-haiku-latest", "claude-3-5-haiku-20241022", "claude-3-5-sonnet-latest", "claude-3-5-sonnet-20241022", "claude-3-5-sonnet-20240620", "claude-3-opus-latest", "claude-3-opus-20240229", "claude-3-sonnet-20240229", "claude-3-haiku-20240307", "claude-2.1", "claude-2.0"]>;
|
|
17
|
+
export declare class ModelEnum extends ModelEnum_base {
|
|
18
|
+
}
|
|
19
|
+
declare const Model_base: S.Union<[typeof S.String, typeof ModelEnum]>;
|
|
20
|
+
export declare class Model extends Model_base {
|
|
21
|
+
}
|
|
22
|
+
declare const InputMessageRole_base: S.Literal<["user", "assistant"]>;
|
|
23
|
+
export declare class InputMessageRole extends InputMessageRole_base {
|
|
24
|
+
}
|
|
25
|
+
declare const CacheControlEphemeralType_base: S.Literal<["ephemeral"]>;
|
|
26
|
+
export declare class CacheControlEphemeralType extends CacheControlEphemeralType_base {
|
|
27
|
+
}
|
|
28
|
+
declare const CacheControlEphemeral_base: S.Struct<{
|
|
29
|
+
type: typeof CacheControlEphemeralType;
|
|
30
|
+
}>;
|
|
31
|
+
export declare class CacheControlEphemeral extends CacheControlEphemeral_base {
|
|
32
|
+
}
|
|
33
|
+
declare const RequestCharLocationCitationType_base: S.Literal<["char_location"]>;
|
|
34
|
+
export declare class RequestCharLocationCitationType extends RequestCharLocationCitationType_base {
|
|
35
|
+
}
|
|
36
|
+
declare const RequestCharLocationCitation_base: S.Struct<{
|
|
37
|
+
type: typeof RequestCharLocationCitationType;
|
|
38
|
+
cited_text: typeof S.String;
|
|
39
|
+
document_index: S.filter<S.Schema<number, number, never>>;
|
|
40
|
+
document_title: S.Union<[S.filter<S.Schema<string, string, never>>, typeof S.Null]>;
|
|
41
|
+
start_char_index: S.filter<S.Schema<number, number, never>>;
|
|
42
|
+
end_char_index: typeof S.Int;
|
|
43
|
+
}>;
|
|
44
|
+
export declare class RequestCharLocationCitation extends RequestCharLocationCitation_base {
|
|
45
|
+
}
|
|
46
|
+
declare const RequestPageLocationCitationType_base: S.Literal<["page_location"]>;
|
|
47
|
+
export declare class RequestPageLocationCitationType extends RequestPageLocationCitationType_base {
|
|
48
|
+
}
|
|
49
|
+
declare const RequestPageLocationCitation_base: S.Struct<{
|
|
50
|
+
type: typeof RequestPageLocationCitationType;
|
|
51
|
+
cited_text: typeof S.String;
|
|
52
|
+
document_index: S.filter<S.Schema<number, number, never>>;
|
|
53
|
+
document_title: S.Union<[S.filter<S.Schema<string, string, never>>, typeof S.Null]>;
|
|
54
|
+
start_page_number: S.filter<S.Schema<number, number, never>>;
|
|
55
|
+
end_page_number: typeof S.Int;
|
|
56
|
+
}>;
|
|
57
|
+
export declare class RequestPageLocationCitation extends RequestPageLocationCitation_base {
|
|
58
|
+
}
|
|
59
|
+
declare const RequestContentBlockLocationCitationType_base: S.Literal<["content_block_location"]>;
|
|
60
|
+
export declare class RequestContentBlockLocationCitationType extends RequestContentBlockLocationCitationType_base {
|
|
61
|
+
}
|
|
62
|
+
declare const RequestContentBlockLocationCitation_base: S.Struct<{
|
|
63
|
+
type: typeof RequestContentBlockLocationCitationType;
|
|
64
|
+
cited_text: typeof S.String;
|
|
65
|
+
document_index: S.filter<S.Schema<number, number, never>>;
|
|
66
|
+
document_title: S.Union<[S.filter<S.Schema<string, string, never>>, typeof S.Null]>;
|
|
67
|
+
start_block_index: S.filter<S.Schema<number, number, never>>;
|
|
68
|
+
end_block_index: typeof S.Int;
|
|
69
|
+
}>;
|
|
70
|
+
export declare class RequestContentBlockLocationCitation extends RequestContentBlockLocationCitation_base {
|
|
71
|
+
}
|
|
72
|
+
declare const RequestTextBlockType_base: S.Literal<["text"]>;
|
|
73
|
+
export declare class RequestTextBlockType extends RequestTextBlockType_base {
|
|
74
|
+
}
|
|
75
|
+
declare const RequestTextBlock_base: S.Struct<{
|
|
76
|
+
cache_control: S.optionalWith<S.Union<[typeof CacheControlEphemeral, typeof S.Null]>, {
|
|
77
|
+
nullable: true;
|
|
78
|
+
}>;
|
|
79
|
+
citations: S.optionalWith<S.Union<[S.Array$<S.Union<[typeof RequestCharLocationCitation, typeof RequestPageLocationCitation, typeof RequestContentBlockLocationCitation]>>, typeof S.Null]>, {
|
|
80
|
+
nullable: true;
|
|
81
|
+
}>;
|
|
82
|
+
text: S.filter<S.Schema<string, string, never>>;
|
|
83
|
+
type: typeof RequestTextBlockType;
|
|
84
|
+
}>;
|
|
85
|
+
export declare class RequestTextBlock extends RequestTextBlock_base {
|
|
86
|
+
}
|
|
87
|
+
declare const RequestImageBlockType_base: S.Literal<["image"]>;
|
|
88
|
+
export declare class RequestImageBlockType extends RequestImageBlockType_base {
|
|
89
|
+
}
|
|
90
|
+
declare const Base64ImageSourceType_base: S.Literal<["base64"]>;
|
|
91
|
+
export declare class Base64ImageSourceType extends Base64ImageSourceType_base {
|
|
92
|
+
}
|
|
93
|
+
declare const Base64ImageSourceMediaType_base: S.Literal<["image/jpeg", "image/png", "image/gif", "image/webp"]>;
|
|
94
|
+
export declare class Base64ImageSourceMediaType extends Base64ImageSourceMediaType_base {
|
|
95
|
+
}
|
|
96
|
+
declare const Base64ImageSource_base: S.Struct<{
|
|
97
|
+
type: typeof Base64ImageSourceType;
|
|
98
|
+
media_type: typeof Base64ImageSourceMediaType;
|
|
99
|
+
data: typeof S.String;
|
|
100
|
+
}>;
|
|
101
|
+
export declare class Base64ImageSource extends Base64ImageSource_base {
|
|
102
|
+
}
|
|
103
|
+
declare const RequestImageBlock_base: S.Struct<{
|
|
104
|
+
cache_control: S.optionalWith<S.Union<[typeof CacheControlEphemeral, typeof S.Null]>, {
|
|
105
|
+
nullable: true;
|
|
106
|
+
}>;
|
|
107
|
+
type: typeof RequestImageBlockType;
|
|
108
|
+
source: typeof Base64ImageSource;
|
|
109
|
+
}>;
|
|
110
|
+
export declare class RequestImageBlock extends RequestImageBlock_base {
|
|
111
|
+
}
|
|
112
|
+
declare const RequestToolUseBlockType_base: S.Literal<["tool_use"]>;
|
|
113
|
+
export declare class RequestToolUseBlockType extends RequestToolUseBlockType_base {
|
|
114
|
+
}
|
|
115
|
+
declare const RequestToolUseBlock_base: S.Struct<{
|
|
116
|
+
cache_control: S.optionalWith<S.Union<[typeof CacheControlEphemeral, typeof S.Null]>, {
|
|
117
|
+
nullable: true;
|
|
118
|
+
}>;
|
|
119
|
+
type: typeof RequestToolUseBlockType;
|
|
120
|
+
id: S.filter<S.Schema<string, string, never>>;
|
|
121
|
+
name: S.filter<S.Schema<string, string, never>>;
|
|
122
|
+
input: S.Record$<typeof S.String, typeof S.Unknown>;
|
|
123
|
+
}>;
|
|
124
|
+
export declare class RequestToolUseBlock extends RequestToolUseBlock_base {
|
|
125
|
+
}
|
|
126
|
+
declare const RequestToolResultBlockType_base: S.Literal<["tool_result"]>;
|
|
127
|
+
export declare class RequestToolResultBlockType extends RequestToolResultBlockType_base {
|
|
128
|
+
}
|
|
129
|
+
declare const RequestToolResultBlock_base: S.Struct<{
|
|
130
|
+
cache_control: S.optionalWith<S.Union<[typeof CacheControlEphemeral, typeof S.Null]>, {
|
|
131
|
+
nullable: true;
|
|
132
|
+
}>;
|
|
133
|
+
type: typeof RequestToolResultBlockType;
|
|
134
|
+
tool_use_id: S.filter<S.Schema<string, string, never>>;
|
|
135
|
+
is_error: S.optionalWith<typeof S.Boolean, {
|
|
136
|
+
nullable: true;
|
|
137
|
+
}>;
|
|
138
|
+
content: S.optionalWith<S.Union<[typeof S.String, S.Array$<S.Union<[typeof RequestTextBlock, typeof RequestImageBlock]>>]>, {
|
|
139
|
+
nullable: true;
|
|
140
|
+
}>;
|
|
141
|
+
}>;
|
|
142
|
+
export declare class RequestToolResultBlock extends RequestToolResultBlock_base {
|
|
143
|
+
}
|
|
144
|
+
declare const RequestDocumentBlockType_base: S.Literal<["document"]>;
|
|
145
|
+
export declare class RequestDocumentBlockType extends RequestDocumentBlockType_base {
|
|
146
|
+
}
|
|
147
|
+
declare const Base64PDFSourceType_base: S.Literal<["base64"]>;
|
|
148
|
+
export declare class Base64PDFSourceType extends Base64PDFSourceType_base {
|
|
149
|
+
}
|
|
150
|
+
declare const Base64PDFSourceMediaType_base: S.Literal<["application/pdf"]>;
|
|
151
|
+
export declare class Base64PDFSourceMediaType extends Base64PDFSourceMediaType_base {
|
|
152
|
+
}
|
|
153
|
+
declare const Base64PDFSource_base: S.Struct<{
|
|
154
|
+
type: typeof Base64PDFSourceType;
|
|
155
|
+
media_type: typeof Base64PDFSourceMediaType;
|
|
156
|
+
data: typeof S.String;
|
|
157
|
+
}>;
|
|
158
|
+
export declare class Base64PDFSource extends Base64PDFSource_base {
|
|
159
|
+
}
|
|
160
|
+
declare const PlainTextSourceType_base: S.Literal<["text"]>;
|
|
161
|
+
export declare class PlainTextSourceType extends PlainTextSourceType_base {
|
|
162
|
+
}
|
|
163
|
+
declare const PlainTextSourceMediaType_base: S.Literal<["text/plain"]>;
|
|
164
|
+
export declare class PlainTextSourceMediaType extends PlainTextSourceMediaType_base {
|
|
165
|
+
}
|
|
166
|
+
declare const PlainTextSource_base: S.Struct<{
|
|
167
|
+
type: typeof PlainTextSourceType;
|
|
168
|
+
media_type: typeof PlainTextSourceMediaType;
|
|
169
|
+
data: typeof S.String;
|
|
170
|
+
}>;
|
|
171
|
+
export declare class PlainTextSource extends PlainTextSource_base {
|
|
172
|
+
}
|
|
173
|
+
declare const ContentBlockSourceType_base: S.Literal<["content"]>;
|
|
174
|
+
export declare class ContentBlockSourceType extends ContentBlockSourceType_base {
|
|
175
|
+
}
|
|
176
|
+
declare const ContentBlockSource_base: S.Struct<{
|
|
177
|
+
type: typeof ContentBlockSourceType;
|
|
178
|
+
content: S.Union<[typeof S.String, S.Array$<S.Union<[typeof RequestTextBlock, typeof RequestImageBlock]>>]>;
|
|
179
|
+
}>;
|
|
180
|
+
export declare class ContentBlockSource extends ContentBlockSource_base {
|
|
181
|
+
}
|
|
182
|
+
declare const RequestCitationsConfig_base: S.Struct<{
|
|
183
|
+
enabled: S.optionalWith<typeof S.Boolean, {
|
|
184
|
+
nullable: true;
|
|
185
|
+
}>;
|
|
186
|
+
}>;
|
|
187
|
+
export declare class RequestCitationsConfig extends RequestCitationsConfig_base {
|
|
188
|
+
}
|
|
189
|
+
declare const RequestDocumentBlock_base: S.Struct<{
|
|
190
|
+
cache_control: S.optionalWith<S.Union<[typeof CacheControlEphemeral, typeof S.Null]>, {
|
|
191
|
+
nullable: true;
|
|
192
|
+
}>;
|
|
193
|
+
type: typeof RequestDocumentBlockType;
|
|
194
|
+
source: S.Union<[typeof Base64PDFSource, typeof PlainTextSource, typeof ContentBlockSource]>;
|
|
195
|
+
title: S.optionalWith<S.Union<[S.filter<S.Schema<string, string, never>>, typeof S.Null]>, {
|
|
196
|
+
nullable: true;
|
|
197
|
+
}>;
|
|
198
|
+
context: S.optionalWith<S.Union<[S.filter<S.Schema<string, string, never>>, typeof S.Null]>, {
|
|
199
|
+
nullable: true;
|
|
200
|
+
}>;
|
|
201
|
+
citations: S.optionalWith<typeof RequestCitationsConfig, {
|
|
202
|
+
nullable: true;
|
|
203
|
+
}>;
|
|
204
|
+
}>;
|
|
205
|
+
export declare class RequestDocumentBlock extends RequestDocumentBlock_base {
|
|
206
|
+
}
|
|
207
|
+
declare const InputContentBlock_base: S.Union<[typeof RequestTextBlock, typeof RequestImageBlock, typeof RequestToolUseBlock, typeof RequestToolResultBlock, typeof RequestDocumentBlock]>;
|
|
208
|
+
export declare class InputContentBlock extends InputContentBlock_base {
|
|
209
|
+
}
|
|
210
|
+
declare const InputMessage_base: S.Struct<{
|
|
211
|
+
role: typeof InputMessageRole;
|
|
212
|
+
content: S.Union<[typeof S.String, S.Array$<typeof InputContentBlock>]>;
|
|
213
|
+
}>;
|
|
214
|
+
export declare class InputMessage extends InputMessage_base {
|
|
215
|
+
}
|
|
216
|
+
declare const Metadata_base: S.Struct<{
|
|
217
|
+
user_id: S.optionalWith<S.Union<[S.filter<S.Schema<string, string, never>>, typeof S.Null]>, {
|
|
218
|
+
nullable: true;
|
|
219
|
+
}>;
|
|
220
|
+
}>;
|
|
221
|
+
export declare class Metadata extends Metadata_base {
|
|
222
|
+
}
|
|
223
|
+
declare const ToolChoiceAutoType_base: S.Literal<["auto"]>;
|
|
224
|
+
export declare class ToolChoiceAutoType extends ToolChoiceAutoType_base {
|
|
225
|
+
}
|
|
226
|
+
declare const ToolChoiceAuto_base: S.Struct<{
|
|
227
|
+
type: typeof ToolChoiceAutoType;
|
|
228
|
+
disable_parallel_tool_use: S.optionalWith<typeof S.Boolean, {
|
|
229
|
+
nullable: true;
|
|
230
|
+
}>;
|
|
231
|
+
}>;
|
|
232
|
+
export declare class ToolChoiceAuto extends ToolChoiceAuto_base {
|
|
233
|
+
}
|
|
234
|
+
declare const ToolChoiceAnyType_base: S.Literal<["any"]>;
|
|
235
|
+
export declare class ToolChoiceAnyType extends ToolChoiceAnyType_base {
|
|
236
|
+
}
|
|
237
|
+
declare const ToolChoiceAny_base: S.Struct<{
|
|
238
|
+
type: typeof ToolChoiceAnyType;
|
|
239
|
+
disable_parallel_tool_use: S.optionalWith<typeof S.Boolean, {
|
|
240
|
+
nullable: true;
|
|
241
|
+
}>;
|
|
242
|
+
}>;
|
|
243
|
+
export declare class ToolChoiceAny extends ToolChoiceAny_base {
|
|
244
|
+
}
|
|
245
|
+
declare const ToolChoiceToolType_base: S.Literal<["tool"]>;
|
|
246
|
+
export declare class ToolChoiceToolType extends ToolChoiceToolType_base {
|
|
247
|
+
}
|
|
248
|
+
declare const ToolChoiceTool_base: S.Struct<{
|
|
249
|
+
type: typeof ToolChoiceToolType;
|
|
250
|
+
name: typeof S.String;
|
|
251
|
+
disable_parallel_tool_use: S.optionalWith<typeof S.Boolean, {
|
|
252
|
+
nullable: true;
|
|
253
|
+
}>;
|
|
254
|
+
}>;
|
|
255
|
+
export declare class ToolChoiceTool extends ToolChoiceTool_base {
|
|
256
|
+
}
|
|
257
|
+
declare const ToolChoice_base: S.Union<[typeof ToolChoiceAuto, typeof ToolChoiceAny, typeof ToolChoiceTool]>;
|
|
258
|
+
export declare class ToolChoice extends ToolChoice_base {
|
|
259
|
+
}
|
|
260
|
+
declare const InputSchemaType_base: S.Literal<["object"]>;
|
|
261
|
+
export declare class InputSchemaType extends InputSchemaType_base {
|
|
262
|
+
}
|
|
263
|
+
declare const InputSchema_base: S.Struct<{
|
|
264
|
+
type: typeof InputSchemaType;
|
|
265
|
+
properties: S.optionalWith<S.Union<[S.Record$<typeof S.String, typeof S.Unknown>, typeof S.Null]>, {
|
|
266
|
+
nullable: true;
|
|
267
|
+
}>;
|
|
268
|
+
}>;
|
|
269
|
+
export declare class InputSchema extends InputSchema_base {
|
|
270
|
+
}
|
|
271
|
+
declare const Tool_base: S.Struct<{
|
|
272
|
+
description: S.optionalWith<typeof S.String, {
|
|
273
|
+
nullable: true;
|
|
274
|
+
}>;
|
|
275
|
+
name: S.filter<S.Schema<string, string, never>>;
|
|
276
|
+
input_schema: typeof InputSchema;
|
|
277
|
+
cache_control: S.optionalWith<S.Union<[typeof CacheControlEphemeral, typeof S.Null]>, {
|
|
278
|
+
nullable: true;
|
|
279
|
+
}>;
|
|
280
|
+
}>;
|
|
281
|
+
export declare class Tool extends Tool_base {
|
|
282
|
+
}
|
|
283
|
+
declare const CreateMessageParams_base: S.Class<CreateMessageParams, {
|
|
284
|
+
model: typeof Model;
|
|
285
|
+
messages: S.Array$<typeof InputMessage>;
|
|
286
|
+
max_tokens: S.filter<S.Schema<number, number, never>>;
|
|
287
|
+
metadata: S.optionalWith<typeof Metadata, {
|
|
288
|
+
nullable: true;
|
|
289
|
+
}>;
|
|
290
|
+
stop_sequences: S.optionalWith<S.Array$<typeof S.String>, {
|
|
291
|
+
nullable: true;
|
|
292
|
+
}>;
|
|
293
|
+
stream: S.optionalWith<typeof S.Boolean, {
|
|
294
|
+
nullable: true;
|
|
295
|
+
}>;
|
|
296
|
+
system: S.optionalWith<S.Union<[typeof S.String, S.Array$<typeof RequestTextBlock>]>, {
|
|
297
|
+
nullable: true;
|
|
298
|
+
}>;
|
|
299
|
+
temperature: S.optionalWith<S.filter<S.Schema<number, number, never>>, {
|
|
300
|
+
nullable: true;
|
|
301
|
+
}>;
|
|
302
|
+
tool_choice: S.optionalWith<typeof ToolChoice, {
|
|
303
|
+
nullable: true;
|
|
304
|
+
}>;
|
|
305
|
+
tools: S.optionalWith<S.Array$<typeof Tool>, {
|
|
306
|
+
nullable: true;
|
|
307
|
+
}>;
|
|
308
|
+
top_k: S.optionalWith<S.filter<S.Schema<number, number, never>>, {
|
|
309
|
+
nullable: true;
|
|
310
|
+
}>;
|
|
311
|
+
top_p: S.optionalWith<S.filter<S.Schema<number, number, never>>, {
|
|
312
|
+
nullable: true;
|
|
313
|
+
}>;
|
|
314
|
+
}, S.Struct.Encoded<{
|
|
315
|
+
model: typeof Model;
|
|
316
|
+
messages: S.Array$<typeof InputMessage>;
|
|
317
|
+
max_tokens: S.filter<S.Schema<number, number, never>>;
|
|
318
|
+
metadata: S.optionalWith<typeof Metadata, {
|
|
319
|
+
nullable: true;
|
|
320
|
+
}>;
|
|
321
|
+
stop_sequences: S.optionalWith<S.Array$<typeof S.String>, {
|
|
322
|
+
nullable: true;
|
|
323
|
+
}>;
|
|
324
|
+
stream: S.optionalWith<typeof S.Boolean, {
|
|
325
|
+
nullable: true;
|
|
326
|
+
}>;
|
|
327
|
+
system: S.optionalWith<S.Union<[typeof S.String, S.Array$<typeof RequestTextBlock>]>, {
|
|
328
|
+
nullable: true;
|
|
329
|
+
}>;
|
|
330
|
+
temperature: S.optionalWith<S.filter<S.Schema<number, number, never>>, {
|
|
331
|
+
nullable: true;
|
|
332
|
+
}>;
|
|
333
|
+
tool_choice: S.optionalWith<typeof ToolChoice, {
|
|
334
|
+
nullable: true;
|
|
335
|
+
}>;
|
|
336
|
+
tools: S.optionalWith<S.Array$<typeof Tool>, {
|
|
337
|
+
nullable: true;
|
|
338
|
+
}>;
|
|
339
|
+
top_k: S.optionalWith<S.filter<S.Schema<number, number, never>>, {
|
|
340
|
+
nullable: true;
|
|
341
|
+
}>;
|
|
342
|
+
top_p: S.optionalWith<S.filter<S.Schema<number, number, never>>, {
|
|
343
|
+
nullable: true;
|
|
344
|
+
}>;
|
|
345
|
+
}>, never, {
|
|
346
|
+
readonly model: string;
|
|
347
|
+
} & {
|
|
348
|
+
readonly messages: readonly {
|
|
349
|
+
readonly content: string | readonly ({
|
|
350
|
+
readonly type: "text";
|
|
351
|
+
readonly text: string;
|
|
352
|
+
readonly cache_control?: {
|
|
353
|
+
readonly type: "ephemeral";
|
|
354
|
+
} | null | undefined;
|
|
355
|
+
readonly citations?: readonly ({
|
|
356
|
+
readonly type: "char_location";
|
|
357
|
+
readonly cited_text: string;
|
|
358
|
+
readonly document_index: number;
|
|
359
|
+
readonly document_title: string | null;
|
|
360
|
+
readonly start_char_index: number;
|
|
361
|
+
readonly end_char_index: number;
|
|
362
|
+
} | {
|
|
363
|
+
readonly type: "page_location";
|
|
364
|
+
readonly cited_text: string;
|
|
365
|
+
readonly document_index: number;
|
|
366
|
+
readonly document_title: string | null;
|
|
367
|
+
readonly start_page_number: number;
|
|
368
|
+
readonly end_page_number: number;
|
|
369
|
+
} | {
|
|
370
|
+
readonly type: "content_block_location";
|
|
371
|
+
readonly cited_text: string;
|
|
372
|
+
readonly document_index: number;
|
|
373
|
+
readonly document_title: string | null;
|
|
374
|
+
readonly start_block_index: number;
|
|
375
|
+
readonly end_block_index: number;
|
|
376
|
+
})[] | null | undefined;
|
|
377
|
+
} | {
|
|
378
|
+
readonly type: "image";
|
|
379
|
+
readonly cache_control?: {
|
|
380
|
+
readonly type: "ephemeral";
|
|
381
|
+
} | null | undefined;
|
|
382
|
+
readonly source: {
|
|
383
|
+
readonly type: "base64";
|
|
384
|
+
readonly media_type: "image/jpeg" | "image/png" | "image/gif" | "image/webp";
|
|
385
|
+
readonly data: string;
|
|
386
|
+
};
|
|
387
|
+
} | {
|
|
388
|
+
readonly type: "tool_use";
|
|
389
|
+
readonly cache_control?: {
|
|
390
|
+
readonly type: "ephemeral";
|
|
391
|
+
} | null | undefined;
|
|
392
|
+
readonly id: string;
|
|
393
|
+
readonly name: string;
|
|
394
|
+
readonly input: {
|
|
395
|
+
readonly [x: string]: unknown;
|
|
396
|
+
};
|
|
397
|
+
} | {
|
|
398
|
+
readonly type: "tool_result";
|
|
399
|
+
readonly cache_control?: {
|
|
400
|
+
readonly type: "ephemeral";
|
|
401
|
+
} | null | undefined;
|
|
402
|
+
readonly tool_use_id: string;
|
|
403
|
+
readonly is_error?: boolean | undefined;
|
|
404
|
+
readonly content?: string | readonly ({
|
|
405
|
+
readonly type: "text";
|
|
406
|
+
readonly text: string;
|
|
407
|
+
readonly cache_control?: {
|
|
408
|
+
readonly type: "ephemeral";
|
|
409
|
+
} | null | undefined;
|
|
410
|
+
readonly citations?: readonly ({
|
|
411
|
+
readonly type: "char_location";
|
|
412
|
+
readonly cited_text: string;
|
|
413
|
+
readonly document_index: number;
|
|
414
|
+
readonly document_title: string | null;
|
|
415
|
+
readonly start_char_index: number;
|
|
416
|
+
readonly end_char_index: number;
|
|
417
|
+
} | {
|
|
418
|
+
readonly type: "page_location";
|
|
419
|
+
readonly cited_text: string;
|
|
420
|
+
readonly document_index: number;
|
|
421
|
+
readonly document_title: string | null;
|
|
422
|
+
readonly start_page_number: number;
|
|
423
|
+
readonly end_page_number: number;
|
|
424
|
+
} | {
|
|
425
|
+
readonly type: "content_block_location";
|
|
426
|
+
readonly cited_text: string;
|
|
427
|
+
readonly document_index: number;
|
|
428
|
+
readonly document_title: string | null;
|
|
429
|
+
readonly start_block_index: number;
|
|
430
|
+
readonly end_block_index: number;
|
|
431
|
+
})[] | null | undefined;
|
|
432
|
+
} | {
|
|
433
|
+
readonly type: "image";
|
|
434
|
+
readonly cache_control?: {
|
|
435
|
+
readonly type: "ephemeral";
|
|
436
|
+
} | null | undefined;
|
|
437
|
+
readonly source: {
|
|
438
|
+
readonly type: "base64";
|
|
439
|
+
readonly media_type: "image/jpeg" | "image/png" | "image/gif" | "image/webp";
|
|
440
|
+
readonly data: string;
|
|
441
|
+
};
|
|
442
|
+
})[] | undefined;
|
|
443
|
+
} | {
|
|
444
|
+
readonly type: "document";
|
|
445
|
+
readonly cache_control?: {
|
|
446
|
+
readonly type: "ephemeral";
|
|
447
|
+
} | null | undefined;
|
|
448
|
+
readonly citations?: {
|
|
449
|
+
readonly enabled?: boolean | undefined;
|
|
450
|
+
} | undefined;
|
|
451
|
+
readonly source: {
|
|
452
|
+
readonly type: "base64";
|
|
453
|
+
readonly media_type: "application/pdf";
|
|
454
|
+
readonly data: string;
|
|
455
|
+
} | {
|
|
456
|
+
readonly type: "text";
|
|
457
|
+
readonly media_type: "text/plain";
|
|
458
|
+
readonly data: string;
|
|
459
|
+
} | {
|
|
460
|
+
readonly type: "content";
|
|
461
|
+
readonly content: string | readonly ({
|
|
462
|
+
readonly type: "text";
|
|
463
|
+
readonly text: string;
|
|
464
|
+
readonly cache_control?: {
|
|
465
|
+
readonly type: "ephemeral";
|
|
466
|
+
} | null | undefined;
|
|
467
|
+
readonly citations?: readonly ({
|
|
468
|
+
readonly type: "char_location";
|
|
469
|
+
readonly cited_text: string;
|
|
470
|
+
readonly document_index: number;
|
|
471
|
+
readonly document_title: string | null;
|
|
472
|
+
readonly start_char_index: number;
|
|
473
|
+
readonly end_char_index: number;
|
|
474
|
+
} | {
|
|
475
|
+
readonly type: "page_location";
|
|
476
|
+
readonly cited_text: string;
|
|
477
|
+
readonly document_index: number;
|
|
478
|
+
readonly document_title: string | null;
|
|
479
|
+
readonly start_page_number: number;
|
|
480
|
+
readonly end_page_number: number;
|
|
481
|
+
} | {
|
|
482
|
+
readonly type: "content_block_location";
|
|
483
|
+
readonly cited_text: string;
|
|
484
|
+
readonly document_index: number;
|
|
485
|
+
readonly document_title: string | null;
|
|
486
|
+
readonly start_block_index: number;
|
|
487
|
+
readonly end_block_index: number;
|
|
488
|
+
})[] | null | undefined;
|
|
489
|
+
} | {
|
|
490
|
+
readonly type: "image";
|
|
491
|
+
readonly cache_control?: {
|
|
492
|
+
readonly type: "ephemeral";
|
|
493
|
+
} | null | undefined;
|
|
494
|
+
readonly source: {
|
|
495
|
+
readonly type: "base64";
|
|
496
|
+
readonly media_type: "image/jpeg" | "image/png" | "image/gif" | "image/webp";
|
|
497
|
+
readonly data: string;
|
|
498
|
+
};
|
|
499
|
+
})[];
|
|
500
|
+
};
|
|
501
|
+
readonly title?: string | null | undefined;
|
|
502
|
+
readonly context?: string | null | undefined;
|
|
503
|
+
})[];
|
|
504
|
+
readonly role: "user" | "assistant";
|
|
505
|
+
}[];
|
|
506
|
+
} & {
|
|
507
|
+
readonly max_tokens: number;
|
|
508
|
+
} & {
|
|
509
|
+
readonly metadata?: {
|
|
510
|
+
readonly user_id?: string | null | undefined;
|
|
511
|
+
} | undefined;
|
|
512
|
+
} & {
|
|
513
|
+
readonly stop_sequences?: readonly string[] | undefined;
|
|
514
|
+
} & {
|
|
515
|
+
readonly stream?: boolean | undefined;
|
|
516
|
+
} & {
|
|
517
|
+
readonly system?: string | readonly {
|
|
518
|
+
readonly type: "text";
|
|
519
|
+
readonly text: string;
|
|
520
|
+
readonly cache_control?: {
|
|
521
|
+
readonly type: "ephemeral";
|
|
522
|
+
} | null | undefined;
|
|
523
|
+
readonly citations?: readonly ({
|
|
524
|
+
readonly type: "char_location";
|
|
525
|
+
readonly cited_text: string;
|
|
526
|
+
readonly document_index: number;
|
|
527
|
+
readonly document_title: string | null;
|
|
528
|
+
readonly start_char_index: number;
|
|
529
|
+
readonly end_char_index: number;
|
|
530
|
+
} | {
|
|
531
|
+
readonly type: "page_location";
|
|
532
|
+
readonly cited_text: string;
|
|
533
|
+
readonly document_index: number;
|
|
534
|
+
readonly document_title: string | null;
|
|
535
|
+
readonly start_page_number: number;
|
|
536
|
+
readonly end_page_number: number;
|
|
537
|
+
} | {
|
|
538
|
+
readonly type: "content_block_location";
|
|
539
|
+
readonly cited_text: string;
|
|
540
|
+
readonly document_index: number;
|
|
541
|
+
readonly document_title: string | null;
|
|
542
|
+
readonly start_block_index: number;
|
|
543
|
+
readonly end_block_index: number;
|
|
544
|
+
})[] | null | undefined;
|
|
545
|
+
}[] | undefined;
|
|
546
|
+
} & {
|
|
547
|
+
readonly temperature?: number | undefined;
|
|
548
|
+
} & {
|
|
549
|
+
readonly tool_choice?: {
|
|
550
|
+
readonly type: "auto";
|
|
551
|
+
readonly disable_parallel_tool_use?: boolean | undefined;
|
|
552
|
+
} | {
|
|
553
|
+
readonly type: "any";
|
|
554
|
+
readonly disable_parallel_tool_use?: boolean | undefined;
|
|
555
|
+
} | {
|
|
556
|
+
readonly type: "tool";
|
|
557
|
+
readonly name: string;
|
|
558
|
+
readonly disable_parallel_tool_use?: boolean | undefined;
|
|
559
|
+
} | undefined;
|
|
560
|
+
} & {
|
|
561
|
+
readonly tools?: readonly {
|
|
562
|
+
readonly cache_control?: {
|
|
563
|
+
readonly type: "ephemeral";
|
|
564
|
+
} | null | undefined;
|
|
565
|
+
readonly name: string;
|
|
566
|
+
readonly description?: string | undefined;
|
|
567
|
+
readonly input_schema: {
|
|
568
|
+
readonly type: "object";
|
|
569
|
+
readonly properties?: {
|
|
570
|
+
readonly [x: string]: unknown;
|
|
571
|
+
} | null | undefined;
|
|
572
|
+
};
|
|
573
|
+
}[] | undefined;
|
|
574
|
+
} & {
|
|
575
|
+
readonly top_k?: number | undefined;
|
|
576
|
+
} & {
|
|
577
|
+
readonly top_p?: number | undefined;
|
|
578
|
+
}, {}, {}>;
|
|
579
|
+
export declare class CreateMessageParams extends CreateMessageParams_base {
|
|
580
|
+
}
|
|
581
|
+
declare const MessageType_base: S.Literal<["message"]>;
|
|
582
|
+
export declare class MessageType extends MessageType_base {
|
|
583
|
+
}
|
|
584
|
+
declare const MessageRole_base: S.Literal<["assistant"]>;
|
|
585
|
+
export declare class MessageRole extends MessageRole_base {
|
|
586
|
+
}
|
|
587
|
+
declare const ResponseTextBlockType_base: S.Literal<["text"]>;
|
|
588
|
+
export declare class ResponseTextBlockType extends ResponseTextBlockType_base {
|
|
589
|
+
}
|
|
590
|
+
declare const ResponseCharLocationCitationType_base: S.Literal<["char_location"]>;
|
|
591
|
+
export declare class ResponseCharLocationCitationType extends ResponseCharLocationCitationType_base {
|
|
592
|
+
}
|
|
593
|
+
declare const ResponseCharLocationCitation_base: S.Struct<{
|
|
594
|
+
type: S.PropertySignature<":", "char_location", never, ":", "char_location", true, never>;
|
|
595
|
+
cited_text: typeof S.String;
|
|
596
|
+
document_index: S.filter<S.Schema<number, number, never>>;
|
|
597
|
+
document_title: S.Union<[typeof S.String, typeof S.Null]>;
|
|
598
|
+
start_char_index: S.filter<S.Schema<number, number, never>>;
|
|
599
|
+
end_char_index: typeof S.Int;
|
|
600
|
+
}>;
|
|
601
|
+
export declare class ResponseCharLocationCitation extends ResponseCharLocationCitation_base {
|
|
602
|
+
}
|
|
603
|
+
declare const ResponsePageLocationCitationType_base: S.Literal<["page_location"]>;
|
|
604
|
+
export declare class ResponsePageLocationCitationType extends ResponsePageLocationCitationType_base {
|
|
605
|
+
}
|
|
606
|
+
declare const ResponsePageLocationCitation_base: S.Struct<{
|
|
607
|
+
type: S.PropertySignature<":", "page_location", never, ":", "page_location", true, never>;
|
|
608
|
+
cited_text: typeof S.String;
|
|
609
|
+
document_index: S.filter<S.Schema<number, number, never>>;
|
|
610
|
+
document_title: S.Union<[typeof S.String, typeof S.Null]>;
|
|
611
|
+
start_page_number: S.filter<S.Schema<number, number, never>>;
|
|
612
|
+
end_page_number: typeof S.Int;
|
|
613
|
+
}>;
|
|
614
|
+
export declare class ResponsePageLocationCitation extends ResponsePageLocationCitation_base {
|
|
615
|
+
}
|
|
616
|
+
declare const ResponseContentBlockLocationCitationType_base: S.Literal<["content_block_location"]>;
|
|
617
|
+
export declare class ResponseContentBlockLocationCitationType extends ResponseContentBlockLocationCitationType_base {
|
|
618
|
+
}
|
|
619
|
+
declare const ResponseContentBlockLocationCitation_base: S.Struct<{
|
|
620
|
+
type: S.PropertySignature<":", "content_block_location", never, ":", "content_block_location", true, never>;
|
|
621
|
+
cited_text: typeof S.String;
|
|
622
|
+
document_index: S.filter<S.Schema<number, number, never>>;
|
|
623
|
+
document_title: S.Union<[typeof S.String, typeof S.Null]>;
|
|
624
|
+
start_block_index: S.filter<S.Schema<number, number, never>>;
|
|
625
|
+
end_block_index: typeof S.Int;
|
|
626
|
+
}>;
|
|
627
|
+
export declare class ResponseContentBlockLocationCitation extends ResponseContentBlockLocationCitation_base {
|
|
628
|
+
}
|
|
629
|
+
declare const ResponseTextBlock_base: S.Struct<{
|
|
630
|
+
type: S.PropertySignature<":", "text", never, ":", "text", true, never>;
|
|
631
|
+
text: S.filter<S.Schema<string, string, never>>;
|
|
632
|
+
citations: S.optionalWith<S.NullOr<S.Union<[S.Array$<S.Union<[typeof ResponseCharLocationCitation, typeof ResponsePageLocationCitation, typeof ResponseContentBlockLocationCitation]>>, typeof S.Null]>>, {
|
|
633
|
+
default: () => null;
|
|
634
|
+
}>;
|
|
635
|
+
}>;
|
|
636
|
+
export declare class ResponseTextBlock extends ResponseTextBlock_base {
|
|
637
|
+
}
|
|
638
|
+
declare const ResponseToolUseBlockType_base: S.Literal<["tool_use"]>;
|
|
639
|
+
export declare class ResponseToolUseBlockType extends ResponseToolUseBlockType_base {
|
|
640
|
+
}
|
|
641
|
+
declare const ResponseToolUseBlock_base: S.Struct<{
|
|
642
|
+
type: S.PropertySignature<":", "tool_use", never, ":", "tool_use", true, never>;
|
|
643
|
+
id: S.filter<S.Schema<string, string, never>>;
|
|
644
|
+
name: S.filter<S.Schema<string, string, never>>;
|
|
645
|
+
input: S.Record$<typeof S.String, typeof S.Unknown>;
|
|
646
|
+
}>;
|
|
647
|
+
export declare class ResponseToolUseBlock extends ResponseToolUseBlock_base {
|
|
648
|
+
}
|
|
649
|
+
declare const ContentBlock_base: S.Union<[typeof ResponseTextBlock, typeof ResponseToolUseBlock]>;
|
|
650
|
+
export declare class ContentBlock extends ContentBlock_base {
|
|
651
|
+
}
|
|
652
|
+
declare const MessageStopReasonEnum_base: S.Literal<["end_turn", "max_tokens", "stop_sequence", "tool_use"]>;
|
|
653
|
+
export declare class MessageStopReasonEnum extends MessageStopReasonEnum_base {
|
|
654
|
+
}
|
|
655
|
+
declare const Usage_base: S.Struct<{
|
|
656
|
+
input_tokens: S.filter<S.Schema<number, number, never>>;
|
|
657
|
+
cache_creation_input_tokens: S.optionalWith<S.NullOr<S.Union<[S.filter<S.Schema<number, number, never>>, typeof S.Null]>>, {
|
|
658
|
+
default: () => null;
|
|
659
|
+
}>;
|
|
660
|
+
cache_read_input_tokens: S.optionalWith<S.NullOr<S.Union<[S.filter<S.Schema<number, number, never>>, typeof S.Null]>>, {
|
|
661
|
+
default: () => null;
|
|
662
|
+
}>;
|
|
663
|
+
output_tokens: S.filter<S.Schema<number, number, never>>;
|
|
664
|
+
}>;
|
|
665
|
+
export declare class Usage extends Usage_base {
|
|
666
|
+
}
|
|
667
|
+
declare const Message_base: S.Class<Message, {
|
|
668
|
+
id: typeof S.String;
|
|
669
|
+
type: S.PropertySignature<":", "message", never, ":", "message", true, never>;
|
|
670
|
+
role: S.PropertySignature<":", "assistant", never, ":", "assistant", true, never>;
|
|
671
|
+
content: S.Array$<typeof ContentBlock>;
|
|
672
|
+
model: typeof Model;
|
|
673
|
+
stop_reason: S.Union<[typeof MessageStopReasonEnum, typeof S.Null]>;
|
|
674
|
+
stop_sequence: S.optionalWith<S.NullOr<S.Union<[typeof S.String, typeof S.Null]>>, {
|
|
675
|
+
default: () => null;
|
|
676
|
+
}>;
|
|
677
|
+
usage: typeof Usage;
|
|
678
|
+
}, S.Struct.Encoded<{
|
|
679
|
+
id: typeof S.String;
|
|
680
|
+
type: S.PropertySignature<":", "message", never, ":", "message", true, never>;
|
|
681
|
+
role: S.PropertySignature<":", "assistant", never, ":", "assistant", true, never>;
|
|
682
|
+
content: S.Array$<typeof ContentBlock>;
|
|
683
|
+
model: typeof Model;
|
|
684
|
+
stop_reason: S.Union<[typeof MessageStopReasonEnum, typeof S.Null]>;
|
|
685
|
+
stop_sequence: S.optionalWith<S.NullOr<S.Union<[typeof S.String, typeof S.Null]>>, {
|
|
686
|
+
default: () => null;
|
|
687
|
+
}>;
|
|
688
|
+
usage: typeof Usage;
|
|
689
|
+
}>, never, {
|
|
690
|
+
readonly type?: "message" | undefined;
|
|
691
|
+
} & {
|
|
692
|
+
readonly id: string;
|
|
693
|
+
} & {
|
|
694
|
+
readonly content: readonly ({
|
|
695
|
+
readonly type: "text";
|
|
696
|
+
readonly text: string;
|
|
697
|
+
readonly citations: readonly ({
|
|
698
|
+
readonly type: "char_location";
|
|
699
|
+
readonly cited_text: string;
|
|
700
|
+
readonly document_index: number;
|
|
701
|
+
readonly document_title: string | null;
|
|
702
|
+
readonly start_char_index: number;
|
|
703
|
+
readonly end_char_index: number;
|
|
704
|
+
} | {
|
|
705
|
+
readonly type: "page_location";
|
|
706
|
+
readonly cited_text: string;
|
|
707
|
+
readonly document_index: number;
|
|
708
|
+
readonly document_title: string | null;
|
|
709
|
+
readonly start_page_number: number;
|
|
710
|
+
readonly end_page_number: number;
|
|
711
|
+
} | {
|
|
712
|
+
readonly type: "content_block_location";
|
|
713
|
+
readonly cited_text: string;
|
|
714
|
+
readonly document_index: number;
|
|
715
|
+
readonly document_title: string | null;
|
|
716
|
+
readonly start_block_index: number;
|
|
717
|
+
readonly end_block_index: number;
|
|
718
|
+
})[] | null;
|
|
719
|
+
} | {
|
|
720
|
+
readonly type: "tool_use";
|
|
721
|
+
readonly id: string;
|
|
722
|
+
readonly name: string;
|
|
723
|
+
readonly input: {
|
|
724
|
+
readonly [x: string]: unknown;
|
|
725
|
+
};
|
|
726
|
+
})[];
|
|
727
|
+
} & {
|
|
728
|
+
readonly role?: "assistant" | undefined;
|
|
729
|
+
} & {
|
|
730
|
+
readonly model: string;
|
|
731
|
+
} & {
|
|
732
|
+
readonly stop_sequence?: string | null | undefined;
|
|
733
|
+
} & {
|
|
734
|
+
readonly usage: {
|
|
735
|
+
readonly input_tokens: number;
|
|
736
|
+
readonly cache_creation_input_tokens: number | null;
|
|
737
|
+
readonly cache_read_input_tokens: number | null;
|
|
738
|
+
readonly output_tokens: number;
|
|
739
|
+
};
|
|
740
|
+
} & {
|
|
741
|
+
readonly stop_reason: "tool_use" | "max_tokens" | "end_turn" | "stop_sequence" | null;
|
|
742
|
+
}, {}, {}>;
|
|
743
|
+
export declare class Message extends Message_base {
|
|
744
|
+
}
|
|
745
|
+
declare const ErrorResponseType_base: S.Literal<["error"]>;
|
|
746
|
+
export declare class ErrorResponseType extends ErrorResponseType_base {
|
|
747
|
+
}
|
|
748
|
+
declare const InvalidRequestErrorType_base: S.Literal<["invalid_request_error"]>;
|
|
749
|
+
export declare class InvalidRequestErrorType extends InvalidRequestErrorType_base {
|
|
750
|
+
}
|
|
751
|
+
declare const InvalidRequestError_base: S.Struct<{
|
|
752
|
+
type: S.PropertySignature<":", "invalid_request_error", never, ":", "invalid_request_error", true, never>;
|
|
753
|
+
message: S.PropertySignature<":", string, never, ":", string, true, never>;
|
|
754
|
+
}>;
|
|
755
|
+
export declare class InvalidRequestError extends InvalidRequestError_base {
|
|
756
|
+
}
|
|
757
|
+
declare const AuthenticationErrorType_base: S.Literal<["authentication_error"]>;
|
|
758
|
+
export declare class AuthenticationErrorType extends AuthenticationErrorType_base {
|
|
759
|
+
}
|
|
760
|
+
declare const AuthenticationError_base: S.Struct<{
|
|
761
|
+
type: S.PropertySignature<":", "authentication_error", never, ":", "authentication_error", true, never>;
|
|
762
|
+
message: S.PropertySignature<":", string, never, ":", string, true, never>;
|
|
763
|
+
}>;
|
|
764
|
+
export declare class AuthenticationError extends AuthenticationError_base {
|
|
765
|
+
}
|
|
766
|
+
declare const BillingErrorType_base: S.Literal<["billing_error"]>;
|
|
767
|
+
export declare class BillingErrorType extends BillingErrorType_base {
|
|
768
|
+
}
|
|
769
|
+
declare const BillingError_base: S.Struct<{
|
|
770
|
+
type: S.PropertySignature<":", "billing_error", never, ":", "billing_error", true, never>;
|
|
771
|
+
message: S.PropertySignature<":", string, never, ":", string, true, never>;
|
|
772
|
+
}>;
|
|
773
|
+
export declare class BillingError extends BillingError_base {
|
|
774
|
+
}
|
|
775
|
+
declare const PermissionErrorType_base: S.Literal<["permission_error"]>;
|
|
776
|
+
export declare class PermissionErrorType extends PermissionErrorType_base {
|
|
777
|
+
}
|
|
778
|
+
declare const PermissionError_base: S.Struct<{
|
|
779
|
+
type: S.PropertySignature<":", "permission_error", never, ":", "permission_error", true, never>;
|
|
780
|
+
message: S.PropertySignature<":", string, never, ":", string, true, never>;
|
|
781
|
+
}>;
|
|
782
|
+
export declare class PermissionError extends PermissionError_base {
|
|
783
|
+
}
|
|
784
|
+
declare const NotFoundErrorType_base: S.Literal<["not_found_error"]>;
|
|
785
|
+
export declare class NotFoundErrorType extends NotFoundErrorType_base {
|
|
786
|
+
}
|
|
787
|
+
declare const NotFoundError_base: S.Struct<{
|
|
788
|
+
type: S.PropertySignature<":", "not_found_error", never, ":", "not_found_error", true, never>;
|
|
789
|
+
message: S.PropertySignature<":", string, never, ":", string, true, never>;
|
|
790
|
+
}>;
|
|
791
|
+
export declare class NotFoundError extends NotFoundError_base {
|
|
792
|
+
}
|
|
793
|
+
declare const RateLimitErrorType_base: S.Literal<["rate_limit_error"]>;
|
|
794
|
+
export declare class RateLimitErrorType extends RateLimitErrorType_base {
|
|
795
|
+
}
|
|
796
|
+
declare const RateLimitError_base: S.Struct<{
|
|
797
|
+
type: S.PropertySignature<":", "rate_limit_error", never, ":", "rate_limit_error", true, never>;
|
|
798
|
+
message: S.PropertySignature<":", string, never, ":", string, true, never>;
|
|
799
|
+
}>;
|
|
800
|
+
export declare class RateLimitError extends RateLimitError_base {
|
|
801
|
+
}
|
|
802
|
+
declare const GatewayTimeoutErrorType_base: S.Literal<["timeout_error"]>;
|
|
803
|
+
export declare class GatewayTimeoutErrorType extends GatewayTimeoutErrorType_base {
|
|
804
|
+
}
|
|
805
|
+
declare const GatewayTimeoutError_base: S.Struct<{
|
|
806
|
+
type: S.PropertySignature<":", "timeout_error", never, ":", "timeout_error", true, never>;
|
|
807
|
+
message: S.PropertySignature<":", string, never, ":", string, true, never>;
|
|
808
|
+
}>;
|
|
809
|
+
export declare class GatewayTimeoutError extends GatewayTimeoutError_base {
|
|
810
|
+
}
|
|
811
|
+
declare const APIErrorType_base: S.Literal<["api_error"]>;
|
|
812
|
+
export declare class APIErrorType extends APIErrorType_base {
|
|
813
|
+
}
|
|
814
|
+
declare const APIError_base: S.Struct<{
|
|
815
|
+
type: S.PropertySignature<":", "api_error", never, ":", "api_error", true, never>;
|
|
816
|
+
message: S.PropertySignature<":", string, never, ":", string, true, never>;
|
|
817
|
+
}>;
|
|
818
|
+
export declare class APIError extends APIError_base {
|
|
819
|
+
}
|
|
820
|
+
declare const OverloadedErrorType_base: S.Literal<["overloaded_error"]>;
|
|
821
|
+
export declare class OverloadedErrorType extends OverloadedErrorType_base {
|
|
822
|
+
}
|
|
823
|
+
declare const OverloadedError_base: S.Struct<{
|
|
824
|
+
type: S.PropertySignature<":", "overloaded_error", never, ":", "overloaded_error", true, never>;
|
|
825
|
+
message: S.PropertySignature<":", string, never, ":", string, true, never>;
|
|
826
|
+
}>;
|
|
827
|
+
export declare class OverloadedError extends OverloadedError_base {
|
|
828
|
+
}
|
|
829
|
+
declare const ErrorResponse_base: S.Class<ErrorResponse, {
|
|
830
|
+
type: S.PropertySignature<":", "error", never, ":", "error", true, never>;
|
|
831
|
+
error: S.Union<[typeof InvalidRequestError, typeof AuthenticationError, typeof BillingError, typeof PermissionError, typeof NotFoundError, typeof RateLimitError, typeof GatewayTimeoutError, typeof APIError, typeof OverloadedError]>;
|
|
832
|
+
}, S.Struct.Encoded<{
|
|
833
|
+
type: S.PropertySignature<":", "error", never, ":", "error", true, never>;
|
|
834
|
+
error: S.Union<[typeof InvalidRequestError, typeof AuthenticationError, typeof BillingError, typeof PermissionError, typeof NotFoundError, typeof RateLimitError, typeof GatewayTimeoutError, typeof APIError, typeof OverloadedError]>;
|
|
835
|
+
}>, never, {
|
|
836
|
+
readonly type?: "error" | undefined;
|
|
837
|
+
} & {
|
|
838
|
+
readonly error: {
|
|
839
|
+
readonly type: "invalid_request_error";
|
|
840
|
+
readonly message: string;
|
|
841
|
+
} | {
|
|
842
|
+
readonly type: "authentication_error";
|
|
843
|
+
readonly message: string;
|
|
844
|
+
} | {
|
|
845
|
+
readonly type: "billing_error";
|
|
846
|
+
readonly message: string;
|
|
847
|
+
} | {
|
|
848
|
+
readonly type: "permission_error";
|
|
849
|
+
readonly message: string;
|
|
850
|
+
} | {
|
|
851
|
+
readonly type: "not_found_error";
|
|
852
|
+
readonly message: string;
|
|
853
|
+
} | {
|
|
854
|
+
readonly type: "rate_limit_error";
|
|
855
|
+
readonly message: string;
|
|
856
|
+
} | {
|
|
857
|
+
readonly type: "timeout_error";
|
|
858
|
+
readonly message: string;
|
|
859
|
+
} | {
|
|
860
|
+
readonly type: "api_error";
|
|
861
|
+
readonly message: string;
|
|
862
|
+
} | {
|
|
863
|
+
readonly type: "overloaded_error";
|
|
864
|
+
readonly message: string;
|
|
865
|
+
};
|
|
866
|
+
}, {}, {}>;
|
|
867
|
+
export declare class ErrorResponse extends ErrorResponse_base {
|
|
868
|
+
}
|
|
869
|
+
declare const CompletePostParams_base: S.Struct<{
|
|
870
|
+
"anthropic-version": S.optionalWith<typeof S.String, {
|
|
871
|
+
nullable: true;
|
|
872
|
+
}>;
|
|
873
|
+
}>;
|
|
874
|
+
export declare class CompletePostParams extends CompletePostParams_base {
|
|
875
|
+
}
|
|
876
|
+
declare const CompletionRequest_base: S.Class<CompletionRequest, {
|
|
877
|
+
model: typeof Model;
|
|
878
|
+
prompt: S.filter<S.Schema<string, string, never>>;
|
|
879
|
+
max_tokens_to_sample: S.filter<S.Schema<number, number, never>>;
|
|
880
|
+
stop_sequences: S.optionalWith<S.Array$<typeof S.String>, {
|
|
881
|
+
nullable: true;
|
|
882
|
+
}>;
|
|
883
|
+
temperature: S.optionalWith<S.filter<S.Schema<number, number, never>>, {
|
|
884
|
+
nullable: true;
|
|
885
|
+
}>;
|
|
886
|
+
top_p: S.optionalWith<S.filter<S.Schema<number, number, never>>, {
|
|
887
|
+
nullable: true;
|
|
888
|
+
}>;
|
|
889
|
+
top_k: S.optionalWith<S.filter<S.Schema<number, number, never>>, {
|
|
890
|
+
nullable: true;
|
|
891
|
+
}>;
|
|
892
|
+
metadata: S.optionalWith<typeof Metadata, {
|
|
893
|
+
nullable: true;
|
|
894
|
+
}>;
|
|
895
|
+
stream: S.optionalWith<typeof S.Boolean, {
|
|
896
|
+
nullable: true;
|
|
897
|
+
}>;
|
|
898
|
+
}, S.Struct.Encoded<{
|
|
899
|
+
model: typeof Model;
|
|
900
|
+
prompt: S.filter<S.Schema<string, string, never>>;
|
|
901
|
+
max_tokens_to_sample: S.filter<S.Schema<number, number, never>>;
|
|
902
|
+
stop_sequences: S.optionalWith<S.Array$<typeof S.String>, {
|
|
903
|
+
nullable: true;
|
|
904
|
+
}>;
|
|
905
|
+
temperature: S.optionalWith<S.filter<S.Schema<number, number, never>>, {
|
|
906
|
+
nullable: true;
|
|
907
|
+
}>;
|
|
908
|
+
top_p: S.optionalWith<S.filter<S.Schema<number, number, never>>, {
|
|
909
|
+
nullable: true;
|
|
910
|
+
}>;
|
|
911
|
+
top_k: S.optionalWith<S.filter<S.Schema<number, number, never>>, {
|
|
912
|
+
nullable: true;
|
|
913
|
+
}>;
|
|
914
|
+
metadata: S.optionalWith<typeof Metadata, {
|
|
915
|
+
nullable: true;
|
|
916
|
+
}>;
|
|
917
|
+
stream: S.optionalWith<typeof S.Boolean, {
|
|
918
|
+
nullable: true;
|
|
919
|
+
}>;
|
|
920
|
+
}>, never, {
|
|
921
|
+
readonly model: string;
|
|
922
|
+
} & {
|
|
923
|
+
readonly metadata?: {
|
|
924
|
+
readonly user_id?: string | null | undefined;
|
|
925
|
+
} | undefined;
|
|
926
|
+
} & {
|
|
927
|
+
readonly stop_sequences?: readonly string[] | undefined;
|
|
928
|
+
} & {
|
|
929
|
+
readonly stream?: boolean | undefined;
|
|
930
|
+
} & {
|
|
931
|
+
readonly temperature?: number | undefined;
|
|
932
|
+
} & {
|
|
933
|
+
readonly top_k?: number | undefined;
|
|
934
|
+
} & {
|
|
935
|
+
readonly top_p?: number | undefined;
|
|
936
|
+
} & {
|
|
937
|
+
readonly prompt: string;
|
|
938
|
+
} & {
|
|
939
|
+
readonly max_tokens_to_sample: number;
|
|
940
|
+
}, {}, {}>;
|
|
941
|
+
export declare class CompletionRequest extends CompletionRequest_base {
|
|
942
|
+
}
|
|
943
|
+
declare const CompletionResponseType_base: S.Literal<["completion"]>;
|
|
944
|
+
export declare class CompletionResponseType extends CompletionResponseType_base {
|
|
945
|
+
}
|
|
946
|
+
declare const CompletionResponse_base: S.Class<CompletionResponse, {
|
|
947
|
+
type: S.PropertySignature<":", "completion", never, ":", "completion", true, never>;
|
|
948
|
+
id: typeof S.String;
|
|
949
|
+
completion: typeof S.String;
|
|
950
|
+
stop_reason: S.Union<[typeof S.String, typeof S.Null]>;
|
|
951
|
+
model: typeof Model;
|
|
952
|
+
}, S.Struct.Encoded<{
|
|
953
|
+
type: S.PropertySignature<":", "completion", never, ":", "completion", true, never>;
|
|
954
|
+
id: typeof S.String;
|
|
955
|
+
completion: typeof S.String;
|
|
956
|
+
stop_reason: S.Union<[typeof S.String, typeof S.Null]>;
|
|
957
|
+
model: typeof Model;
|
|
958
|
+
}>, never, {
|
|
959
|
+
readonly type?: "completion" | undefined;
|
|
960
|
+
} & {
|
|
961
|
+
readonly id: string;
|
|
962
|
+
} & {
|
|
963
|
+
readonly model: string;
|
|
964
|
+
} & {
|
|
965
|
+
readonly stop_reason: string | null;
|
|
966
|
+
} & {
|
|
967
|
+
readonly completion: string;
|
|
968
|
+
}, {}, {}>;
|
|
969
|
+
export declare class CompletionResponse extends CompletionResponse_base {
|
|
970
|
+
}
|
|
971
|
+
declare const ModelsListParams_base: S.Struct<{
|
|
972
|
+
before_id: S.optionalWith<typeof S.String, {
|
|
973
|
+
nullable: true;
|
|
974
|
+
}>;
|
|
975
|
+
after_id: S.optionalWith<typeof S.String, {
|
|
976
|
+
nullable: true;
|
|
977
|
+
}>;
|
|
978
|
+
limit: S.optionalWith<S.filter<S.Schema<number, number, never>>, {
|
|
979
|
+
nullable: true;
|
|
980
|
+
default: () => 20;
|
|
981
|
+
}>;
|
|
982
|
+
"anthropic-version": S.optionalWith<typeof S.String, {
|
|
983
|
+
nullable: true;
|
|
984
|
+
}>;
|
|
985
|
+
"x-api-key": S.optionalWith<typeof S.String, {
|
|
986
|
+
nullable: true;
|
|
987
|
+
}>;
|
|
988
|
+
}>;
|
|
989
|
+
export declare class ModelsListParams extends ModelsListParams_base {
|
|
990
|
+
}
|
|
991
|
+
declare const ModelInfoType_base: S.Literal<["model"]>;
|
|
992
|
+
export declare class ModelInfoType extends ModelInfoType_base {
|
|
993
|
+
}
|
|
994
|
+
declare const ModelInfo_base: S.Struct<{
|
|
995
|
+
type: S.PropertySignature<":", "model", never, ":", "model", true, never>;
|
|
996
|
+
id: typeof S.String;
|
|
997
|
+
display_name: typeof S.String;
|
|
998
|
+
created_at: typeof S.String;
|
|
999
|
+
}>;
|
|
1000
|
+
export declare class ModelInfo extends ModelInfo_base {
|
|
1001
|
+
}
|
|
1002
|
+
declare const ListResponseModelInfo_base: S.Class<ListResponseModelInfo, {
|
|
1003
|
+
data: S.Array$<typeof ModelInfo>;
|
|
1004
|
+
has_more: typeof S.Boolean;
|
|
1005
|
+
first_id: S.Union<[typeof S.String, typeof S.Null]>;
|
|
1006
|
+
last_id: S.Union<[typeof S.String, typeof S.Null]>;
|
|
1007
|
+
}, S.Struct.Encoded<{
|
|
1008
|
+
data: S.Array$<typeof ModelInfo>;
|
|
1009
|
+
has_more: typeof S.Boolean;
|
|
1010
|
+
first_id: S.Union<[typeof S.String, typeof S.Null]>;
|
|
1011
|
+
last_id: S.Union<[typeof S.String, typeof S.Null]>;
|
|
1012
|
+
}>, never, {
|
|
1013
|
+
readonly data: readonly {
|
|
1014
|
+
readonly type: "model";
|
|
1015
|
+
readonly id: string;
|
|
1016
|
+
readonly display_name: string;
|
|
1017
|
+
readonly created_at: string;
|
|
1018
|
+
}[];
|
|
1019
|
+
} & {
|
|
1020
|
+
readonly has_more: boolean;
|
|
1021
|
+
} & {
|
|
1022
|
+
readonly first_id: string | null;
|
|
1023
|
+
} & {
|
|
1024
|
+
readonly last_id: string | null;
|
|
1025
|
+
}, {}, {}>;
|
|
1026
|
+
export declare class ListResponseModelInfo extends ListResponseModelInfo_base {
|
|
1027
|
+
}
|
|
1028
|
+
declare const ModelsGetParams_base: S.Struct<{
|
|
1029
|
+
"anthropic-version": S.optionalWith<typeof S.String, {
|
|
1030
|
+
nullable: true;
|
|
1031
|
+
}>;
|
|
1032
|
+
"x-api-key": S.optionalWith<typeof S.String, {
|
|
1033
|
+
nullable: true;
|
|
1034
|
+
}>;
|
|
1035
|
+
}>;
|
|
1036
|
+
export declare class ModelsGetParams extends ModelsGetParams_base {
|
|
1037
|
+
}
|
|
1038
|
+
declare const MessageBatchesListParams_base: S.Struct<{
|
|
1039
|
+
before_id: S.optionalWith<typeof S.String, {
|
|
1040
|
+
nullable: true;
|
|
1041
|
+
}>;
|
|
1042
|
+
after_id: S.optionalWith<typeof S.String, {
|
|
1043
|
+
nullable: true;
|
|
1044
|
+
}>;
|
|
1045
|
+
limit: S.optionalWith<S.filter<S.Schema<number, number, never>>, {
|
|
1046
|
+
nullable: true;
|
|
1047
|
+
default: () => 20;
|
|
1048
|
+
}>;
|
|
1049
|
+
"anthropic-version": S.optionalWith<typeof S.String, {
|
|
1050
|
+
nullable: true;
|
|
1051
|
+
}>;
|
|
1052
|
+
"x-api-key": S.optionalWith<typeof S.String, {
|
|
1053
|
+
nullable: true;
|
|
1054
|
+
}>;
|
|
1055
|
+
}>;
|
|
1056
|
+
export declare class MessageBatchesListParams extends MessageBatchesListParams_base {
|
|
1057
|
+
}
|
|
1058
|
+
declare const MessageBatchType_base: S.Literal<["message_batch"]>;
|
|
1059
|
+
export declare class MessageBatchType extends MessageBatchType_base {
|
|
1060
|
+
}
|
|
1061
|
+
declare const MessageBatchProcessingStatus_base: S.Literal<["in_progress", "canceling", "ended"]>;
|
|
1062
|
+
export declare class MessageBatchProcessingStatus extends MessageBatchProcessingStatus_base {
|
|
1063
|
+
}
|
|
1064
|
+
declare const RequestCounts_base: S.Struct<{
|
|
1065
|
+
processing: S.PropertySignature<":", number, never, ":", number, true, never>;
|
|
1066
|
+
succeeded: S.PropertySignature<":", number, never, ":", number, true, never>;
|
|
1067
|
+
errored: S.PropertySignature<":", number, never, ":", number, true, never>;
|
|
1068
|
+
canceled: S.PropertySignature<":", number, never, ":", number, true, never>;
|
|
1069
|
+
expired: S.PropertySignature<":", number, never, ":", number, true, never>;
|
|
1070
|
+
}>;
|
|
1071
|
+
export declare class RequestCounts extends RequestCounts_base {
|
|
1072
|
+
}
|
|
1073
|
+
declare const MessageBatch_base: S.Struct<{
|
|
1074
|
+
id: typeof S.String;
|
|
1075
|
+
type: S.PropertySignature<":", "message_batch", never, ":", "message_batch", true, never>;
|
|
1076
|
+
processing_status: typeof MessageBatchProcessingStatus;
|
|
1077
|
+
request_counts: typeof RequestCounts;
|
|
1078
|
+
ended_at: S.Union<[typeof S.String, typeof S.Null]>;
|
|
1079
|
+
created_at: typeof S.String;
|
|
1080
|
+
expires_at: typeof S.String;
|
|
1081
|
+
archived_at: S.Union<[typeof S.String, typeof S.Null]>;
|
|
1082
|
+
cancel_initiated_at: S.Union<[typeof S.String, typeof S.Null]>;
|
|
1083
|
+
results_url: S.Union<[typeof S.String, typeof S.Null]>;
|
|
1084
|
+
}>;
|
|
1085
|
+
export declare class MessageBatch extends MessageBatch_base {
|
|
1086
|
+
}
|
|
1087
|
+
declare const ListResponseMessageBatch_base: S.Class<ListResponseMessageBatch, {
|
|
1088
|
+
data: S.Array$<typeof MessageBatch>;
|
|
1089
|
+
has_more: typeof S.Boolean;
|
|
1090
|
+
first_id: S.Union<[typeof S.String, typeof S.Null]>;
|
|
1091
|
+
last_id: S.Union<[typeof S.String, typeof S.Null]>;
|
|
1092
|
+
}, S.Struct.Encoded<{
|
|
1093
|
+
data: S.Array$<typeof MessageBatch>;
|
|
1094
|
+
has_more: typeof S.Boolean;
|
|
1095
|
+
first_id: S.Union<[typeof S.String, typeof S.Null]>;
|
|
1096
|
+
last_id: S.Union<[typeof S.String, typeof S.Null]>;
|
|
1097
|
+
}>, never, {
|
|
1098
|
+
readonly data: readonly {
|
|
1099
|
+
readonly type: "message_batch";
|
|
1100
|
+
readonly id: string;
|
|
1101
|
+
readonly created_at: string;
|
|
1102
|
+
readonly processing_status: "in_progress" | "canceling" | "ended";
|
|
1103
|
+
readonly request_counts: {
|
|
1104
|
+
readonly processing: number;
|
|
1105
|
+
readonly succeeded: number;
|
|
1106
|
+
readonly errored: number;
|
|
1107
|
+
readonly canceled: number;
|
|
1108
|
+
readonly expired: number;
|
|
1109
|
+
};
|
|
1110
|
+
readonly ended_at: string | null;
|
|
1111
|
+
readonly expires_at: string;
|
|
1112
|
+
readonly archived_at: string | null;
|
|
1113
|
+
readonly cancel_initiated_at: string | null;
|
|
1114
|
+
readonly results_url: string | null;
|
|
1115
|
+
}[];
|
|
1116
|
+
} & {
|
|
1117
|
+
readonly has_more: boolean;
|
|
1118
|
+
} & {
|
|
1119
|
+
readonly first_id: string | null;
|
|
1120
|
+
} & {
|
|
1121
|
+
readonly last_id: string | null;
|
|
1122
|
+
}, {}, {}>;
|
|
1123
|
+
export declare class ListResponseMessageBatch extends ListResponseMessageBatch_base {
|
|
1124
|
+
}
|
|
1125
|
+
declare const MessageBatchesPostParams_base: S.Struct<{
|
|
1126
|
+
"anthropic-version": S.optionalWith<typeof S.String, {
|
|
1127
|
+
nullable: true;
|
|
1128
|
+
}>;
|
|
1129
|
+
}>;
|
|
1130
|
+
export declare class MessageBatchesPostParams extends MessageBatchesPostParams_base {
|
|
1131
|
+
}
|
|
1132
|
+
declare const MessageBatchIndividualRequestParams_base: S.Struct<{
|
|
1133
|
+
custom_id: S.filter<S.Schema<string, string, never>>;
|
|
1134
|
+
params: typeof CreateMessageParams;
|
|
1135
|
+
}>;
|
|
1136
|
+
export declare class MessageBatchIndividualRequestParams extends MessageBatchIndividualRequestParams_base {
|
|
1137
|
+
}
|
|
1138
|
+
declare const CreateMessageBatchParams_base: S.Class<CreateMessageBatchParams, {
|
|
1139
|
+
requests: S.filter<S.Schema<readonly {
|
|
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>>;
|
|
1368
|
+
}, S.Struct.Encoded<{
|
|
1369
|
+
requests: S.filter<S.Schema<readonly {
|
|
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>>;
|
|
1598
|
+
}>, never, {
|
|
1599
|
+
readonly requests: readonly {
|
|
1600
|
+
readonly custom_id: string;
|
|
1601
|
+
readonly params: CreateMessageParams;
|
|
1602
|
+
}[];
|
|
1603
|
+
}, {}, {}>;
|
|
1604
|
+
export declare class CreateMessageBatchParams extends CreateMessageBatchParams_base {
|
|
1605
|
+
}
|
|
1606
|
+
declare const MessageBatchesRetrieveParams_base: S.Struct<{
|
|
1607
|
+
"anthropic-version": S.optionalWith<typeof S.String, {
|
|
1608
|
+
nullable: true;
|
|
1609
|
+
}>;
|
|
1610
|
+
"x-api-key": S.optionalWith<typeof S.String, {
|
|
1611
|
+
nullable: true;
|
|
1612
|
+
}>;
|
|
1613
|
+
}>;
|
|
1614
|
+
export declare class MessageBatchesRetrieveParams extends MessageBatchesRetrieveParams_base {
|
|
1615
|
+
}
|
|
1616
|
+
declare const MessageBatchesDeleteParams_base: S.Struct<{
|
|
1617
|
+
"anthropic-version": S.optionalWith<typeof S.String, {
|
|
1618
|
+
nullable: true;
|
|
1619
|
+
}>;
|
|
1620
|
+
"x-api-key": S.optionalWith<typeof S.String, {
|
|
1621
|
+
nullable: true;
|
|
1622
|
+
}>;
|
|
1623
|
+
}>;
|
|
1624
|
+
export declare class MessageBatchesDeleteParams extends MessageBatchesDeleteParams_base {
|
|
1625
|
+
}
|
|
1626
|
+
declare const DeleteMessageBatchResponseType_base: S.Literal<["message_batch_deleted"]>;
|
|
1627
|
+
export declare class DeleteMessageBatchResponseType extends DeleteMessageBatchResponseType_base {
|
|
1628
|
+
}
|
|
1629
|
+
declare const DeleteMessageBatchResponse_base: S.Class<DeleteMessageBatchResponse, {
|
|
1630
|
+
id: typeof S.String;
|
|
1631
|
+
type: S.PropertySignature<":", "message_batch_deleted", never, ":", "message_batch_deleted", true, never>;
|
|
1632
|
+
}, S.Struct.Encoded<{
|
|
1633
|
+
id: typeof S.String;
|
|
1634
|
+
type: S.PropertySignature<":", "message_batch_deleted", never, ":", "message_batch_deleted", true, never>;
|
|
1635
|
+
}>, never, {
|
|
1636
|
+
readonly type?: "message_batch_deleted" | undefined;
|
|
1637
|
+
} & {
|
|
1638
|
+
readonly id: string;
|
|
1639
|
+
}, {}, {}>;
|
|
1640
|
+
export declare class DeleteMessageBatchResponse extends DeleteMessageBatchResponse_base {
|
|
1641
|
+
}
|
|
1642
|
+
declare const MessageBatchesCancelParams_base: S.Struct<{
|
|
1643
|
+
"anthropic-version": S.optionalWith<typeof S.String, {
|
|
1644
|
+
nullable: true;
|
|
1645
|
+
}>;
|
|
1646
|
+
}>;
|
|
1647
|
+
export declare class MessageBatchesCancelParams extends MessageBatchesCancelParams_base {
|
|
1648
|
+
}
|
|
1649
|
+
declare const MessageBatchesResultsParams_base: S.Struct<{
|
|
1650
|
+
"anthropic-version": S.optionalWith<typeof S.String, {
|
|
1651
|
+
nullable: true;
|
|
1652
|
+
}>;
|
|
1653
|
+
"x-api-key": S.optionalWith<typeof S.String, {
|
|
1654
|
+
nullable: true;
|
|
1655
|
+
}>;
|
|
1656
|
+
}>;
|
|
1657
|
+
export declare class MessageBatchesResultsParams extends MessageBatchesResultsParams_base {
|
|
1658
|
+
}
|
|
1659
|
+
declare const MessagesCountTokensPostParams_base: S.Struct<{
|
|
1660
|
+
"anthropic-version": S.optionalWith<typeof S.String, {
|
|
1661
|
+
nullable: true;
|
|
1662
|
+
}>;
|
|
1663
|
+
}>;
|
|
1664
|
+
export declare class MessagesCountTokensPostParams extends MessagesCountTokensPostParams_base {
|
|
1665
|
+
}
|
|
1666
|
+
declare const CountMessageTokensParams_base: S.Class<CountMessageTokensParams, {
|
|
1667
|
+
tool_choice: S.optionalWith<typeof ToolChoice, {
|
|
1668
|
+
nullable: true;
|
|
1669
|
+
}>;
|
|
1670
|
+
tools: S.optionalWith<S.Array$<typeof Tool>, {
|
|
1671
|
+
nullable: true;
|
|
1672
|
+
}>;
|
|
1673
|
+
messages: S.Array$<typeof InputMessage>;
|
|
1674
|
+
system: S.optionalWith<S.Union<[typeof S.String, S.Array$<typeof RequestTextBlock>]>, {
|
|
1675
|
+
nullable: true;
|
|
1676
|
+
}>;
|
|
1677
|
+
model: typeof Model;
|
|
1678
|
+
}, S.Struct.Encoded<{
|
|
1679
|
+
tool_choice: S.optionalWith<typeof ToolChoice, {
|
|
1680
|
+
nullable: true;
|
|
1681
|
+
}>;
|
|
1682
|
+
tools: S.optionalWith<S.Array$<typeof Tool>, {
|
|
1683
|
+
nullable: true;
|
|
1684
|
+
}>;
|
|
1685
|
+
messages: S.Array$<typeof InputMessage>;
|
|
1686
|
+
system: S.optionalWith<S.Union<[typeof S.String, S.Array$<typeof RequestTextBlock>]>, {
|
|
1687
|
+
nullable: true;
|
|
1688
|
+
}>;
|
|
1689
|
+
model: typeof Model;
|
|
1690
|
+
}>, never, {
|
|
1691
|
+
readonly model: string;
|
|
1692
|
+
} & {
|
|
1693
|
+
readonly messages: readonly {
|
|
1694
|
+
readonly content: string | readonly ({
|
|
1695
|
+
readonly type: "text";
|
|
1696
|
+
readonly text: string;
|
|
1697
|
+
readonly cache_control?: {
|
|
1698
|
+
readonly type: "ephemeral";
|
|
1699
|
+
} | null | undefined;
|
|
1700
|
+
readonly citations?: readonly ({
|
|
1701
|
+
readonly type: "char_location";
|
|
1702
|
+
readonly cited_text: string;
|
|
1703
|
+
readonly document_index: number;
|
|
1704
|
+
readonly document_title: string | null;
|
|
1705
|
+
readonly start_char_index: number;
|
|
1706
|
+
readonly end_char_index: number;
|
|
1707
|
+
} | {
|
|
1708
|
+
readonly type: "page_location";
|
|
1709
|
+
readonly cited_text: string;
|
|
1710
|
+
readonly document_index: number;
|
|
1711
|
+
readonly document_title: string | null;
|
|
1712
|
+
readonly start_page_number: number;
|
|
1713
|
+
readonly end_page_number: number;
|
|
1714
|
+
} | {
|
|
1715
|
+
readonly type: "content_block_location";
|
|
1716
|
+
readonly cited_text: string;
|
|
1717
|
+
readonly document_index: number;
|
|
1718
|
+
readonly document_title: string | null;
|
|
1719
|
+
readonly start_block_index: number;
|
|
1720
|
+
readonly end_block_index: number;
|
|
1721
|
+
})[] | null | undefined;
|
|
1722
|
+
} | {
|
|
1723
|
+
readonly type: "image";
|
|
1724
|
+
readonly cache_control?: {
|
|
1725
|
+
readonly type: "ephemeral";
|
|
1726
|
+
} | null | undefined;
|
|
1727
|
+
readonly source: {
|
|
1728
|
+
readonly type: "base64";
|
|
1729
|
+
readonly media_type: "image/jpeg" | "image/png" | "image/gif" | "image/webp";
|
|
1730
|
+
readonly data: string;
|
|
1731
|
+
};
|
|
1732
|
+
} | {
|
|
1733
|
+
readonly type: "tool_use";
|
|
1734
|
+
readonly cache_control?: {
|
|
1735
|
+
readonly type: "ephemeral";
|
|
1736
|
+
} | null | undefined;
|
|
1737
|
+
readonly id: string;
|
|
1738
|
+
readonly name: string;
|
|
1739
|
+
readonly input: {
|
|
1740
|
+
readonly [x: string]: unknown;
|
|
1741
|
+
};
|
|
1742
|
+
} | {
|
|
1743
|
+
readonly type: "tool_result";
|
|
1744
|
+
readonly cache_control?: {
|
|
1745
|
+
readonly type: "ephemeral";
|
|
1746
|
+
} | null | undefined;
|
|
1747
|
+
readonly tool_use_id: string;
|
|
1748
|
+
readonly is_error?: boolean | undefined;
|
|
1749
|
+
readonly content?: string | readonly ({
|
|
1750
|
+
readonly type: "text";
|
|
1751
|
+
readonly text: string;
|
|
1752
|
+
readonly cache_control?: {
|
|
1753
|
+
readonly type: "ephemeral";
|
|
1754
|
+
} | null | undefined;
|
|
1755
|
+
readonly citations?: readonly ({
|
|
1756
|
+
readonly type: "char_location";
|
|
1757
|
+
readonly cited_text: string;
|
|
1758
|
+
readonly document_index: number;
|
|
1759
|
+
readonly document_title: string | null;
|
|
1760
|
+
readonly start_char_index: number;
|
|
1761
|
+
readonly end_char_index: number;
|
|
1762
|
+
} | {
|
|
1763
|
+
readonly type: "page_location";
|
|
1764
|
+
readonly cited_text: string;
|
|
1765
|
+
readonly document_index: number;
|
|
1766
|
+
readonly document_title: string | null;
|
|
1767
|
+
readonly start_page_number: number;
|
|
1768
|
+
readonly end_page_number: number;
|
|
1769
|
+
} | {
|
|
1770
|
+
readonly type: "content_block_location";
|
|
1771
|
+
readonly cited_text: string;
|
|
1772
|
+
readonly document_index: number;
|
|
1773
|
+
readonly document_title: string | null;
|
|
1774
|
+
readonly start_block_index: number;
|
|
1775
|
+
readonly end_block_index: number;
|
|
1776
|
+
})[] | null | undefined;
|
|
1777
|
+
} | {
|
|
1778
|
+
readonly type: "image";
|
|
1779
|
+
readonly cache_control?: {
|
|
1780
|
+
readonly type: "ephemeral";
|
|
1781
|
+
} | null | undefined;
|
|
1782
|
+
readonly source: {
|
|
1783
|
+
readonly type: "base64";
|
|
1784
|
+
readonly media_type: "image/jpeg" | "image/png" | "image/gif" | "image/webp";
|
|
1785
|
+
readonly data: string;
|
|
1786
|
+
};
|
|
1787
|
+
})[] | undefined;
|
|
1788
|
+
} | {
|
|
1789
|
+
readonly type: "document";
|
|
1790
|
+
readonly cache_control?: {
|
|
1791
|
+
readonly type: "ephemeral";
|
|
1792
|
+
} | null | undefined;
|
|
1793
|
+
readonly citations?: {
|
|
1794
|
+
readonly enabled?: boolean | undefined;
|
|
1795
|
+
} | undefined;
|
|
1796
|
+
readonly source: {
|
|
1797
|
+
readonly type: "base64";
|
|
1798
|
+
readonly media_type: "application/pdf";
|
|
1799
|
+
readonly data: string;
|
|
1800
|
+
} | {
|
|
1801
|
+
readonly type: "text";
|
|
1802
|
+
readonly media_type: "text/plain";
|
|
1803
|
+
readonly data: string;
|
|
1804
|
+
} | {
|
|
1805
|
+
readonly type: "content";
|
|
1806
|
+
readonly content: string | readonly ({
|
|
1807
|
+
readonly type: "text";
|
|
1808
|
+
readonly text: string;
|
|
1809
|
+
readonly cache_control?: {
|
|
1810
|
+
readonly type: "ephemeral";
|
|
1811
|
+
} | null | undefined;
|
|
1812
|
+
readonly citations?: readonly ({
|
|
1813
|
+
readonly type: "char_location";
|
|
1814
|
+
readonly cited_text: string;
|
|
1815
|
+
readonly document_index: number;
|
|
1816
|
+
readonly document_title: string | null;
|
|
1817
|
+
readonly start_char_index: number;
|
|
1818
|
+
readonly end_char_index: number;
|
|
1819
|
+
} | {
|
|
1820
|
+
readonly type: "page_location";
|
|
1821
|
+
readonly cited_text: string;
|
|
1822
|
+
readonly document_index: number;
|
|
1823
|
+
readonly document_title: string | null;
|
|
1824
|
+
readonly start_page_number: number;
|
|
1825
|
+
readonly end_page_number: number;
|
|
1826
|
+
} | {
|
|
1827
|
+
readonly type: "content_block_location";
|
|
1828
|
+
readonly cited_text: string;
|
|
1829
|
+
readonly document_index: number;
|
|
1830
|
+
readonly document_title: string | null;
|
|
1831
|
+
readonly start_block_index: number;
|
|
1832
|
+
readonly end_block_index: number;
|
|
1833
|
+
})[] | null | undefined;
|
|
1834
|
+
} | {
|
|
1835
|
+
readonly type: "image";
|
|
1836
|
+
readonly cache_control?: {
|
|
1837
|
+
readonly type: "ephemeral";
|
|
1838
|
+
} | null | undefined;
|
|
1839
|
+
readonly source: {
|
|
1840
|
+
readonly type: "base64";
|
|
1841
|
+
readonly media_type: "image/jpeg" | "image/png" | "image/gif" | "image/webp";
|
|
1842
|
+
readonly data: string;
|
|
1843
|
+
};
|
|
1844
|
+
})[];
|
|
1845
|
+
};
|
|
1846
|
+
readonly title?: string | null | undefined;
|
|
1847
|
+
readonly context?: string | null | undefined;
|
|
1848
|
+
})[];
|
|
1849
|
+
readonly role: "user" | "assistant";
|
|
1850
|
+
}[];
|
|
1851
|
+
} & {
|
|
1852
|
+
readonly system?: string | readonly {
|
|
1853
|
+
readonly type: "text";
|
|
1854
|
+
readonly text: string;
|
|
1855
|
+
readonly cache_control?: {
|
|
1856
|
+
readonly type: "ephemeral";
|
|
1857
|
+
} | null | undefined;
|
|
1858
|
+
readonly citations?: readonly ({
|
|
1859
|
+
readonly type: "char_location";
|
|
1860
|
+
readonly cited_text: string;
|
|
1861
|
+
readonly document_index: number;
|
|
1862
|
+
readonly document_title: string | null;
|
|
1863
|
+
readonly start_char_index: number;
|
|
1864
|
+
readonly end_char_index: number;
|
|
1865
|
+
} | {
|
|
1866
|
+
readonly type: "page_location";
|
|
1867
|
+
readonly cited_text: string;
|
|
1868
|
+
readonly document_index: number;
|
|
1869
|
+
readonly document_title: string | null;
|
|
1870
|
+
readonly start_page_number: number;
|
|
1871
|
+
readonly end_page_number: number;
|
|
1872
|
+
} | {
|
|
1873
|
+
readonly type: "content_block_location";
|
|
1874
|
+
readonly cited_text: string;
|
|
1875
|
+
readonly document_index: number;
|
|
1876
|
+
readonly document_title: string | null;
|
|
1877
|
+
readonly start_block_index: number;
|
|
1878
|
+
readonly end_block_index: number;
|
|
1879
|
+
})[] | null | undefined;
|
|
1880
|
+
}[] | undefined;
|
|
1881
|
+
} & {
|
|
1882
|
+
readonly tool_choice?: {
|
|
1883
|
+
readonly type: "auto";
|
|
1884
|
+
readonly disable_parallel_tool_use?: boolean | undefined;
|
|
1885
|
+
} | {
|
|
1886
|
+
readonly type: "any";
|
|
1887
|
+
readonly disable_parallel_tool_use?: boolean | undefined;
|
|
1888
|
+
} | {
|
|
1889
|
+
readonly type: "tool";
|
|
1890
|
+
readonly name: string;
|
|
1891
|
+
readonly disable_parallel_tool_use?: boolean | undefined;
|
|
1892
|
+
} | undefined;
|
|
1893
|
+
} & {
|
|
1894
|
+
readonly tools?: readonly {
|
|
1895
|
+
readonly cache_control?: {
|
|
1896
|
+
readonly type: "ephemeral";
|
|
1897
|
+
} | null | undefined;
|
|
1898
|
+
readonly name: string;
|
|
1899
|
+
readonly description?: string | undefined;
|
|
1900
|
+
readonly input_schema: {
|
|
1901
|
+
readonly type: "object";
|
|
1902
|
+
readonly properties?: {
|
|
1903
|
+
readonly [x: string]: unknown;
|
|
1904
|
+
} | null | undefined;
|
|
1905
|
+
};
|
|
1906
|
+
}[] | undefined;
|
|
1907
|
+
}, {}, {}>;
|
|
1908
|
+
export declare class CountMessageTokensParams extends CountMessageTokensParams_base {
|
|
1909
|
+
}
|
|
1910
|
+
declare const CountMessageTokensResponse_base: S.Class<CountMessageTokensResponse, {
|
|
1911
|
+
input_tokens: typeof S.Int;
|
|
1912
|
+
}, S.Struct.Encoded<{
|
|
1913
|
+
input_tokens: typeof S.Int;
|
|
1914
|
+
}>, never, {
|
|
1915
|
+
readonly input_tokens: number;
|
|
1916
|
+
}, {}, {}>;
|
|
1917
|
+
export declare class CountMessageTokensResponse extends CountMessageTokensResponse_base {
|
|
1918
|
+
}
|
|
1919
|
+
declare const BetaMessagesPostParams_base: S.Struct<{
|
|
1920
|
+
"anthropic-beta": S.optionalWith<typeof S.String, {
|
|
1921
|
+
nullable: true;
|
|
1922
|
+
}>;
|
|
1923
|
+
"anthropic-version": S.optionalWith<typeof S.String, {
|
|
1924
|
+
nullable: true;
|
|
1925
|
+
}>;
|
|
1926
|
+
}>;
|
|
1927
|
+
export declare class BetaMessagesPostParams extends BetaMessagesPostParams_base {
|
|
1928
|
+
}
|
|
1929
|
+
declare const BetaInputMessageRole_base: S.Literal<["user", "assistant"]>;
|
|
1930
|
+
export declare class BetaInputMessageRole extends BetaInputMessageRole_base {
|
|
1931
|
+
}
|
|
1932
|
+
declare const BetaCacheControlEphemeralType_base: S.Literal<["ephemeral"]>;
|
|
1933
|
+
export declare class BetaCacheControlEphemeralType extends BetaCacheControlEphemeralType_base {
|
|
1934
|
+
}
|
|
1935
|
+
declare const BetaCacheControlEphemeral_base: S.Struct<{
|
|
1936
|
+
type: typeof BetaCacheControlEphemeralType;
|
|
1937
|
+
}>;
|
|
1938
|
+
export declare class BetaCacheControlEphemeral extends BetaCacheControlEphemeral_base {
|
|
1939
|
+
}
|
|
1940
|
+
declare const BetaRequestCharLocationCitationType_base: S.Literal<["char_location"]>;
|
|
1941
|
+
export declare class BetaRequestCharLocationCitationType extends BetaRequestCharLocationCitationType_base {
|
|
1942
|
+
}
|
|
1943
|
+
declare const BetaRequestCharLocationCitation_base: S.Struct<{
|
|
1944
|
+
type: typeof BetaRequestCharLocationCitationType;
|
|
1945
|
+
cited_text: typeof S.String;
|
|
1946
|
+
document_index: S.filter<S.Schema<number, number, never>>;
|
|
1947
|
+
document_title: S.Union<[S.filter<S.Schema<string, string, never>>, typeof S.Null]>;
|
|
1948
|
+
start_char_index: S.filter<S.Schema<number, number, never>>;
|
|
1949
|
+
end_char_index: typeof S.Int;
|
|
1950
|
+
}>;
|
|
1951
|
+
export declare class BetaRequestCharLocationCitation extends BetaRequestCharLocationCitation_base {
|
|
1952
|
+
}
|
|
1953
|
+
declare const BetaRequestPageLocationCitationType_base: S.Literal<["page_location"]>;
|
|
1954
|
+
export declare class BetaRequestPageLocationCitationType extends BetaRequestPageLocationCitationType_base {
|
|
1955
|
+
}
|
|
1956
|
+
declare const BetaRequestPageLocationCitation_base: S.Struct<{
|
|
1957
|
+
type: typeof BetaRequestPageLocationCitationType;
|
|
1958
|
+
cited_text: typeof S.String;
|
|
1959
|
+
document_index: S.filter<S.Schema<number, number, never>>;
|
|
1960
|
+
document_title: S.Union<[S.filter<S.Schema<string, string, never>>, typeof S.Null]>;
|
|
1961
|
+
start_page_number: S.filter<S.Schema<number, number, never>>;
|
|
1962
|
+
end_page_number: typeof S.Int;
|
|
1963
|
+
}>;
|
|
1964
|
+
export declare class BetaRequestPageLocationCitation extends BetaRequestPageLocationCitation_base {
|
|
1965
|
+
}
|
|
1966
|
+
declare const BetaRequestContentBlockLocationCitationType_base: S.Literal<["content_block_location"]>;
|
|
1967
|
+
export declare class BetaRequestContentBlockLocationCitationType extends BetaRequestContentBlockLocationCitationType_base {
|
|
1968
|
+
}
|
|
1969
|
+
declare const BetaRequestContentBlockLocationCitation_base: S.Struct<{
|
|
1970
|
+
type: typeof BetaRequestContentBlockLocationCitationType;
|
|
1971
|
+
cited_text: typeof S.String;
|
|
1972
|
+
document_index: S.filter<S.Schema<number, number, never>>;
|
|
1973
|
+
document_title: S.Union<[S.filter<S.Schema<string, string, never>>, typeof S.Null]>;
|
|
1974
|
+
start_block_index: S.filter<S.Schema<number, number, never>>;
|
|
1975
|
+
end_block_index: typeof S.Int;
|
|
1976
|
+
}>;
|
|
1977
|
+
export declare class BetaRequestContentBlockLocationCitation extends BetaRequestContentBlockLocationCitation_base {
|
|
1978
|
+
}
|
|
1979
|
+
declare const BetaRequestTextBlockType_base: S.Literal<["text"]>;
|
|
1980
|
+
export declare class BetaRequestTextBlockType extends BetaRequestTextBlockType_base {
|
|
1981
|
+
}
|
|
1982
|
+
declare const BetaRequestTextBlock_base: S.Struct<{
|
|
1983
|
+
cache_control: S.optionalWith<S.Union<[typeof BetaCacheControlEphemeral, typeof S.Null]>, {
|
|
1984
|
+
nullable: true;
|
|
1985
|
+
}>;
|
|
1986
|
+
citations: S.optionalWith<S.Union<[S.Array$<S.Union<[typeof BetaRequestCharLocationCitation, typeof BetaRequestPageLocationCitation, typeof BetaRequestContentBlockLocationCitation]>>, typeof S.Null]>, {
|
|
1987
|
+
nullable: true;
|
|
1988
|
+
}>;
|
|
1989
|
+
text: S.filter<S.Schema<string, string, never>>;
|
|
1990
|
+
type: typeof BetaRequestTextBlockType;
|
|
1991
|
+
}>;
|
|
1992
|
+
export declare class BetaRequestTextBlock extends BetaRequestTextBlock_base {
|
|
1993
|
+
}
|
|
1994
|
+
declare const BetaRequestImageBlockType_base: S.Literal<["image"]>;
|
|
1995
|
+
export declare class BetaRequestImageBlockType extends BetaRequestImageBlockType_base {
|
|
1996
|
+
}
|
|
1997
|
+
declare const BetaBase64ImageSourceType_base: S.Literal<["base64"]>;
|
|
1998
|
+
export declare class BetaBase64ImageSourceType extends BetaBase64ImageSourceType_base {
|
|
1999
|
+
}
|
|
2000
|
+
declare const BetaBase64ImageSourceMediaType_base: S.Literal<["image/jpeg", "image/png", "image/gif", "image/webp"]>;
|
|
2001
|
+
export declare class BetaBase64ImageSourceMediaType extends BetaBase64ImageSourceMediaType_base {
|
|
2002
|
+
}
|
|
2003
|
+
declare const BetaBase64ImageSource_base: S.Struct<{
|
|
2004
|
+
type: typeof BetaBase64ImageSourceType;
|
|
2005
|
+
media_type: typeof BetaBase64ImageSourceMediaType;
|
|
2006
|
+
data: typeof S.String;
|
|
2007
|
+
}>;
|
|
2008
|
+
export declare class BetaBase64ImageSource extends BetaBase64ImageSource_base {
|
|
2009
|
+
}
|
|
2010
|
+
declare const BetaRequestImageBlock_base: S.Struct<{
|
|
2011
|
+
cache_control: S.optionalWith<S.Union<[typeof BetaCacheControlEphemeral, typeof S.Null]>, {
|
|
2012
|
+
nullable: true;
|
|
2013
|
+
}>;
|
|
2014
|
+
type: typeof BetaRequestImageBlockType;
|
|
2015
|
+
source: typeof BetaBase64ImageSource;
|
|
2016
|
+
}>;
|
|
2017
|
+
export declare class BetaRequestImageBlock extends BetaRequestImageBlock_base {
|
|
2018
|
+
}
|
|
2019
|
+
declare const BetaRequestToolUseBlockType_base: S.Literal<["tool_use"]>;
|
|
2020
|
+
export declare class BetaRequestToolUseBlockType extends BetaRequestToolUseBlockType_base {
|
|
2021
|
+
}
|
|
2022
|
+
declare const BetaRequestToolUseBlock_base: S.Struct<{
|
|
2023
|
+
cache_control: S.optionalWith<S.Union<[typeof BetaCacheControlEphemeral, typeof S.Null]>, {
|
|
2024
|
+
nullable: true;
|
|
2025
|
+
}>;
|
|
2026
|
+
type: typeof BetaRequestToolUseBlockType;
|
|
2027
|
+
id: S.filter<S.Schema<string, string, never>>;
|
|
2028
|
+
name: S.filter<S.Schema<string, string, never>>;
|
|
2029
|
+
input: S.Record$<typeof S.String, typeof S.Unknown>;
|
|
2030
|
+
}>;
|
|
2031
|
+
export declare class BetaRequestToolUseBlock extends BetaRequestToolUseBlock_base {
|
|
2032
|
+
}
|
|
2033
|
+
declare const BetaRequestToolResultBlockType_base: S.Literal<["tool_result"]>;
|
|
2034
|
+
export declare class BetaRequestToolResultBlockType extends BetaRequestToolResultBlockType_base {
|
|
2035
|
+
}
|
|
2036
|
+
declare const BetaRequestToolResultBlock_base: S.Struct<{
|
|
2037
|
+
cache_control: S.optionalWith<S.Union<[typeof BetaCacheControlEphemeral, typeof S.Null]>, {
|
|
2038
|
+
nullable: true;
|
|
2039
|
+
}>;
|
|
2040
|
+
type: typeof BetaRequestToolResultBlockType;
|
|
2041
|
+
tool_use_id: S.filter<S.Schema<string, string, never>>;
|
|
2042
|
+
is_error: S.optionalWith<typeof S.Boolean, {
|
|
2043
|
+
nullable: true;
|
|
2044
|
+
}>;
|
|
2045
|
+
content: S.optionalWith<S.Union<[typeof S.String, S.Array$<S.Union<[typeof BetaRequestTextBlock, typeof BetaRequestImageBlock]>>]>, {
|
|
2046
|
+
nullable: true;
|
|
2047
|
+
}>;
|
|
2048
|
+
}>;
|
|
2049
|
+
export declare class BetaRequestToolResultBlock extends BetaRequestToolResultBlock_base {
|
|
2050
|
+
}
|
|
2051
|
+
declare const BetaRequestDocumentBlockType_base: S.Literal<["document"]>;
|
|
2052
|
+
export declare class BetaRequestDocumentBlockType extends BetaRequestDocumentBlockType_base {
|
|
2053
|
+
}
|
|
2054
|
+
declare const BetaBase64PDFSourceType_base: S.Literal<["base64"]>;
|
|
2055
|
+
export declare class BetaBase64PDFSourceType extends BetaBase64PDFSourceType_base {
|
|
2056
|
+
}
|
|
2057
|
+
declare const BetaBase64PDFSourceMediaType_base: S.Literal<["application/pdf"]>;
|
|
2058
|
+
export declare class BetaBase64PDFSourceMediaType extends BetaBase64PDFSourceMediaType_base {
|
|
2059
|
+
}
|
|
2060
|
+
declare const BetaBase64PDFSource_base: S.Struct<{
|
|
2061
|
+
type: typeof BetaBase64PDFSourceType;
|
|
2062
|
+
media_type: typeof BetaBase64PDFSourceMediaType;
|
|
2063
|
+
data: typeof S.String;
|
|
2064
|
+
}>;
|
|
2065
|
+
export declare class BetaBase64PDFSource extends BetaBase64PDFSource_base {
|
|
2066
|
+
}
|
|
2067
|
+
declare const BetaPlainTextSourceType_base: S.Literal<["text"]>;
|
|
2068
|
+
export declare class BetaPlainTextSourceType extends BetaPlainTextSourceType_base {
|
|
2069
|
+
}
|
|
2070
|
+
declare const BetaPlainTextSourceMediaType_base: S.Literal<["text/plain"]>;
|
|
2071
|
+
export declare class BetaPlainTextSourceMediaType extends BetaPlainTextSourceMediaType_base {
|
|
2072
|
+
}
|
|
2073
|
+
declare const BetaPlainTextSource_base: S.Struct<{
|
|
2074
|
+
type: typeof BetaPlainTextSourceType;
|
|
2075
|
+
media_type: typeof BetaPlainTextSourceMediaType;
|
|
2076
|
+
data: typeof S.String;
|
|
2077
|
+
}>;
|
|
2078
|
+
export declare class BetaPlainTextSource extends BetaPlainTextSource_base {
|
|
2079
|
+
}
|
|
2080
|
+
declare const BetaContentBlockSourceType_base: S.Literal<["content"]>;
|
|
2081
|
+
export declare class BetaContentBlockSourceType extends BetaContentBlockSourceType_base {
|
|
2082
|
+
}
|
|
2083
|
+
declare const BetaContentBlockSource_base: S.Struct<{
|
|
2084
|
+
type: typeof BetaContentBlockSourceType;
|
|
2085
|
+
content: S.Union<[typeof S.String, S.Array$<S.Union<[typeof BetaRequestTextBlock, typeof BetaRequestImageBlock]>>]>;
|
|
2086
|
+
}>;
|
|
2087
|
+
export declare class BetaContentBlockSource extends BetaContentBlockSource_base {
|
|
2088
|
+
}
|
|
2089
|
+
declare const BetaRequestCitationsConfig_base: S.Struct<{
|
|
2090
|
+
enabled: S.optionalWith<typeof S.Boolean, {
|
|
2091
|
+
nullable: true;
|
|
2092
|
+
}>;
|
|
2093
|
+
}>;
|
|
2094
|
+
export declare class BetaRequestCitationsConfig extends BetaRequestCitationsConfig_base {
|
|
2095
|
+
}
|
|
2096
|
+
declare const BetaRequestDocumentBlock_base: S.Struct<{
|
|
2097
|
+
cache_control: S.optionalWith<S.Union<[typeof BetaCacheControlEphemeral, typeof S.Null]>, {
|
|
2098
|
+
nullable: true;
|
|
2099
|
+
}>;
|
|
2100
|
+
type: typeof BetaRequestDocumentBlockType;
|
|
2101
|
+
source: S.Union<[typeof BetaBase64PDFSource, typeof BetaPlainTextSource, typeof BetaContentBlockSource]>;
|
|
2102
|
+
title: S.optionalWith<S.Union<[S.filter<S.Schema<string, string, never>>, typeof S.Null]>, {
|
|
2103
|
+
nullable: true;
|
|
2104
|
+
}>;
|
|
2105
|
+
context: S.optionalWith<S.Union<[S.filter<S.Schema<string, string, never>>, typeof S.Null]>, {
|
|
2106
|
+
nullable: true;
|
|
2107
|
+
}>;
|
|
2108
|
+
citations: S.optionalWith<typeof BetaRequestCitationsConfig, {
|
|
2109
|
+
nullable: true;
|
|
2110
|
+
}>;
|
|
2111
|
+
}>;
|
|
2112
|
+
export declare class BetaRequestDocumentBlock extends BetaRequestDocumentBlock_base {
|
|
2113
|
+
}
|
|
2114
|
+
declare const BetaInputContentBlock_base: S.Union<[typeof BetaRequestTextBlock, typeof BetaRequestImageBlock, typeof BetaRequestToolUseBlock, typeof BetaRequestToolResultBlock, typeof BetaRequestDocumentBlock]>;
|
|
2115
|
+
export declare class BetaInputContentBlock extends BetaInputContentBlock_base {
|
|
2116
|
+
}
|
|
2117
|
+
declare const BetaInputMessage_base: S.Struct<{
|
|
2118
|
+
role: typeof BetaInputMessageRole;
|
|
2119
|
+
content: S.Union<[typeof S.String, S.Array$<typeof BetaInputContentBlock>]>;
|
|
2120
|
+
}>;
|
|
2121
|
+
export declare class BetaInputMessage extends BetaInputMessage_base {
|
|
2122
|
+
}
|
|
2123
|
+
declare const BetaMetadata_base: S.Struct<{
|
|
2124
|
+
user_id: S.optionalWith<S.Union<[S.filter<S.Schema<string, string, never>>, typeof S.Null]>, {
|
|
2125
|
+
nullable: true;
|
|
2126
|
+
}>;
|
|
2127
|
+
}>;
|
|
2128
|
+
export declare class BetaMetadata extends BetaMetadata_base {
|
|
2129
|
+
}
|
|
2130
|
+
declare const BetaToolChoiceAutoType_base: S.Literal<["auto"]>;
|
|
2131
|
+
export declare class BetaToolChoiceAutoType extends BetaToolChoiceAutoType_base {
|
|
2132
|
+
}
|
|
2133
|
+
declare const BetaToolChoiceAuto_base: S.Struct<{
|
|
2134
|
+
type: typeof BetaToolChoiceAutoType;
|
|
2135
|
+
disable_parallel_tool_use: S.optionalWith<typeof S.Boolean, {
|
|
2136
|
+
nullable: true;
|
|
2137
|
+
}>;
|
|
2138
|
+
}>;
|
|
2139
|
+
export declare class BetaToolChoiceAuto extends BetaToolChoiceAuto_base {
|
|
2140
|
+
}
|
|
2141
|
+
declare const BetaToolChoiceAnyType_base: S.Literal<["any"]>;
|
|
2142
|
+
export declare class BetaToolChoiceAnyType extends BetaToolChoiceAnyType_base {
|
|
2143
|
+
}
|
|
2144
|
+
declare const BetaToolChoiceAny_base: S.Struct<{
|
|
2145
|
+
type: typeof BetaToolChoiceAnyType;
|
|
2146
|
+
disable_parallel_tool_use: S.optionalWith<typeof S.Boolean, {
|
|
2147
|
+
nullable: true;
|
|
2148
|
+
}>;
|
|
2149
|
+
}>;
|
|
2150
|
+
export declare class BetaToolChoiceAny extends BetaToolChoiceAny_base {
|
|
2151
|
+
}
|
|
2152
|
+
declare const BetaToolChoiceToolType_base: S.Literal<["tool"]>;
|
|
2153
|
+
export declare class BetaToolChoiceToolType extends BetaToolChoiceToolType_base {
|
|
2154
|
+
}
|
|
2155
|
+
declare const BetaToolChoiceTool_base: S.Struct<{
|
|
2156
|
+
type: typeof BetaToolChoiceToolType;
|
|
2157
|
+
name: typeof S.String;
|
|
2158
|
+
disable_parallel_tool_use: S.optionalWith<typeof S.Boolean, {
|
|
2159
|
+
nullable: true;
|
|
2160
|
+
}>;
|
|
2161
|
+
}>;
|
|
2162
|
+
export declare class BetaToolChoiceTool extends BetaToolChoiceTool_base {
|
|
2163
|
+
}
|
|
2164
|
+
declare const BetaToolChoice_base: S.Union<[typeof BetaToolChoiceAuto, typeof BetaToolChoiceAny, typeof BetaToolChoiceTool]>;
|
|
2165
|
+
export declare class BetaToolChoice extends BetaToolChoice_base {
|
|
2166
|
+
}
|
|
2167
|
+
declare const BetaToolTypeEnum_base: S.Literal<["custom"]>;
|
|
2168
|
+
export declare class BetaToolTypeEnum extends BetaToolTypeEnum_base {
|
|
2169
|
+
}
|
|
2170
|
+
declare const BetaInputSchemaType_base: S.Literal<["object"]>;
|
|
2171
|
+
export declare class BetaInputSchemaType extends BetaInputSchemaType_base {
|
|
2172
|
+
}
|
|
2173
|
+
declare const BetaInputSchema_base: S.Struct<{
|
|
2174
|
+
type: typeof BetaInputSchemaType;
|
|
2175
|
+
properties: S.optionalWith<S.Union<[S.Record$<typeof S.String, typeof S.Unknown>, typeof S.Null]>, {
|
|
2176
|
+
nullable: true;
|
|
2177
|
+
}>;
|
|
2178
|
+
}>;
|
|
2179
|
+
export declare class BetaInputSchema extends BetaInputSchema_base {
|
|
2180
|
+
}
|
|
2181
|
+
declare const BetaTool_base: S.Struct<{
|
|
2182
|
+
type: S.optionalWith<S.Union<[typeof S.Null, typeof BetaToolTypeEnum]>, {
|
|
2183
|
+
nullable: true;
|
|
2184
|
+
}>;
|
|
2185
|
+
description: S.optionalWith<typeof S.String, {
|
|
2186
|
+
nullable: true;
|
|
2187
|
+
}>;
|
|
2188
|
+
name: S.filter<S.Schema<string, string, never>>;
|
|
2189
|
+
input_schema: typeof BetaInputSchema;
|
|
2190
|
+
cache_control: S.optionalWith<S.Union<[typeof BetaCacheControlEphemeral, typeof S.Null]>, {
|
|
2191
|
+
nullable: true;
|
|
2192
|
+
}>;
|
|
2193
|
+
}>;
|
|
2194
|
+
export declare class BetaTool extends BetaTool_base {
|
|
2195
|
+
}
|
|
2196
|
+
declare const BetaComputerUseTool20241022Type_base: S.Literal<["computer_20241022"]>;
|
|
2197
|
+
export declare class BetaComputerUseTool20241022Type extends BetaComputerUseTool20241022Type_base {
|
|
2198
|
+
}
|
|
2199
|
+
declare const BetaComputerUseTool20241022Name_base: S.Literal<["computer"]>;
|
|
2200
|
+
export declare class BetaComputerUseTool20241022Name extends BetaComputerUseTool20241022Name_base {
|
|
2201
|
+
}
|
|
2202
|
+
declare const BetaComputerUseTool20241022_base: S.Struct<{
|
|
2203
|
+
cache_control: S.optionalWith<S.Union<[typeof BetaCacheControlEphemeral, typeof S.Null]>, {
|
|
2204
|
+
nullable: true;
|
|
2205
|
+
}>;
|
|
2206
|
+
type: typeof BetaComputerUseTool20241022Type;
|
|
2207
|
+
name: typeof BetaComputerUseTool20241022Name;
|
|
2208
|
+
display_height_px: S.filter<S.Schema<number, number, never>>;
|
|
2209
|
+
display_width_px: S.filter<S.Schema<number, number, never>>;
|
|
2210
|
+
display_number: S.optionalWith<S.Union<[S.filter<S.Schema<number, number, never>>, typeof S.Null]>, {
|
|
2211
|
+
nullable: true;
|
|
2212
|
+
}>;
|
|
2213
|
+
}>;
|
|
2214
|
+
export declare class BetaComputerUseTool20241022 extends BetaComputerUseTool20241022_base {
|
|
2215
|
+
}
|
|
2216
|
+
declare const BetaBashTool20241022Type_base: S.Literal<["bash_20241022"]>;
|
|
2217
|
+
export declare class BetaBashTool20241022Type extends BetaBashTool20241022Type_base {
|
|
2218
|
+
}
|
|
2219
|
+
declare const BetaBashTool20241022Name_base: S.Literal<["bash"]>;
|
|
2220
|
+
export declare class BetaBashTool20241022Name extends BetaBashTool20241022Name_base {
|
|
2221
|
+
}
|
|
2222
|
+
declare const BetaBashTool20241022_base: S.Struct<{
|
|
2223
|
+
cache_control: S.optionalWith<S.Union<[typeof BetaCacheControlEphemeral, typeof S.Null]>, {
|
|
2224
|
+
nullable: true;
|
|
2225
|
+
}>;
|
|
2226
|
+
type: typeof BetaBashTool20241022Type;
|
|
2227
|
+
name: typeof BetaBashTool20241022Name;
|
|
2228
|
+
}>;
|
|
2229
|
+
export declare class BetaBashTool20241022 extends BetaBashTool20241022_base {
|
|
2230
|
+
}
|
|
2231
|
+
declare const BetaTextEditor20241022Type_base: S.Literal<["text_editor_20241022"]>;
|
|
2232
|
+
export declare class BetaTextEditor20241022Type extends BetaTextEditor20241022Type_base {
|
|
2233
|
+
}
|
|
2234
|
+
declare const BetaTextEditor20241022Name_base: S.Literal<["str_replace_editor"]>;
|
|
2235
|
+
export declare class BetaTextEditor20241022Name extends BetaTextEditor20241022Name_base {
|
|
2236
|
+
}
|
|
2237
|
+
declare const BetaTextEditor20241022_base: S.Struct<{
|
|
2238
|
+
cache_control: S.optionalWith<S.Union<[typeof BetaCacheControlEphemeral, typeof S.Null]>, {
|
|
2239
|
+
nullable: true;
|
|
2240
|
+
}>;
|
|
2241
|
+
type: typeof BetaTextEditor20241022Type;
|
|
2242
|
+
name: typeof BetaTextEditor20241022Name;
|
|
2243
|
+
}>;
|
|
2244
|
+
export declare class BetaTextEditor20241022 extends BetaTextEditor20241022_base {
|
|
2245
|
+
}
|
|
2246
|
+
declare const BetaCreateMessageParams_base: S.Class<BetaCreateMessageParams, {
|
|
2247
|
+
model: typeof Model;
|
|
2248
|
+
messages: S.Array$<typeof BetaInputMessage>;
|
|
2249
|
+
max_tokens: S.filter<S.Schema<number, number, never>>;
|
|
2250
|
+
metadata: S.optionalWith<typeof BetaMetadata, {
|
|
2251
|
+
nullable: true;
|
|
2252
|
+
}>;
|
|
2253
|
+
stop_sequences: S.optionalWith<S.Array$<typeof S.String>, {
|
|
2254
|
+
nullable: true;
|
|
2255
|
+
}>;
|
|
2256
|
+
stream: S.optionalWith<typeof S.Boolean, {
|
|
2257
|
+
nullable: true;
|
|
2258
|
+
}>;
|
|
2259
|
+
system: S.optionalWith<S.Union<[typeof S.String, S.Array$<typeof BetaRequestTextBlock>]>, {
|
|
2260
|
+
nullable: true;
|
|
2261
|
+
}>;
|
|
2262
|
+
temperature: S.optionalWith<S.filter<S.Schema<number, number, never>>, {
|
|
2263
|
+
nullable: true;
|
|
2264
|
+
}>;
|
|
2265
|
+
tool_choice: S.optionalWith<typeof BetaToolChoice, {
|
|
2266
|
+
nullable: true;
|
|
2267
|
+
}>;
|
|
2268
|
+
tools: S.optionalWith<S.Array$<S.Union<[typeof BetaTool, typeof BetaComputerUseTool20241022, typeof BetaBashTool20241022, typeof BetaTextEditor20241022]>>, {
|
|
2269
|
+
nullable: true;
|
|
2270
|
+
}>;
|
|
2271
|
+
top_k: S.optionalWith<S.filter<S.Schema<number, number, never>>, {
|
|
2272
|
+
nullable: true;
|
|
2273
|
+
}>;
|
|
2274
|
+
top_p: S.optionalWith<S.filter<S.Schema<number, number, never>>, {
|
|
2275
|
+
nullable: true;
|
|
2276
|
+
}>;
|
|
2277
|
+
}, S.Struct.Encoded<{
|
|
2278
|
+
model: typeof Model;
|
|
2279
|
+
messages: S.Array$<typeof BetaInputMessage>;
|
|
2280
|
+
max_tokens: S.filter<S.Schema<number, number, never>>;
|
|
2281
|
+
metadata: S.optionalWith<typeof BetaMetadata, {
|
|
2282
|
+
nullable: true;
|
|
2283
|
+
}>;
|
|
2284
|
+
stop_sequences: S.optionalWith<S.Array$<typeof S.String>, {
|
|
2285
|
+
nullable: true;
|
|
2286
|
+
}>;
|
|
2287
|
+
stream: S.optionalWith<typeof S.Boolean, {
|
|
2288
|
+
nullable: true;
|
|
2289
|
+
}>;
|
|
2290
|
+
system: S.optionalWith<S.Union<[typeof S.String, S.Array$<typeof BetaRequestTextBlock>]>, {
|
|
2291
|
+
nullable: true;
|
|
2292
|
+
}>;
|
|
2293
|
+
temperature: S.optionalWith<S.filter<S.Schema<number, number, never>>, {
|
|
2294
|
+
nullable: true;
|
|
2295
|
+
}>;
|
|
2296
|
+
tool_choice: S.optionalWith<typeof BetaToolChoice, {
|
|
2297
|
+
nullable: true;
|
|
2298
|
+
}>;
|
|
2299
|
+
tools: S.optionalWith<S.Array$<S.Union<[typeof BetaTool, typeof BetaComputerUseTool20241022, typeof BetaBashTool20241022, typeof BetaTextEditor20241022]>>, {
|
|
2300
|
+
nullable: true;
|
|
2301
|
+
}>;
|
|
2302
|
+
top_k: S.optionalWith<S.filter<S.Schema<number, number, never>>, {
|
|
2303
|
+
nullable: true;
|
|
2304
|
+
}>;
|
|
2305
|
+
top_p: S.optionalWith<S.filter<S.Schema<number, number, never>>, {
|
|
2306
|
+
nullable: true;
|
|
2307
|
+
}>;
|
|
2308
|
+
}>, never, {
|
|
2309
|
+
readonly model: string;
|
|
2310
|
+
} & {
|
|
2311
|
+
readonly messages: readonly {
|
|
2312
|
+
readonly content: string | readonly ({
|
|
2313
|
+
readonly type: "text";
|
|
2314
|
+
readonly text: string;
|
|
2315
|
+
readonly cache_control?: {
|
|
2316
|
+
readonly type: "ephemeral";
|
|
2317
|
+
} | null | undefined;
|
|
2318
|
+
readonly citations?: readonly ({
|
|
2319
|
+
readonly type: "char_location";
|
|
2320
|
+
readonly cited_text: string;
|
|
2321
|
+
readonly document_index: number;
|
|
2322
|
+
readonly document_title: string | null;
|
|
2323
|
+
readonly start_char_index: number;
|
|
2324
|
+
readonly end_char_index: number;
|
|
2325
|
+
} | {
|
|
2326
|
+
readonly type: "page_location";
|
|
2327
|
+
readonly cited_text: string;
|
|
2328
|
+
readonly document_index: number;
|
|
2329
|
+
readonly document_title: string | null;
|
|
2330
|
+
readonly start_page_number: number;
|
|
2331
|
+
readonly end_page_number: number;
|
|
2332
|
+
} | {
|
|
2333
|
+
readonly type: "content_block_location";
|
|
2334
|
+
readonly cited_text: string;
|
|
2335
|
+
readonly document_index: number;
|
|
2336
|
+
readonly document_title: string | null;
|
|
2337
|
+
readonly start_block_index: number;
|
|
2338
|
+
readonly end_block_index: number;
|
|
2339
|
+
})[] | null | undefined;
|
|
2340
|
+
} | {
|
|
2341
|
+
readonly type: "image";
|
|
2342
|
+
readonly cache_control?: {
|
|
2343
|
+
readonly type: "ephemeral";
|
|
2344
|
+
} | null | undefined;
|
|
2345
|
+
readonly source: {
|
|
2346
|
+
readonly type: "base64";
|
|
2347
|
+
readonly media_type: "image/jpeg" | "image/png" | "image/gif" | "image/webp";
|
|
2348
|
+
readonly data: string;
|
|
2349
|
+
};
|
|
2350
|
+
} | {
|
|
2351
|
+
readonly type: "tool_use";
|
|
2352
|
+
readonly cache_control?: {
|
|
2353
|
+
readonly type: "ephemeral";
|
|
2354
|
+
} | null | undefined;
|
|
2355
|
+
readonly id: string;
|
|
2356
|
+
readonly name: string;
|
|
2357
|
+
readonly input: {
|
|
2358
|
+
readonly [x: string]: unknown;
|
|
2359
|
+
};
|
|
2360
|
+
} | {
|
|
2361
|
+
readonly type: "tool_result";
|
|
2362
|
+
readonly cache_control?: {
|
|
2363
|
+
readonly type: "ephemeral";
|
|
2364
|
+
} | null | undefined;
|
|
2365
|
+
readonly tool_use_id: string;
|
|
2366
|
+
readonly is_error?: boolean | undefined;
|
|
2367
|
+
readonly content?: string | readonly ({
|
|
2368
|
+
readonly type: "text";
|
|
2369
|
+
readonly text: string;
|
|
2370
|
+
readonly cache_control?: {
|
|
2371
|
+
readonly type: "ephemeral";
|
|
2372
|
+
} | null | undefined;
|
|
2373
|
+
readonly citations?: readonly ({
|
|
2374
|
+
readonly type: "char_location";
|
|
2375
|
+
readonly cited_text: string;
|
|
2376
|
+
readonly document_index: number;
|
|
2377
|
+
readonly document_title: string | null;
|
|
2378
|
+
readonly start_char_index: number;
|
|
2379
|
+
readonly end_char_index: number;
|
|
2380
|
+
} | {
|
|
2381
|
+
readonly type: "page_location";
|
|
2382
|
+
readonly cited_text: string;
|
|
2383
|
+
readonly document_index: number;
|
|
2384
|
+
readonly document_title: string | null;
|
|
2385
|
+
readonly start_page_number: number;
|
|
2386
|
+
readonly end_page_number: number;
|
|
2387
|
+
} | {
|
|
2388
|
+
readonly type: "content_block_location";
|
|
2389
|
+
readonly cited_text: string;
|
|
2390
|
+
readonly document_index: number;
|
|
2391
|
+
readonly document_title: string | null;
|
|
2392
|
+
readonly start_block_index: number;
|
|
2393
|
+
readonly end_block_index: number;
|
|
2394
|
+
})[] | null | undefined;
|
|
2395
|
+
} | {
|
|
2396
|
+
readonly type: "image";
|
|
2397
|
+
readonly cache_control?: {
|
|
2398
|
+
readonly type: "ephemeral";
|
|
2399
|
+
} | null | undefined;
|
|
2400
|
+
readonly source: {
|
|
2401
|
+
readonly type: "base64";
|
|
2402
|
+
readonly media_type: "image/jpeg" | "image/png" | "image/gif" | "image/webp";
|
|
2403
|
+
readonly data: string;
|
|
2404
|
+
};
|
|
2405
|
+
})[] | undefined;
|
|
2406
|
+
} | {
|
|
2407
|
+
readonly type: "document";
|
|
2408
|
+
readonly cache_control?: {
|
|
2409
|
+
readonly type: "ephemeral";
|
|
2410
|
+
} | null | undefined;
|
|
2411
|
+
readonly citations?: {
|
|
2412
|
+
readonly enabled?: boolean | undefined;
|
|
2413
|
+
} | undefined;
|
|
2414
|
+
readonly source: {
|
|
2415
|
+
readonly type: "base64";
|
|
2416
|
+
readonly media_type: "application/pdf";
|
|
2417
|
+
readonly data: string;
|
|
2418
|
+
} | {
|
|
2419
|
+
readonly type: "text";
|
|
2420
|
+
readonly media_type: "text/plain";
|
|
2421
|
+
readonly data: string;
|
|
2422
|
+
} | {
|
|
2423
|
+
readonly type: "content";
|
|
2424
|
+
readonly content: string | readonly ({
|
|
2425
|
+
readonly type: "text";
|
|
2426
|
+
readonly text: string;
|
|
2427
|
+
readonly cache_control?: {
|
|
2428
|
+
readonly type: "ephemeral";
|
|
2429
|
+
} | null | undefined;
|
|
2430
|
+
readonly citations?: readonly ({
|
|
2431
|
+
readonly type: "char_location";
|
|
2432
|
+
readonly cited_text: string;
|
|
2433
|
+
readonly document_index: number;
|
|
2434
|
+
readonly document_title: string | null;
|
|
2435
|
+
readonly start_char_index: number;
|
|
2436
|
+
readonly end_char_index: number;
|
|
2437
|
+
} | {
|
|
2438
|
+
readonly type: "page_location";
|
|
2439
|
+
readonly cited_text: string;
|
|
2440
|
+
readonly document_index: number;
|
|
2441
|
+
readonly document_title: string | null;
|
|
2442
|
+
readonly start_page_number: number;
|
|
2443
|
+
readonly end_page_number: number;
|
|
2444
|
+
} | {
|
|
2445
|
+
readonly type: "content_block_location";
|
|
2446
|
+
readonly cited_text: string;
|
|
2447
|
+
readonly document_index: number;
|
|
2448
|
+
readonly document_title: string | null;
|
|
2449
|
+
readonly start_block_index: number;
|
|
2450
|
+
readonly end_block_index: number;
|
|
2451
|
+
})[] | null | undefined;
|
|
2452
|
+
} | {
|
|
2453
|
+
readonly type: "image";
|
|
2454
|
+
readonly cache_control?: {
|
|
2455
|
+
readonly type: "ephemeral";
|
|
2456
|
+
} | null | undefined;
|
|
2457
|
+
readonly source: {
|
|
2458
|
+
readonly type: "base64";
|
|
2459
|
+
readonly media_type: "image/jpeg" | "image/png" | "image/gif" | "image/webp";
|
|
2460
|
+
readonly data: string;
|
|
2461
|
+
};
|
|
2462
|
+
})[];
|
|
2463
|
+
};
|
|
2464
|
+
readonly title?: string | null | undefined;
|
|
2465
|
+
readonly context?: string | null | undefined;
|
|
2466
|
+
})[];
|
|
2467
|
+
readonly role: "user" | "assistant";
|
|
2468
|
+
}[];
|
|
2469
|
+
} & {
|
|
2470
|
+
readonly max_tokens: number;
|
|
2471
|
+
} & {
|
|
2472
|
+
readonly metadata?: {
|
|
2473
|
+
readonly user_id?: string | null | undefined;
|
|
2474
|
+
} | undefined;
|
|
2475
|
+
} & {
|
|
2476
|
+
readonly stop_sequences?: readonly string[] | undefined;
|
|
2477
|
+
} & {
|
|
2478
|
+
readonly stream?: boolean | undefined;
|
|
2479
|
+
} & {
|
|
2480
|
+
readonly system?: string | readonly {
|
|
2481
|
+
readonly type: "text";
|
|
2482
|
+
readonly text: string;
|
|
2483
|
+
readonly cache_control?: {
|
|
2484
|
+
readonly type: "ephemeral";
|
|
2485
|
+
} | null | undefined;
|
|
2486
|
+
readonly citations?: readonly ({
|
|
2487
|
+
readonly type: "char_location";
|
|
2488
|
+
readonly cited_text: string;
|
|
2489
|
+
readonly document_index: number;
|
|
2490
|
+
readonly document_title: string | null;
|
|
2491
|
+
readonly start_char_index: number;
|
|
2492
|
+
readonly end_char_index: number;
|
|
2493
|
+
} | {
|
|
2494
|
+
readonly type: "page_location";
|
|
2495
|
+
readonly cited_text: string;
|
|
2496
|
+
readonly document_index: number;
|
|
2497
|
+
readonly document_title: string | null;
|
|
2498
|
+
readonly start_page_number: number;
|
|
2499
|
+
readonly end_page_number: number;
|
|
2500
|
+
} | {
|
|
2501
|
+
readonly type: "content_block_location";
|
|
2502
|
+
readonly cited_text: string;
|
|
2503
|
+
readonly document_index: number;
|
|
2504
|
+
readonly document_title: string | null;
|
|
2505
|
+
readonly start_block_index: number;
|
|
2506
|
+
readonly end_block_index: number;
|
|
2507
|
+
})[] | null | undefined;
|
|
2508
|
+
}[] | undefined;
|
|
2509
|
+
} & {
|
|
2510
|
+
readonly temperature?: number | undefined;
|
|
2511
|
+
} & {
|
|
2512
|
+
readonly tool_choice?: {
|
|
2513
|
+
readonly type: "auto";
|
|
2514
|
+
readonly disable_parallel_tool_use?: boolean | undefined;
|
|
2515
|
+
} | {
|
|
2516
|
+
readonly type: "any";
|
|
2517
|
+
readonly disable_parallel_tool_use?: boolean | undefined;
|
|
2518
|
+
} | {
|
|
2519
|
+
readonly type: "tool";
|
|
2520
|
+
readonly name: string;
|
|
2521
|
+
readonly disable_parallel_tool_use?: boolean | undefined;
|
|
2522
|
+
} | undefined;
|
|
2523
|
+
} & {
|
|
2524
|
+
readonly tools?: readonly ({
|
|
2525
|
+
readonly type?: "custom" | null | undefined;
|
|
2526
|
+
readonly cache_control?: {
|
|
2527
|
+
readonly type: "ephemeral";
|
|
2528
|
+
} | null | undefined;
|
|
2529
|
+
readonly name: string;
|
|
2530
|
+
readonly description?: string | undefined;
|
|
2531
|
+
readonly input_schema: {
|
|
2532
|
+
readonly type: "object";
|
|
2533
|
+
readonly properties?: {
|
|
2534
|
+
readonly [x: string]: unknown;
|
|
2535
|
+
} | null | undefined;
|
|
2536
|
+
};
|
|
2537
|
+
} | {
|
|
2538
|
+
readonly type: "computer_20241022";
|
|
2539
|
+
readonly cache_control?: {
|
|
2540
|
+
readonly type: "ephemeral";
|
|
2541
|
+
} | null | undefined;
|
|
2542
|
+
readonly name: "computer";
|
|
2543
|
+
readonly display_height_px: number;
|
|
2544
|
+
readonly display_width_px: number;
|
|
2545
|
+
readonly display_number?: number | null | undefined;
|
|
2546
|
+
} | {
|
|
2547
|
+
readonly type: "bash_20241022";
|
|
2548
|
+
readonly cache_control?: {
|
|
2549
|
+
readonly type: "ephemeral";
|
|
2550
|
+
} | null | undefined;
|
|
2551
|
+
readonly name: "bash";
|
|
2552
|
+
} | {
|
|
2553
|
+
readonly type: "text_editor_20241022";
|
|
2554
|
+
readonly cache_control?: {
|
|
2555
|
+
readonly type: "ephemeral";
|
|
2556
|
+
} | null | undefined;
|
|
2557
|
+
readonly name: "str_replace_editor";
|
|
2558
|
+
})[] | undefined;
|
|
2559
|
+
} & {
|
|
2560
|
+
readonly top_k?: number | undefined;
|
|
2561
|
+
} & {
|
|
2562
|
+
readonly top_p?: number | undefined;
|
|
2563
|
+
}, {}, {}>;
|
|
2564
|
+
export declare class BetaCreateMessageParams extends BetaCreateMessageParams_base {
|
|
2565
|
+
}
|
|
2566
|
+
declare const BetaMessageType_base: S.Literal<["message"]>;
|
|
2567
|
+
export declare class BetaMessageType extends BetaMessageType_base {
|
|
2568
|
+
}
|
|
2569
|
+
declare const BetaMessageRole_base: S.Literal<["assistant"]>;
|
|
2570
|
+
export declare class BetaMessageRole extends BetaMessageRole_base {
|
|
2571
|
+
}
|
|
2572
|
+
declare const BetaResponseTextBlockType_base: S.Literal<["text"]>;
|
|
2573
|
+
export declare class BetaResponseTextBlockType extends BetaResponseTextBlockType_base {
|
|
2574
|
+
}
|
|
2575
|
+
declare const BetaResponseCharLocationCitationType_base: S.Literal<["char_location"]>;
|
|
2576
|
+
export declare class BetaResponseCharLocationCitationType extends BetaResponseCharLocationCitationType_base {
|
|
2577
|
+
}
|
|
2578
|
+
declare const BetaResponseCharLocationCitation_base: S.Struct<{
|
|
2579
|
+
type: S.PropertySignature<":", "char_location", never, ":", "char_location", true, never>;
|
|
2580
|
+
cited_text: typeof S.String;
|
|
2581
|
+
document_index: S.filter<S.Schema<number, number, never>>;
|
|
2582
|
+
document_title: S.Union<[typeof S.String, typeof S.Null]>;
|
|
2583
|
+
start_char_index: S.filter<S.Schema<number, number, never>>;
|
|
2584
|
+
end_char_index: typeof S.Int;
|
|
2585
|
+
}>;
|
|
2586
|
+
export declare class BetaResponseCharLocationCitation extends BetaResponseCharLocationCitation_base {
|
|
2587
|
+
}
|
|
2588
|
+
declare const BetaResponsePageLocationCitationType_base: S.Literal<["page_location"]>;
|
|
2589
|
+
export declare class BetaResponsePageLocationCitationType extends BetaResponsePageLocationCitationType_base {
|
|
2590
|
+
}
|
|
2591
|
+
declare const BetaResponsePageLocationCitation_base: S.Struct<{
|
|
2592
|
+
type: S.PropertySignature<":", "page_location", never, ":", "page_location", true, never>;
|
|
2593
|
+
cited_text: typeof S.String;
|
|
2594
|
+
document_index: S.filter<S.Schema<number, number, never>>;
|
|
2595
|
+
document_title: S.Union<[typeof S.String, typeof S.Null]>;
|
|
2596
|
+
start_page_number: S.filter<S.Schema<number, number, never>>;
|
|
2597
|
+
end_page_number: typeof S.Int;
|
|
2598
|
+
}>;
|
|
2599
|
+
export declare class BetaResponsePageLocationCitation extends BetaResponsePageLocationCitation_base {
|
|
2600
|
+
}
|
|
2601
|
+
declare const BetaResponseContentBlockLocationCitationType_base: S.Literal<["content_block_location"]>;
|
|
2602
|
+
export declare class BetaResponseContentBlockLocationCitationType extends BetaResponseContentBlockLocationCitationType_base {
|
|
2603
|
+
}
|
|
2604
|
+
declare const BetaResponseContentBlockLocationCitation_base: S.Struct<{
|
|
2605
|
+
type: S.PropertySignature<":", "content_block_location", never, ":", "content_block_location", true, never>;
|
|
2606
|
+
cited_text: typeof S.String;
|
|
2607
|
+
document_index: S.filter<S.Schema<number, number, never>>;
|
|
2608
|
+
document_title: S.Union<[typeof S.String, typeof S.Null]>;
|
|
2609
|
+
start_block_index: S.filter<S.Schema<number, number, never>>;
|
|
2610
|
+
end_block_index: typeof S.Int;
|
|
2611
|
+
}>;
|
|
2612
|
+
export declare class BetaResponseContentBlockLocationCitation extends BetaResponseContentBlockLocationCitation_base {
|
|
2613
|
+
}
|
|
2614
|
+
declare const BetaResponseTextBlock_base: S.Struct<{
|
|
2615
|
+
type: S.PropertySignature<":", "text", never, ":", "text", true, never>;
|
|
2616
|
+
text: S.filter<S.Schema<string, string, never>>;
|
|
2617
|
+
citations: S.optionalWith<S.NullOr<S.Union<[S.Array$<S.Union<[typeof BetaResponseCharLocationCitation, typeof BetaResponsePageLocationCitation, typeof BetaResponseContentBlockLocationCitation]>>, typeof S.Null]>>, {
|
|
2618
|
+
default: () => null;
|
|
2619
|
+
}>;
|
|
2620
|
+
}>;
|
|
2621
|
+
export declare class BetaResponseTextBlock extends BetaResponseTextBlock_base {
|
|
2622
|
+
}
|
|
2623
|
+
declare const BetaResponseToolUseBlockType_base: S.Literal<["tool_use"]>;
|
|
2624
|
+
export declare class BetaResponseToolUseBlockType extends BetaResponseToolUseBlockType_base {
|
|
2625
|
+
}
|
|
2626
|
+
declare const BetaResponseToolUseBlock_base: S.Struct<{
|
|
2627
|
+
type: S.PropertySignature<":", "tool_use", never, ":", "tool_use", true, never>;
|
|
2628
|
+
id: S.filter<S.Schema<string, string, never>>;
|
|
2629
|
+
name: S.filter<S.Schema<string, string, never>>;
|
|
2630
|
+
input: S.Record$<typeof S.String, typeof S.Unknown>;
|
|
2631
|
+
}>;
|
|
2632
|
+
export declare class BetaResponseToolUseBlock extends BetaResponseToolUseBlock_base {
|
|
2633
|
+
}
|
|
2634
|
+
declare const BetaContentBlock_base: S.Union<[typeof BetaResponseTextBlock, typeof BetaResponseToolUseBlock]>;
|
|
2635
|
+
export declare class BetaContentBlock extends BetaContentBlock_base {
|
|
2636
|
+
}
|
|
2637
|
+
declare const BetaMessageStopReasonEnum_base: S.Literal<["end_turn", "max_tokens", "stop_sequence", "tool_use"]>;
|
|
2638
|
+
export declare class BetaMessageStopReasonEnum extends BetaMessageStopReasonEnum_base {
|
|
2639
|
+
}
|
|
2640
|
+
declare const BetaUsage_base: S.Struct<{
|
|
2641
|
+
input_tokens: S.filter<S.Schema<number, number, never>>;
|
|
2642
|
+
cache_creation_input_tokens: S.optionalWith<S.NullOr<S.Union<[S.filter<S.Schema<number, number, never>>, typeof S.Null]>>, {
|
|
2643
|
+
default: () => null;
|
|
2644
|
+
}>;
|
|
2645
|
+
cache_read_input_tokens: S.optionalWith<S.NullOr<S.Union<[S.filter<S.Schema<number, number, never>>, typeof S.Null]>>, {
|
|
2646
|
+
default: () => null;
|
|
2647
|
+
}>;
|
|
2648
|
+
output_tokens: S.filter<S.Schema<number, number, never>>;
|
|
2649
|
+
}>;
|
|
2650
|
+
export declare class BetaUsage extends BetaUsage_base {
|
|
2651
|
+
}
|
|
2652
|
+
declare const BetaMessage_base: S.Class<BetaMessage, {
|
|
2653
|
+
id: typeof S.String;
|
|
2654
|
+
type: S.PropertySignature<":", "message", never, ":", "message", true, never>;
|
|
2655
|
+
role: S.PropertySignature<":", "assistant", never, ":", "assistant", true, never>;
|
|
2656
|
+
content: S.Array$<typeof BetaContentBlock>;
|
|
2657
|
+
model: typeof Model;
|
|
2658
|
+
stop_reason: S.Union<[typeof BetaMessageStopReasonEnum, typeof S.Null]>;
|
|
2659
|
+
stop_sequence: S.optionalWith<S.NullOr<S.Union<[typeof S.String, typeof S.Null]>>, {
|
|
2660
|
+
default: () => null;
|
|
2661
|
+
}>;
|
|
2662
|
+
usage: typeof BetaUsage;
|
|
2663
|
+
}, S.Struct.Encoded<{
|
|
2664
|
+
id: typeof S.String;
|
|
2665
|
+
type: S.PropertySignature<":", "message", never, ":", "message", true, never>;
|
|
2666
|
+
role: S.PropertySignature<":", "assistant", never, ":", "assistant", true, never>;
|
|
2667
|
+
content: S.Array$<typeof BetaContentBlock>;
|
|
2668
|
+
model: typeof Model;
|
|
2669
|
+
stop_reason: S.Union<[typeof BetaMessageStopReasonEnum, typeof S.Null]>;
|
|
2670
|
+
stop_sequence: S.optionalWith<S.NullOr<S.Union<[typeof S.String, typeof S.Null]>>, {
|
|
2671
|
+
default: () => null;
|
|
2672
|
+
}>;
|
|
2673
|
+
usage: typeof BetaUsage;
|
|
2674
|
+
}>, never, {
|
|
2675
|
+
readonly type?: "message" | undefined;
|
|
2676
|
+
} & {
|
|
2677
|
+
readonly id: string;
|
|
2678
|
+
} & {
|
|
2679
|
+
readonly content: readonly ({
|
|
2680
|
+
readonly type: "text";
|
|
2681
|
+
readonly text: string;
|
|
2682
|
+
readonly citations: readonly ({
|
|
2683
|
+
readonly type: "char_location";
|
|
2684
|
+
readonly cited_text: string;
|
|
2685
|
+
readonly document_index: number;
|
|
2686
|
+
readonly document_title: string | null;
|
|
2687
|
+
readonly start_char_index: number;
|
|
2688
|
+
readonly end_char_index: number;
|
|
2689
|
+
} | {
|
|
2690
|
+
readonly type: "page_location";
|
|
2691
|
+
readonly cited_text: string;
|
|
2692
|
+
readonly document_index: number;
|
|
2693
|
+
readonly document_title: string | null;
|
|
2694
|
+
readonly start_page_number: number;
|
|
2695
|
+
readonly end_page_number: number;
|
|
2696
|
+
} | {
|
|
2697
|
+
readonly type: "content_block_location";
|
|
2698
|
+
readonly cited_text: string;
|
|
2699
|
+
readonly document_index: number;
|
|
2700
|
+
readonly document_title: string | null;
|
|
2701
|
+
readonly start_block_index: number;
|
|
2702
|
+
readonly end_block_index: number;
|
|
2703
|
+
})[] | null;
|
|
2704
|
+
} | {
|
|
2705
|
+
readonly type: "tool_use";
|
|
2706
|
+
readonly id: string;
|
|
2707
|
+
readonly name: string;
|
|
2708
|
+
readonly input: {
|
|
2709
|
+
readonly [x: string]: unknown;
|
|
2710
|
+
};
|
|
2711
|
+
})[];
|
|
2712
|
+
} & {
|
|
2713
|
+
readonly role?: "assistant" | undefined;
|
|
2714
|
+
} & {
|
|
2715
|
+
readonly model: string;
|
|
2716
|
+
} & {
|
|
2717
|
+
readonly stop_sequence?: string | null | undefined;
|
|
2718
|
+
} & {
|
|
2719
|
+
readonly usage: {
|
|
2720
|
+
readonly input_tokens: number;
|
|
2721
|
+
readonly cache_creation_input_tokens: number | null;
|
|
2722
|
+
readonly cache_read_input_tokens: number | null;
|
|
2723
|
+
readonly output_tokens: number;
|
|
2724
|
+
};
|
|
2725
|
+
} & {
|
|
2726
|
+
readonly stop_reason: "tool_use" | "max_tokens" | "end_turn" | "stop_sequence" | null;
|
|
2727
|
+
}, {}, {}>;
|
|
2728
|
+
export declare class BetaMessage extends BetaMessage_base {
|
|
2729
|
+
}
|
|
2730
|
+
declare const BetaErrorResponseType_base: S.Literal<["error"]>;
|
|
2731
|
+
export declare class BetaErrorResponseType extends BetaErrorResponseType_base {
|
|
2732
|
+
}
|
|
2733
|
+
declare const BetaInvalidRequestErrorType_base: S.Literal<["invalid_request_error"]>;
|
|
2734
|
+
export declare class BetaInvalidRequestErrorType extends BetaInvalidRequestErrorType_base {
|
|
2735
|
+
}
|
|
2736
|
+
declare const BetaInvalidRequestError_base: S.Struct<{
|
|
2737
|
+
type: S.PropertySignature<":", "invalid_request_error", never, ":", "invalid_request_error", true, never>;
|
|
2738
|
+
message: S.PropertySignature<":", string, never, ":", string, true, never>;
|
|
2739
|
+
}>;
|
|
2740
|
+
export declare class BetaInvalidRequestError extends BetaInvalidRequestError_base {
|
|
2741
|
+
}
|
|
2742
|
+
declare const BetaAuthenticationErrorType_base: S.Literal<["authentication_error"]>;
|
|
2743
|
+
export declare class BetaAuthenticationErrorType extends BetaAuthenticationErrorType_base {
|
|
2744
|
+
}
|
|
2745
|
+
declare const BetaAuthenticationError_base: S.Struct<{
|
|
2746
|
+
type: S.PropertySignature<":", "authentication_error", never, ":", "authentication_error", true, never>;
|
|
2747
|
+
message: S.PropertySignature<":", string, never, ":", string, true, never>;
|
|
2748
|
+
}>;
|
|
2749
|
+
export declare class BetaAuthenticationError extends BetaAuthenticationError_base {
|
|
2750
|
+
}
|
|
2751
|
+
declare const BetaBillingErrorType_base: S.Literal<["billing_error"]>;
|
|
2752
|
+
export declare class BetaBillingErrorType extends BetaBillingErrorType_base {
|
|
2753
|
+
}
|
|
2754
|
+
declare const BetaBillingError_base: S.Struct<{
|
|
2755
|
+
type: S.PropertySignature<":", "billing_error", never, ":", "billing_error", true, never>;
|
|
2756
|
+
message: S.PropertySignature<":", string, never, ":", string, true, never>;
|
|
2757
|
+
}>;
|
|
2758
|
+
export declare class BetaBillingError extends BetaBillingError_base {
|
|
2759
|
+
}
|
|
2760
|
+
declare const BetaPermissionErrorType_base: S.Literal<["permission_error"]>;
|
|
2761
|
+
export declare class BetaPermissionErrorType extends BetaPermissionErrorType_base {
|
|
2762
|
+
}
|
|
2763
|
+
declare const BetaPermissionError_base: S.Struct<{
|
|
2764
|
+
type: S.PropertySignature<":", "permission_error", never, ":", "permission_error", true, never>;
|
|
2765
|
+
message: S.PropertySignature<":", string, never, ":", string, true, never>;
|
|
2766
|
+
}>;
|
|
2767
|
+
export declare class BetaPermissionError extends BetaPermissionError_base {
|
|
2768
|
+
}
|
|
2769
|
+
declare const BetaNotFoundErrorType_base: S.Literal<["not_found_error"]>;
|
|
2770
|
+
export declare class BetaNotFoundErrorType extends BetaNotFoundErrorType_base {
|
|
2771
|
+
}
|
|
2772
|
+
declare const BetaNotFoundError_base: S.Struct<{
|
|
2773
|
+
type: S.PropertySignature<":", "not_found_error", never, ":", "not_found_error", true, never>;
|
|
2774
|
+
message: S.PropertySignature<":", string, never, ":", string, true, never>;
|
|
2775
|
+
}>;
|
|
2776
|
+
export declare class BetaNotFoundError extends BetaNotFoundError_base {
|
|
2777
|
+
}
|
|
2778
|
+
declare const BetaRateLimitErrorType_base: S.Literal<["rate_limit_error"]>;
|
|
2779
|
+
export declare class BetaRateLimitErrorType extends BetaRateLimitErrorType_base {
|
|
2780
|
+
}
|
|
2781
|
+
declare const BetaRateLimitError_base: S.Struct<{
|
|
2782
|
+
type: S.PropertySignature<":", "rate_limit_error", never, ":", "rate_limit_error", true, never>;
|
|
2783
|
+
message: S.PropertySignature<":", string, never, ":", string, true, never>;
|
|
2784
|
+
}>;
|
|
2785
|
+
export declare class BetaRateLimitError extends BetaRateLimitError_base {
|
|
2786
|
+
}
|
|
2787
|
+
declare const BetaGatewayTimeoutErrorType_base: S.Literal<["timeout_error"]>;
|
|
2788
|
+
export declare class BetaGatewayTimeoutErrorType extends BetaGatewayTimeoutErrorType_base {
|
|
2789
|
+
}
|
|
2790
|
+
declare const BetaGatewayTimeoutError_base: S.Struct<{
|
|
2791
|
+
type: S.PropertySignature<":", "timeout_error", never, ":", "timeout_error", true, never>;
|
|
2792
|
+
message: S.PropertySignature<":", string, never, ":", string, true, never>;
|
|
2793
|
+
}>;
|
|
2794
|
+
export declare class BetaGatewayTimeoutError extends BetaGatewayTimeoutError_base {
|
|
2795
|
+
}
|
|
2796
|
+
declare const BetaAPIErrorType_base: S.Literal<["api_error"]>;
|
|
2797
|
+
export declare class BetaAPIErrorType extends BetaAPIErrorType_base {
|
|
2798
|
+
}
|
|
2799
|
+
declare const BetaAPIError_base: S.Struct<{
|
|
2800
|
+
type: S.PropertySignature<":", "api_error", never, ":", "api_error", true, never>;
|
|
2801
|
+
message: S.PropertySignature<":", string, never, ":", string, true, never>;
|
|
2802
|
+
}>;
|
|
2803
|
+
export declare class BetaAPIError extends BetaAPIError_base {
|
|
2804
|
+
}
|
|
2805
|
+
declare const BetaOverloadedErrorType_base: S.Literal<["overloaded_error"]>;
|
|
2806
|
+
export declare class BetaOverloadedErrorType extends BetaOverloadedErrorType_base {
|
|
2807
|
+
}
|
|
2808
|
+
declare const BetaOverloadedError_base: S.Struct<{
|
|
2809
|
+
type: S.PropertySignature<":", "overloaded_error", never, ":", "overloaded_error", true, never>;
|
|
2810
|
+
message: S.PropertySignature<":", string, never, ":", string, true, never>;
|
|
2811
|
+
}>;
|
|
2812
|
+
export declare class BetaOverloadedError extends BetaOverloadedError_base {
|
|
2813
|
+
}
|
|
2814
|
+
declare const BetaErrorResponse_base: S.Class<BetaErrorResponse, {
|
|
2815
|
+
type: S.PropertySignature<":", "error", never, ":", "error", true, never>;
|
|
2816
|
+
error: S.Union<[typeof BetaInvalidRequestError, typeof BetaAuthenticationError, typeof BetaBillingError, typeof BetaPermissionError, typeof BetaNotFoundError, typeof BetaRateLimitError, typeof BetaGatewayTimeoutError, typeof BetaAPIError, typeof BetaOverloadedError]>;
|
|
2817
|
+
}, S.Struct.Encoded<{
|
|
2818
|
+
type: S.PropertySignature<":", "error", never, ":", "error", true, never>;
|
|
2819
|
+
error: S.Union<[typeof BetaInvalidRequestError, typeof BetaAuthenticationError, typeof BetaBillingError, typeof BetaPermissionError, typeof BetaNotFoundError, typeof BetaRateLimitError, typeof BetaGatewayTimeoutError, typeof BetaAPIError, typeof BetaOverloadedError]>;
|
|
2820
|
+
}>, never, {
|
|
2821
|
+
readonly type?: "error" | undefined;
|
|
2822
|
+
} & {
|
|
2823
|
+
readonly error: {
|
|
2824
|
+
readonly type: "invalid_request_error";
|
|
2825
|
+
readonly message: string;
|
|
2826
|
+
} | {
|
|
2827
|
+
readonly type: "authentication_error";
|
|
2828
|
+
readonly message: string;
|
|
2829
|
+
} | {
|
|
2830
|
+
readonly type: "billing_error";
|
|
2831
|
+
readonly message: string;
|
|
2832
|
+
} | {
|
|
2833
|
+
readonly type: "permission_error";
|
|
2834
|
+
readonly message: string;
|
|
2835
|
+
} | {
|
|
2836
|
+
readonly type: "not_found_error";
|
|
2837
|
+
readonly message: string;
|
|
2838
|
+
} | {
|
|
2839
|
+
readonly type: "rate_limit_error";
|
|
2840
|
+
readonly message: string;
|
|
2841
|
+
} | {
|
|
2842
|
+
readonly type: "timeout_error";
|
|
2843
|
+
readonly message: string;
|
|
2844
|
+
} | {
|
|
2845
|
+
readonly type: "api_error";
|
|
2846
|
+
readonly message: string;
|
|
2847
|
+
} | {
|
|
2848
|
+
readonly type: "overloaded_error";
|
|
2849
|
+
readonly message: string;
|
|
2850
|
+
};
|
|
2851
|
+
}, {}, {}>;
|
|
2852
|
+
export declare class BetaErrorResponse extends BetaErrorResponse_base {
|
|
2853
|
+
}
|
|
2854
|
+
declare const BetaModelsListParams_base: S.Struct<{
|
|
2855
|
+
before_id: S.optionalWith<typeof S.String, {
|
|
2856
|
+
nullable: true;
|
|
2857
|
+
}>;
|
|
2858
|
+
after_id: S.optionalWith<typeof S.String, {
|
|
2859
|
+
nullable: true;
|
|
2860
|
+
}>;
|
|
2861
|
+
limit: S.optionalWith<S.filter<S.Schema<number, number, never>>, {
|
|
2862
|
+
nullable: true;
|
|
2863
|
+
default: () => 20;
|
|
2864
|
+
}>;
|
|
2865
|
+
"anthropic-version": S.optionalWith<typeof S.String, {
|
|
2866
|
+
nullable: true;
|
|
2867
|
+
}>;
|
|
2868
|
+
"x-api-key": S.optionalWith<typeof S.String, {
|
|
2869
|
+
nullable: true;
|
|
2870
|
+
}>;
|
|
2871
|
+
}>;
|
|
2872
|
+
export declare class BetaModelsListParams extends BetaModelsListParams_base {
|
|
2873
|
+
}
|
|
2874
|
+
declare const BetaModelInfoType_base: S.Literal<["model"]>;
|
|
2875
|
+
export declare class BetaModelInfoType extends BetaModelInfoType_base {
|
|
2876
|
+
}
|
|
2877
|
+
declare const BetaModelInfo_base: S.Struct<{
|
|
2878
|
+
type: S.PropertySignature<":", "model", never, ":", "model", true, never>;
|
|
2879
|
+
id: typeof S.String;
|
|
2880
|
+
display_name: typeof S.String;
|
|
2881
|
+
created_at: typeof S.String;
|
|
2882
|
+
}>;
|
|
2883
|
+
export declare class BetaModelInfo extends BetaModelInfo_base {
|
|
2884
|
+
}
|
|
2885
|
+
declare const BetaListResponseModelInfo_base: S.Class<BetaListResponseModelInfo, {
|
|
2886
|
+
data: S.Array$<typeof BetaModelInfo>;
|
|
2887
|
+
has_more: typeof S.Boolean;
|
|
2888
|
+
first_id: S.Union<[typeof S.String, typeof S.Null]>;
|
|
2889
|
+
last_id: S.Union<[typeof S.String, typeof S.Null]>;
|
|
2890
|
+
}, S.Struct.Encoded<{
|
|
2891
|
+
data: S.Array$<typeof BetaModelInfo>;
|
|
2892
|
+
has_more: typeof S.Boolean;
|
|
2893
|
+
first_id: S.Union<[typeof S.String, typeof S.Null]>;
|
|
2894
|
+
last_id: S.Union<[typeof S.String, typeof S.Null]>;
|
|
2895
|
+
}>, never, {
|
|
2896
|
+
readonly data: readonly {
|
|
2897
|
+
readonly type: "model";
|
|
2898
|
+
readonly id: string;
|
|
2899
|
+
readonly display_name: string;
|
|
2900
|
+
readonly created_at: string;
|
|
2901
|
+
}[];
|
|
2902
|
+
} & {
|
|
2903
|
+
readonly has_more: boolean;
|
|
2904
|
+
} & {
|
|
2905
|
+
readonly first_id: string | null;
|
|
2906
|
+
} & {
|
|
2907
|
+
readonly last_id: string | null;
|
|
2908
|
+
}, {}, {}>;
|
|
2909
|
+
export declare class BetaListResponseModelInfo extends BetaListResponseModelInfo_base {
|
|
2910
|
+
}
|
|
2911
|
+
declare const BetaModelsGetParams_base: S.Struct<{
|
|
2912
|
+
"anthropic-version": S.optionalWith<typeof S.String, {
|
|
2913
|
+
nullable: true;
|
|
2914
|
+
}>;
|
|
2915
|
+
"x-api-key": S.optionalWith<typeof S.String, {
|
|
2916
|
+
nullable: true;
|
|
2917
|
+
}>;
|
|
2918
|
+
}>;
|
|
2919
|
+
export declare class BetaModelsGetParams extends BetaModelsGetParams_base {
|
|
2920
|
+
}
|
|
2921
|
+
declare const BetaMessageBatchesListParams_base: S.Struct<{
|
|
2922
|
+
before_id: S.optionalWith<typeof S.String, {
|
|
2923
|
+
nullable: true;
|
|
2924
|
+
}>;
|
|
2925
|
+
after_id: S.optionalWith<typeof S.String, {
|
|
2926
|
+
nullable: true;
|
|
2927
|
+
}>;
|
|
2928
|
+
limit: S.optionalWith<S.filter<S.Schema<number, number, never>>, {
|
|
2929
|
+
nullable: true;
|
|
2930
|
+
default: () => 20;
|
|
2931
|
+
}>;
|
|
2932
|
+
"anthropic-beta": S.optionalWith<typeof S.String, {
|
|
2933
|
+
nullable: true;
|
|
2934
|
+
}>;
|
|
2935
|
+
"anthropic-version": S.optionalWith<typeof S.String, {
|
|
2936
|
+
nullable: true;
|
|
2937
|
+
}>;
|
|
2938
|
+
"x-api-key": S.optionalWith<typeof S.String, {
|
|
2939
|
+
nullable: true;
|
|
2940
|
+
}>;
|
|
2941
|
+
}>;
|
|
2942
|
+
export declare class BetaMessageBatchesListParams extends BetaMessageBatchesListParams_base {
|
|
2943
|
+
}
|
|
2944
|
+
declare const BetaMessageBatchType_base: S.Literal<["message_batch"]>;
|
|
2945
|
+
export declare class BetaMessageBatchType extends BetaMessageBatchType_base {
|
|
2946
|
+
}
|
|
2947
|
+
declare const BetaMessageBatchProcessingStatus_base: S.Literal<["in_progress", "canceling", "ended"]>;
|
|
2948
|
+
export declare class BetaMessageBatchProcessingStatus extends BetaMessageBatchProcessingStatus_base {
|
|
2949
|
+
}
|
|
2950
|
+
declare const BetaRequestCounts_base: S.Struct<{
|
|
2951
|
+
processing: S.PropertySignature<":", number, never, ":", number, true, never>;
|
|
2952
|
+
succeeded: S.PropertySignature<":", number, never, ":", number, true, never>;
|
|
2953
|
+
errored: S.PropertySignature<":", number, never, ":", number, true, never>;
|
|
2954
|
+
canceled: S.PropertySignature<":", number, never, ":", number, true, never>;
|
|
2955
|
+
expired: S.PropertySignature<":", number, never, ":", number, true, never>;
|
|
2956
|
+
}>;
|
|
2957
|
+
export declare class BetaRequestCounts extends BetaRequestCounts_base {
|
|
2958
|
+
}
|
|
2959
|
+
declare const BetaMessageBatch_base: S.Struct<{
|
|
2960
|
+
id: typeof S.String;
|
|
2961
|
+
type: S.PropertySignature<":", "message_batch", never, ":", "message_batch", true, never>;
|
|
2962
|
+
processing_status: typeof BetaMessageBatchProcessingStatus;
|
|
2963
|
+
request_counts: typeof BetaRequestCounts;
|
|
2964
|
+
ended_at: S.Union<[typeof S.String, typeof S.Null]>;
|
|
2965
|
+
created_at: typeof S.String;
|
|
2966
|
+
expires_at: typeof S.String;
|
|
2967
|
+
archived_at: S.Union<[typeof S.String, typeof S.Null]>;
|
|
2968
|
+
cancel_initiated_at: S.Union<[typeof S.String, typeof S.Null]>;
|
|
2969
|
+
results_url: S.Union<[typeof S.String, typeof S.Null]>;
|
|
2970
|
+
}>;
|
|
2971
|
+
export declare class BetaMessageBatch extends BetaMessageBatch_base {
|
|
2972
|
+
}
|
|
2973
|
+
declare const BetaListResponseMessageBatch_base: S.Class<BetaListResponseMessageBatch, {
|
|
2974
|
+
data: S.Array$<typeof BetaMessageBatch>;
|
|
2975
|
+
has_more: typeof S.Boolean;
|
|
2976
|
+
first_id: S.Union<[typeof S.String, typeof S.Null]>;
|
|
2977
|
+
last_id: S.Union<[typeof S.String, typeof S.Null]>;
|
|
2978
|
+
}, S.Struct.Encoded<{
|
|
2979
|
+
data: S.Array$<typeof BetaMessageBatch>;
|
|
2980
|
+
has_more: typeof S.Boolean;
|
|
2981
|
+
first_id: S.Union<[typeof S.String, typeof S.Null]>;
|
|
2982
|
+
last_id: S.Union<[typeof S.String, typeof S.Null]>;
|
|
2983
|
+
}>, never, {
|
|
2984
|
+
readonly data: readonly {
|
|
2985
|
+
readonly type: "message_batch";
|
|
2986
|
+
readonly id: string;
|
|
2987
|
+
readonly created_at: string;
|
|
2988
|
+
readonly processing_status: "in_progress" | "canceling" | "ended";
|
|
2989
|
+
readonly request_counts: {
|
|
2990
|
+
readonly processing: number;
|
|
2991
|
+
readonly succeeded: number;
|
|
2992
|
+
readonly errored: number;
|
|
2993
|
+
readonly canceled: number;
|
|
2994
|
+
readonly expired: number;
|
|
2995
|
+
};
|
|
2996
|
+
readonly ended_at: string | null;
|
|
2997
|
+
readonly expires_at: string;
|
|
2998
|
+
readonly archived_at: string | null;
|
|
2999
|
+
readonly cancel_initiated_at: string | null;
|
|
3000
|
+
readonly results_url: string | null;
|
|
3001
|
+
}[];
|
|
3002
|
+
} & {
|
|
3003
|
+
readonly has_more: boolean;
|
|
3004
|
+
} & {
|
|
3005
|
+
readonly first_id: string | null;
|
|
3006
|
+
} & {
|
|
3007
|
+
readonly last_id: string | null;
|
|
3008
|
+
}, {}, {}>;
|
|
3009
|
+
export declare class BetaListResponseMessageBatch extends BetaListResponseMessageBatch_base {
|
|
3010
|
+
}
|
|
3011
|
+
declare const BetaMessageBatchesPostParams_base: S.Struct<{
|
|
3012
|
+
"anthropic-beta": S.optionalWith<typeof S.String, {
|
|
3013
|
+
nullable: true;
|
|
3014
|
+
}>;
|
|
3015
|
+
"anthropic-version": S.optionalWith<typeof S.String, {
|
|
3016
|
+
nullable: true;
|
|
3017
|
+
}>;
|
|
3018
|
+
}>;
|
|
3019
|
+
export declare class BetaMessageBatchesPostParams extends BetaMessageBatchesPostParams_base {
|
|
3020
|
+
}
|
|
3021
|
+
declare const BetaMessageBatchIndividualRequestParams_base: S.Struct<{
|
|
3022
|
+
custom_id: S.filter<S.Schema<string, string, never>>;
|
|
3023
|
+
params: typeof BetaCreateMessageParams;
|
|
3024
|
+
}>;
|
|
3025
|
+
export declare class BetaMessageBatchIndividualRequestParams extends BetaMessageBatchIndividualRequestParams_base {
|
|
3026
|
+
}
|
|
3027
|
+
declare const BetaCreateMessageBatchParams_base: S.Class<BetaCreateMessageBatchParams, {
|
|
3028
|
+
requests: S.filter<S.Schema<readonly {
|
|
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>>;
|
|
3279
|
+
}, S.Struct.Encoded<{
|
|
3280
|
+
requests: S.filter<S.Schema<readonly {
|
|
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>>;
|
|
3531
|
+
}>, never, {
|
|
3532
|
+
readonly requests: readonly {
|
|
3533
|
+
readonly custom_id: string;
|
|
3534
|
+
readonly params: BetaCreateMessageParams;
|
|
3535
|
+
}[];
|
|
3536
|
+
}, {}, {}>;
|
|
3537
|
+
export declare class BetaCreateMessageBatchParams extends BetaCreateMessageBatchParams_base {
|
|
3538
|
+
}
|
|
3539
|
+
declare const BetaMessageBatchesRetrieveParams_base: S.Struct<{
|
|
3540
|
+
"anthropic-beta": S.optionalWith<typeof S.String, {
|
|
3541
|
+
nullable: true;
|
|
3542
|
+
}>;
|
|
3543
|
+
"anthropic-version": S.optionalWith<typeof S.String, {
|
|
3544
|
+
nullable: true;
|
|
3545
|
+
}>;
|
|
3546
|
+
"x-api-key": S.optionalWith<typeof S.String, {
|
|
3547
|
+
nullable: true;
|
|
3548
|
+
}>;
|
|
3549
|
+
}>;
|
|
3550
|
+
export declare class BetaMessageBatchesRetrieveParams extends BetaMessageBatchesRetrieveParams_base {
|
|
3551
|
+
}
|
|
3552
|
+
declare const BetaMessageBatchesDeleteParams_base: S.Struct<{
|
|
3553
|
+
"anthropic-beta": S.optionalWith<typeof S.String, {
|
|
3554
|
+
nullable: true;
|
|
3555
|
+
}>;
|
|
3556
|
+
"anthropic-version": S.optionalWith<typeof S.String, {
|
|
3557
|
+
nullable: true;
|
|
3558
|
+
}>;
|
|
3559
|
+
"x-api-key": S.optionalWith<typeof S.String, {
|
|
3560
|
+
nullable: true;
|
|
3561
|
+
}>;
|
|
3562
|
+
}>;
|
|
3563
|
+
export declare class BetaMessageBatchesDeleteParams extends BetaMessageBatchesDeleteParams_base {
|
|
3564
|
+
}
|
|
3565
|
+
declare const BetaDeleteMessageBatchResponseType_base: S.Literal<["message_batch_deleted"]>;
|
|
3566
|
+
export declare class BetaDeleteMessageBatchResponseType extends BetaDeleteMessageBatchResponseType_base {
|
|
3567
|
+
}
|
|
3568
|
+
declare const BetaDeleteMessageBatchResponse_base: S.Class<BetaDeleteMessageBatchResponse, {
|
|
3569
|
+
id: typeof S.String;
|
|
3570
|
+
type: S.PropertySignature<":", "message_batch_deleted", never, ":", "message_batch_deleted", true, never>;
|
|
3571
|
+
}, S.Struct.Encoded<{
|
|
3572
|
+
id: typeof S.String;
|
|
3573
|
+
type: S.PropertySignature<":", "message_batch_deleted", never, ":", "message_batch_deleted", true, never>;
|
|
3574
|
+
}>, never, {
|
|
3575
|
+
readonly type?: "message_batch_deleted" | undefined;
|
|
3576
|
+
} & {
|
|
3577
|
+
readonly id: string;
|
|
3578
|
+
}, {}, {}>;
|
|
3579
|
+
export declare class BetaDeleteMessageBatchResponse extends BetaDeleteMessageBatchResponse_base {
|
|
3580
|
+
}
|
|
3581
|
+
declare const BetaMessageBatchesCancelParams_base: S.Struct<{
|
|
3582
|
+
"anthropic-beta": S.optionalWith<typeof S.String, {
|
|
3583
|
+
nullable: true;
|
|
3584
|
+
}>;
|
|
3585
|
+
"anthropic-version": S.optionalWith<typeof S.String, {
|
|
3586
|
+
nullable: true;
|
|
3587
|
+
}>;
|
|
3588
|
+
}>;
|
|
3589
|
+
export declare class BetaMessageBatchesCancelParams extends BetaMessageBatchesCancelParams_base {
|
|
3590
|
+
}
|
|
3591
|
+
declare const BetaMessageBatchesResultsParams_base: S.Struct<{
|
|
3592
|
+
"anthropic-beta": S.optionalWith<typeof S.String, {
|
|
3593
|
+
nullable: true;
|
|
3594
|
+
}>;
|
|
3595
|
+
"anthropic-version": S.optionalWith<typeof S.String, {
|
|
3596
|
+
nullable: true;
|
|
3597
|
+
}>;
|
|
3598
|
+
"x-api-key": S.optionalWith<typeof S.String, {
|
|
3599
|
+
nullable: true;
|
|
3600
|
+
}>;
|
|
3601
|
+
}>;
|
|
3602
|
+
export declare class BetaMessageBatchesResultsParams extends BetaMessageBatchesResultsParams_base {
|
|
3603
|
+
}
|
|
3604
|
+
declare const BetaMessagesCountTokensPostParams_base: S.Struct<{
|
|
3605
|
+
"anthropic-beta": S.optionalWith<typeof S.String, {
|
|
3606
|
+
nullable: true;
|
|
3607
|
+
}>;
|
|
3608
|
+
"anthropic-version": S.optionalWith<typeof S.String, {
|
|
3609
|
+
nullable: true;
|
|
3610
|
+
}>;
|
|
3611
|
+
}>;
|
|
3612
|
+
export declare class BetaMessagesCountTokensPostParams extends BetaMessagesCountTokensPostParams_base {
|
|
3613
|
+
}
|
|
3614
|
+
declare const BetaCountMessageTokensParams_base: S.Class<BetaCountMessageTokensParams, {
|
|
3615
|
+
tool_choice: S.optionalWith<typeof BetaToolChoice, {
|
|
3616
|
+
nullable: true;
|
|
3617
|
+
}>;
|
|
3618
|
+
tools: S.optionalWith<S.Array$<S.Union<[typeof BetaTool, typeof BetaComputerUseTool20241022, typeof BetaBashTool20241022, typeof BetaTextEditor20241022]>>, {
|
|
3619
|
+
nullable: true;
|
|
3620
|
+
}>;
|
|
3621
|
+
messages: S.Array$<typeof BetaInputMessage>;
|
|
3622
|
+
system: S.optionalWith<S.Union<[typeof S.String, S.Array$<typeof BetaRequestTextBlock>]>, {
|
|
3623
|
+
nullable: true;
|
|
3624
|
+
}>;
|
|
3625
|
+
model: typeof Model;
|
|
3626
|
+
}, S.Struct.Encoded<{
|
|
3627
|
+
tool_choice: S.optionalWith<typeof BetaToolChoice, {
|
|
3628
|
+
nullable: true;
|
|
3629
|
+
}>;
|
|
3630
|
+
tools: S.optionalWith<S.Array$<S.Union<[typeof BetaTool, typeof BetaComputerUseTool20241022, typeof BetaBashTool20241022, typeof BetaTextEditor20241022]>>, {
|
|
3631
|
+
nullable: true;
|
|
3632
|
+
}>;
|
|
3633
|
+
messages: S.Array$<typeof BetaInputMessage>;
|
|
3634
|
+
system: S.optionalWith<S.Union<[typeof S.String, S.Array$<typeof BetaRequestTextBlock>]>, {
|
|
3635
|
+
nullable: true;
|
|
3636
|
+
}>;
|
|
3637
|
+
model: typeof Model;
|
|
3638
|
+
}>, never, {
|
|
3639
|
+
readonly model: string;
|
|
3640
|
+
} & {
|
|
3641
|
+
readonly messages: readonly {
|
|
3642
|
+
readonly content: string | readonly ({
|
|
3643
|
+
readonly type: "text";
|
|
3644
|
+
readonly text: string;
|
|
3645
|
+
readonly cache_control?: {
|
|
3646
|
+
readonly type: "ephemeral";
|
|
3647
|
+
} | null | undefined;
|
|
3648
|
+
readonly citations?: readonly ({
|
|
3649
|
+
readonly type: "char_location";
|
|
3650
|
+
readonly cited_text: string;
|
|
3651
|
+
readonly document_index: number;
|
|
3652
|
+
readonly document_title: string | null;
|
|
3653
|
+
readonly start_char_index: number;
|
|
3654
|
+
readonly end_char_index: number;
|
|
3655
|
+
} | {
|
|
3656
|
+
readonly type: "page_location";
|
|
3657
|
+
readonly cited_text: string;
|
|
3658
|
+
readonly document_index: number;
|
|
3659
|
+
readonly document_title: string | null;
|
|
3660
|
+
readonly start_page_number: number;
|
|
3661
|
+
readonly end_page_number: number;
|
|
3662
|
+
} | {
|
|
3663
|
+
readonly type: "content_block_location";
|
|
3664
|
+
readonly cited_text: string;
|
|
3665
|
+
readonly document_index: number;
|
|
3666
|
+
readonly document_title: string | null;
|
|
3667
|
+
readonly start_block_index: number;
|
|
3668
|
+
readonly end_block_index: number;
|
|
3669
|
+
})[] | null | undefined;
|
|
3670
|
+
} | {
|
|
3671
|
+
readonly type: "image";
|
|
3672
|
+
readonly cache_control?: {
|
|
3673
|
+
readonly type: "ephemeral";
|
|
3674
|
+
} | null | undefined;
|
|
3675
|
+
readonly source: {
|
|
3676
|
+
readonly type: "base64";
|
|
3677
|
+
readonly media_type: "image/jpeg" | "image/png" | "image/gif" | "image/webp";
|
|
3678
|
+
readonly data: string;
|
|
3679
|
+
};
|
|
3680
|
+
} | {
|
|
3681
|
+
readonly type: "tool_use";
|
|
3682
|
+
readonly cache_control?: {
|
|
3683
|
+
readonly type: "ephemeral";
|
|
3684
|
+
} | null | undefined;
|
|
3685
|
+
readonly id: string;
|
|
3686
|
+
readonly name: string;
|
|
3687
|
+
readonly input: {
|
|
3688
|
+
readonly [x: string]: unknown;
|
|
3689
|
+
};
|
|
3690
|
+
} | {
|
|
3691
|
+
readonly type: "tool_result";
|
|
3692
|
+
readonly cache_control?: {
|
|
3693
|
+
readonly type: "ephemeral";
|
|
3694
|
+
} | null | undefined;
|
|
3695
|
+
readonly tool_use_id: string;
|
|
3696
|
+
readonly is_error?: boolean | undefined;
|
|
3697
|
+
readonly content?: string | readonly ({
|
|
3698
|
+
readonly type: "text";
|
|
3699
|
+
readonly text: string;
|
|
3700
|
+
readonly cache_control?: {
|
|
3701
|
+
readonly type: "ephemeral";
|
|
3702
|
+
} | null | undefined;
|
|
3703
|
+
readonly citations?: readonly ({
|
|
3704
|
+
readonly type: "char_location";
|
|
3705
|
+
readonly cited_text: string;
|
|
3706
|
+
readonly document_index: number;
|
|
3707
|
+
readonly document_title: string | null;
|
|
3708
|
+
readonly start_char_index: number;
|
|
3709
|
+
readonly end_char_index: number;
|
|
3710
|
+
} | {
|
|
3711
|
+
readonly type: "page_location";
|
|
3712
|
+
readonly cited_text: string;
|
|
3713
|
+
readonly document_index: number;
|
|
3714
|
+
readonly document_title: string | null;
|
|
3715
|
+
readonly start_page_number: number;
|
|
3716
|
+
readonly end_page_number: number;
|
|
3717
|
+
} | {
|
|
3718
|
+
readonly type: "content_block_location";
|
|
3719
|
+
readonly cited_text: string;
|
|
3720
|
+
readonly document_index: number;
|
|
3721
|
+
readonly document_title: string | null;
|
|
3722
|
+
readonly start_block_index: number;
|
|
3723
|
+
readonly end_block_index: number;
|
|
3724
|
+
})[] | null | undefined;
|
|
3725
|
+
} | {
|
|
3726
|
+
readonly type: "image";
|
|
3727
|
+
readonly cache_control?: {
|
|
3728
|
+
readonly type: "ephemeral";
|
|
3729
|
+
} | null | undefined;
|
|
3730
|
+
readonly source: {
|
|
3731
|
+
readonly type: "base64";
|
|
3732
|
+
readonly media_type: "image/jpeg" | "image/png" | "image/gif" | "image/webp";
|
|
3733
|
+
readonly data: string;
|
|
3734
|
+
};
|
|
3735
|
+
})[] | undefined;
|
|
3736
|
+
} | {
|
|
3737
|
+
readonly type: "document";
|
|
3738
|
+
readonly cache_control?: {
|
|
3739
|
+
readonly type: "ephemeral";
|
|
3740
|
+
} | null | undefined;
|
|
3741
|
+
readonly citations?: {
|
|
3742
|
+
readonly enabled?: boolean | undefined;
|
|
3743
|
+
} | undefined;
|
|
3744
|
+
readonly source: {
|
|
3745
|
+
readonly type: "base64";
|
|
3746
|
+
readonly media_type: "application/pdf";
|
|
3747
|
+
readonly data: string;
|
|
3748
|
+
} | {
|
|
3749
|
+
readonly type: "text";
|
|
3750
|
+
readonly media_type: "text/plain";
|
|
3751
|
+
readonly data: string;
|
|
3752
|
+
} | {
|
|
3753
|
+
readonly type: "content";
|
|
3754
|
+
readonly content: string | readonly ({
|
|
3755
|
+
readonly type: "text";
|
|
3756
|
+
readonly text: string;
|
|
3757
|
+
readonly cache_control?: {
|
|
3758
|
+
readonly type: "ephemeral";
|
|
3759
|
+
} | null | undefined;
|
|
3760
|
+
readonly citations?: readonly ({
|
|
3761
|
+
readonly type: "char_location";
|
|
3762
|
+
readonly cited_text: string;
|
|
3763
|
+
readonly document_index: number;
|
|
3764
|
+
readonly document_title: string | null;
|
|
3765
|
+
readonly start_char_index: number;
|
|
3766
|
+
readonly end_char_index: number;
|
|
3767
|
+
} | {
|
|
3768
|
+
readonly type: "page_location";
|
|
3769
|
+
readonly cited_text: string;
|
|
3770
|
+
readonly document_index: number;
|
|
3771
|
+
readonly document_title: string | null;
|
|
3772
|
+
readonly start_page_number: number;
|
|
3773
|
+
readonly end_page_number: number;
|
|
3774
|
+
} | {
|
|
3775
|
+
readonly type: "content_block_location";
|
|
3776
|
+
readonly cited_text: string;
|
|
3777
|
+
readonly document_index: number;
|
|
3778
|
+
readonly document_title: string | null;
|
|
3779
|
+
readonly start_block_index: number;
|
|
3780
|
+
readonly end_block_index: number;
|
|
3781
|
+
})[] | null | undefined;
|
|
3782
|
+
} | {
|
|
3783
|
+
readonly type: "image";
|
|
3784
|
+
readonly cache_control?: {
|
|
3785
|
+
readonly type: "ephemeral";
|
|
3786
|
+
} | null | undefined;
|
|
3787
|
+
readonly source: {
|
|
3788
|
+
readonly type: "base64";
|
|
3789
|
+
readonly media_type: "image/jpeg" | "image/png" | "image/gif" | "image/webp";
|
|
3790
|
+
readonly data: string;
|
|
3791
|
+
};
|
|
3792
|
+
})[];
|
|
3793
|
+
};
|
|
3794
|
+
readonly title?: string | null | undefined;
|
|
3795
|
+
readonly context?: string | null | undefined;
|
|
3796
|
+
})[];
|
|
3797
|
+
readonly role: "user" | "assistant";
|
|
3798
|
+
}[];
|
|
3799
|
+
} & {
|
|
3800
|
+
readonly system?: string | readonly {
|
|
3801
|
+
readonly type: "text";
|
|
3802
|
+
readonly text: string;
|
|
3803
|
+
readonly cache_control?: {
|
|
3804
|
+
readonly type: "ephemeral";
|
|
3805
|
+
} | null | undefined;
|
|
3806
|
+
readonly citations?: readonly ({
|
|
3807
|
+
readonly type: "char_location";
|
|
3808
|
+
readonly cited_text: string;
|
|
3809
|
+
readonly document_index: number;
|
|
3810
|
+
readonly document_title: string | null;
|
|
3811
|
+
readonly start_char_index: number;
|
|
3812
|
+
readonly end_char_index: number;
|
|
3813
|
+
} | {
|
|
3814
|
+
readonly type: "page_location";
|
|
3815
|
+
readonly cited_text: string;
|
|
3816
|
+
readonly document_index: number;
|
|
3817
|
+
readonly document_title: string | null;
|
|
3818
|
+
readonly start_page_number: number;
|
|
3819
|
+
readonly end_page_number: number;
|
|
3820
|
+
} | {
|
|
3821
|
+
readonly type: "content_block_location";
|
|
3822
|
+
readonly cited_text: string;
|
|
3823
|
+
readonly document_index: number;
|
|
3824
|
+
readonly document_title: string | null;
|
|
3825
|
+
readonly start_block_index: number;
|
|
3826
|
+
readonly end_block_index: number;
|
|
3827
|
+
})[] | null | undefined;
|
|
3828
|
+
}[] | undefined;
|
|
3829
|
+
} & {
|
|
3830
|
+
readonly tool_choice?: {
|
|
3831
|
+
readonly type: "auto";
|
|
3832
|
+
readonly disable_parallel_tool_use?: boolean | undefined;
|
|
3833
|
+
} | {
|
|
3834
|
+
readonly type: "any";
|
|
3835
|
+
readonly disable_parallel_tool_use?: boolean | undefined;
|
|
3836
|
+
} | {
|
|
3837
|
+
readonly type: "tool";
|
|
3838
|
+
readonly name: string;
|
|
3839
|
+
readonly disable_parallel_tool_use?: boolean | undefined;
|
|
3840
|
+
} | undefined;
|
|
3841
|
+
} & {
|
|
3842
|
+
readonly tools?: readonly ({
|
|
3843
|
+
readonly type?: "custom" | null | undefined;
|
|
3844
|
+
readonly cache_control?: {
|
|
3845
|
+
readonly type: "ephemeral";
|
|
3846
|
+
} | null | undefined;
|
|
3847
|
+
readonly name: string;
|
|
3848
|
+
readonly description?: string | undefined;
|
|
3849
|
+
readonly input_schema: {
|
|
3850
|
+
readonly type: "object";
|
|
3851
|
+
readonly properties?: {
|
|
3852
|
+
readonly [x: string]: unknown;
|
|
3853
|
+
} | null | undefined;
|
|
3854
|
+
};
|
|
3855
|
+
} | {
|
|
3856
|
+
readonly type: "computer_20241022";
|
|
3857
|
+
readonly cache_control?: {
|
|
3858
|
+
readonly type: "ephemeral";
|
|
3859
|
+
} | null | undefined;
|
|
3860
|
+
readonly name: "computer";
|
|
3861
|
+
readonly display_height_px: number;
|
|
3862
|
+
readonly display_width_px: number;
|
|
3863
|
+
readonly display_number?: number | null | undefined;
|
|
3864
|
+
} | {
|
|
3865
|
+
readonly type: "bash_20241022";
|
|
3866
|
+
readonly cache_control?: {
|
|
3867
|
+
readonly type: "ephemeral";
|
|
3868
|
+
} | null | undefined;
|
|
3869
|
+
readonly name: "bash";
|
|
3870
|
+
} | {
|
|
3871
|
+
readonly type: "text_editor_20241022";
|
|
3872
|
+
readonly cache_control?: {
|
|
3873
|
+
readonly type: "ephemeral";
|
|
3874
|
+
} | null | undefined;
|
|
3875
|
+
readonly name: "str_replace_editor";
|
|
3876
|
+
})[] | undefined;
|
|
3877
|
+
}, {}, {}>;
|
|
3878
|
+
export declare class BetaCountMessageTokensParams extends BetaCountMessageTokensParams_base {
|
|
3879
|
+
}
|
|
3880
|
+
declare const BetaCountMessageTokensResponse_base: S.Class<BetaCountMessageTokensResponse, {
|
|
3881
|
+
input_tokens: typeof S.Int;
|
|
3882
|
+
}, S.Struct.Encoded<{
|
|
3883
|
+
input_tokens: typeof S.Int;
|
|
3884
|
+
}>, never, {
|
|
3885
|
+
readonly input_tokens: number;
|
|
3886
|
+
}, {}, {}>;
|
|
3887
|
+
export declare class BetaCountMessageTokensResponse extends BetaCountMessageTokensResponse_base {
|
|
3888
|
+
}
|
|
3889
|
+
export declare const make: (httpClient: HttpClient.HttpClient, options?: {
|
|
3890
|
+
readonly transformClient?: ((client: HttpClient.HttpClient) => Effect.Effect<HttpClient.HttpClient>) | undefined;
|
|
3891
|
+
}) => Client;
|
|
3892
|
+
export interface Client {
|
|
3893
|
+
readonly "messagesPost": (options: {
|
|
3894
|
+
readonly params: typeof MessagesPostParams.Encoded;
|
|
3895
|
+
readonly payload: typeof CreateMessageParams.Encoded;
|
|
3896
|
+
}) => Effect.Effect<typeof Message.Type, HttpClientError.HttpClientError | ParseError | typeof ErrorResponse.Type>;
|
|
3897
|
+
readonly "completePost": (options: {
|
|
3898
|
+
readonly params: typeof CompletePostParams.Encoded;
|
|
3899
|
+
readonly payload: typeof CompletionRequest.Encoded;
|
|
3900
|
+
}) => Effect.Effect<typeof CompletionResponse.Type, HttpClientError.HttpClientError | ParseError | typeof ErrorResponse.Type>;
|
|
3901
|
+
readonly "modelsList": (options: typeof ModelsListParams.Encoded) => Effect.Effect<typeof ListResponseModelInfo.Type, HttpClientError.HttpClientError | ParseError | typeof ErrorResponse.Type>;
|
|
3902
|
+
readonly "modelsGet": (modelId: string, options: typeof ModelsGetParams.Encoded) => Effect.Effect<typeof ModelInfo.Type, HttpClientError.HttpClientError | ParseError | typeof ErrorResponse.Type>;
|
|
3903
|
+
readonly "messageBatchesList": (options: typeof MessageBatchesListParams.Encoded) => Effect.Effect<typeof ListResponseMessageBatch.Type, HttpClientError.HttpClientError | ParseError | typeof ErrorResponse.Type>;
|
|
3904
|
+
readonly "messageBatchesPost": (options: {
|
|
3905
|
+
readonly params: typeof MessageBatchesPostParams.Encoded;
|
|
3906
|
+
readonly payload: typeof CreateMessageBatchParams.Encoded;
|
|
3907
|
+
}) => Effect.Effect<typeof MessageBatch.Type, HttpClientError.HttpClientError | ParseError | typeof ErrorResponse.Type>;
|
|
3908
|
+
readonly "messageBatchesRetrieve": (messageBatchId: string, options: typeof MessageBatchesRetrieveParams.Encoded) => Effect.Effect<typeof MessageBatch.Type, HttpClientError.HttpClientError | ParseError | typeof ErrorResponse.Type>;
|
|
3909
|
+
readonly "messageBatchesDelete": (messageBatchId: string, options: typeof MessageBatchesDeleteParams.Encoded) => Effect.Effect<typeof DeleteMessageBatchResponse.Type, HttpClientError.HttpClientError | ParseError | typeof ErrorResponse.Type>;
|
|
3910
|
+
readonly "messageBatchesCancel": (messageBatchId: string, options: typeof MessageBatchesCancelParams.Encoded) => Effect.Effect<typeof MessageBatch.Type, HttpClientError.HttpClientError | ParseError | typeof ErrorResponse.Type>;
|
|
3911
|
+
readonly "messageBatchesResults": (messageBatchId: string, options: typeof MessageBatchesResultsParams.Encoded) => Effect.Effect<void, HttpClientError.HttpClientError | ParseError | typeof ErrorResponse.Type>;
|
|
3912
|
+
readonly "messagesCountTokensPost": (options: {
|
|
3913
|
+
readonly params: typeof MessagesCountTokensPostParams.Encoded;
|
|
3914
|
+
readonly payload: typeof CountMessageTokensParams.Encoded;
|
|
3915
|
+
}) => Effect.Effect<typeof CountMessageTokensResponse.Type, HttpClientError.HttpClientError | ParseError | typeof ErrorResponse.Type>;
|
|
3916
|
+
readonly "betaMessagesPost": (options: {
|
|
3917
|
+
readonly params: typeof BetaMessagesPostParams.Encoded;
|
|
3918
|
+
readonly payload: typeof BetaCreateMessageParams.Encoded;
|
|
3919
|
+
}) => Effect.Effect<typeof BetaMessage.Type, HttpClientError.HttpClientError | ParseError | typeof BetaErrorResponse.Type>;
|
|
3920
|
+
readonly "betaModelsList": (options: typeof BetaModelsListParams.Encoded) => Effect.Effect<typeof BetaListResponseModelInfo.Type, HttpClientError.HttpClientError | ParseError | typeof BetaErrorResponse.Type>;
|
|
3921
|
+
readonly "betaModelsGet": (modelId: string, options: typeof BetaModelsGetParams.Encoded) => Effect.Effect<typeof BetaModelInfo.Type, HttpClientError.HttpClientError | ParseError | typeof BetaErrorResponse.Type>;
|
|
3922
|
+
readonly "betaMessageBatchesList": (options: typeof BetaMessageBatchesListParams.Encoded) => Effect.Effect<typeof BetaListResponseMessageBatch.Type, HttpClientError.HttpClientError | ParseError | typeof BetaErrorResponse.Type>;
|
|
3923
|
+
readonly "betaMessageBatchesPost": (options: {
|
|
3924
|
+
readonly params: typeof BetaMessageBatchesPostParams.Encoded;
|
|
3925
|
+
readonly payload: typeof BetaCreateMessageBatchParams.Encoded;
|
|
3926
|
+
}) => Effect.Effect<typeof BetaMessageBatch.Type, HttpClientError.HttpClientError | ParseError | typeof BetaErrorResponse.Type>;
|
|
3927
|
+
readonly "betaMessageBatchesRetrieve": (messageBatchId: string, options: typeof BetaMessageBatchesRetrieveParams.Encoded) => Effect.Effect<typeof BetaMessageBatch.Type, HttpClientError.HttpClientError | ParseError | typeof BetaErrorResponse.Type>;
|
|
3928
|
+
readonly "betaMessageBatchesDelete": (messageBatchId: string, options: typeof BetaMessageBatchesDeleteParams.Encoded) => Effect.Effect<typeof BetaDeleteMessageBatchResponse.Type, HttpClientError.HttpClientError | ParseError | typeof BetaErrorResponse.Type>;
|
|
3929
|
+
readonly "betaMessageBatchesCancel": (messageBatchId: string, options: typeof BetaMessageBatchesCancelParams.Encoded) => Effect.Effect<typeof BetaMessageBatch.Type, HttpClientError.HttpClientError | ParseError | typeof BetaErrorResponse.Type>;
|
|
3930
|
+
readonly "betaMessageBatchesResults": (messageBatchId: string, options: typeof BetaMessageBatchesResultsParams.Encoded) => Effect.Effect<void, HttpClientError.HttpClientError | ParseError | typeof BetaErrorResponse.Type>;
|
|
3931
|
+
readonly "betaMessagesCountTokensPost": (options: {
|
|
3932
|
+
readonly params: typeof BetaMessagesCountTokensPostParams.Encoded;
|
|
3933
|
+
readonly payload: typeof BetaCountMessageTokensParams.Encoded;
|
|
3934
|
+
}) => Effect.Effect<typeof BetaCountMessageTokensResponse.Type, HttpClientError.HttpClientError | ParseError | typeof BetaErrorResponse.Type>;
|
|
3935
|
+
}
|
|
3936
|
+
export {};
|
|
3937
|
+
//# sourceMappingURL=Generated.d.ts.map
|