@anthropic-ai/sdk 0.30.1 → 0.32.0
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/CHANGELOG.md +55 -0
- package/README.md +3 -3
- package/core.d.ts +3 -3
- package/core.d.ts.map +1 -1
- package/core.js.map +1 -1
- package/core.mjs.map +1 -1
- package/error.d.ts.map +1 -1
- package/index.d.mts +12 -61
- package/index.d.ts +12 -61
- package/index.d.ts.map +1 -1
- package/index.js +22 -9
- package/index.js.map +1 -1
- package/index.mjs +9 -9
- package/index.mjs.map +1 -1
- package/package.json +2 -2
- package/resources/beta/beta.d.ts +6 -49
- package/resources/beta/beta.d.ts.map +1 -1
- package/resources/beta/beta.js +4 -4
- package/resources/beta/beta.js.map +1 -1
- package/resources/beta/beta.mjs +4 -4
- package/resources/beta/beta.mjs.map +1 -1
- package/resources/beta/index.d.ts +2 -2
- package/resources/beta/index.d.ts.map +1 -1
- package/resources/beta/index.js.map +1 -1
- package/resources/beta/index.mjs.map +1 -1
- package/resources/beta/messages/batches.d.ts +1 -15
- package/resources/beta/messages/batches.d.ts.map +1 -1
- package/resources/beta/messages/batches.js +1 -27
- package/resources/beta/messages/batches.js.map +1 -1
- package/resources/beta/messages/batches.mjs +1 -4
- package/resources/beta/messages/batches.mjs.map +1 -1
- package/resources/beta/messages/index.d.ts +2 -2
- package/resources/beta/messages/index.d.ts.map +1 -1
- package/resources/beta/messages/index.js +3 -3
- package/resources/beta/messages/index.js.map +1 -1
- package/resources/beta/messages/index.mjs +1 -1
- package/resources/beta/messages/index.mjs.map +1 -1
- package/resources/beta/messages/messages.d.ts +242 -51
- package/resources/beta/messages/messages.d.ts.map +1 -1
- package/resources/beta/messages/messages.js +20 -4
- package/resources/beta/messages/messages.js.map +1 -1
- package/resources/beta/messages/messages.mjs +20 -4
- package/resources/beta/messages/messages.mjs.map +1 -1
- package/resources/beta/prompt-caching/index.d.ts +1 -1
- package/resources/beta/prompt-caching/index.d.ts.map +1 -1
- package/resources/beta/prompt-caching/index.js +3 -3
- package/resources/beta/prompt-caching/index.js.map +1 -1
- package/resources/beta/prompt-caching/index.mjs +1 -1
- package/resources/beta/prompt-caching/index.mjs.map +1 -1
- package/resources/beta/prompt-caching/messages.d.ts +6 -14
- package/resources/beta/prompt-caching/messages.d.ts.map +1 -1
- package/resources/beta/prompt-caching/messages.js +0 -2
- package/resources/beta/prompt-caching/messages.js.map +1 -1
- package/resources/beta/prompt-caching/messages.mjs +0 -2
- package/resources/beta/prompt-caching/messages.mjs.map +1 -1
- package/resources/beta/prompt-caching/prompt-caching.d.ts +2 -15
- package/resources/beta/prompt-caching/prompt-caching.d.ts.map +1 -1
- package/resources/beta/prompt-caching/prompt-caching.js +2 -3
- package/resources/beta/prompt-caching/prompt-caching.js.map +1 -1
- package/resources/beta/prompt-caching/prompt-caching.mjs +2 -3
- package/resources/beta/prompt-caching/prompt-caching.mjs.map +1 -1
- package/resources/completions.d.ts +1 -4
- package/resources/completions.d.ts.map +1 -1
- package/resources/completions.js +0 -2
- package/resources/completions.js.map +1 -1
- package/resources/completions.mjs +0 -2
- package/resources/completions.mjs.map +1 -1
- package/resources/index.d.ts +3 -3
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/messages.d.ts +7 -40
- package/resources/messages.d.ts.map +1 -1
- package/resources/messages.js +0 -2
- package/resources/messages.js.map +1 -1
- package/resources/messages.mjs +0 -2
- package/resources/messages.mjs.map +1 -1
- package/src/core.ts +5 -5
- package/src/error.ts +1 -1
- package/src/index.ts +137 -66
- package/src/resources/beta/beta.ts +107 -50
- package/src/resources/beta/index.ts +49 -45
- package/src/resources/beta/messages/batches.ts +19 -16
- package/src/resources/beta/messages/index.ts +55 -51
- package/src/resources/beta/messages/messages.ts +347 -52
- package/src/resources/beta/prompt-caching/index.ts +15 -15
- package/src/resources/beta/prompt-caching/messages.ts +22 -15
- package/src/resources/beta/prompt-caching/prompt-caching.ts +37 -16
- package/src/resources/completions.ts +7 -5
- package/src/resources/index.ts +53 -53
- package/src/resources/messages.ts +49 -40
- package/src/streaming.ts +2 -2
- package/src/version.ts +1 -1
- package/streaming.d.ts.map +1 -1
- package/streaming.js +2 -2
- package/streaming.js.map +1 -1
- package/streaming.mjs +2 -2
- package/streaming.mjs.map +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
package/src/index.ts
CHANGED
|
@@ -1,11 +1,73 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
import * as Errors from "./error.js";
|
|
4
|
-
import * as Uploads from "./uploads.js";
|
|
5
3
|
import { type Agent } from "./_shims/index.js";
|
|
6
4
|
import * as Core from "./core.js";
|
|
5
|
+
import * as Errors from "./error.js";
|
|
7
6
|
import * as Pagination from "./pagination.js";
|
|
7
|
+
import { type PageParams, PageResponse } from "./pagination.js";
|
|
8
|
+
import * as Uploads from "./uploads.js";
|
|
8
9
|
import * as API from "./resources/index.js";
|
|
10
|
+
import {
|
|
11
|
+
Completion,
|
|
12
|
+
CompletionCreateParams,
|
|
13
|
+
CompletionCreateParamsNonStreaming,
|
|
14
|
+
CompletionCreateParamsStreaming,
|
|
15
|
+
Completions,
|
|
16
|
+
} from "./resources/completions.js";
|
|
17
|
+
import {
|
|
18
|
+
ContentBlock,
|
|
19
|
+
ContentBlockDeltaEvent,
|
|
20
|
+
ContentBlockStartEvent,
|
|
21
|
+
ContentBlockStopEvent,
|
|
22
|
+
ImageBlockParam,
|
|
23
|
+
InputJSONDelta,
|
|
24
|
+
Message,
|
|
25
|
+
MessageCreateParams,
|
|
26
|
+
MessageCreateParamsNonStreaming,
|
|
27
|
+
MessageCreateParamsStreaming,
|
|
28
|
+
MessageDeltaEvent,
|
|
29
|
+
MessageDeltaUsage,
|
|
30
|
+
MessageParam,
|
|
31
|
+
MessageStartEvent,
|
|
32
|
+
MessageStopEvent,
|
|
33
|
+
MessageStreamEvent,
|
|
34
|
+
MessageStreamParams,
|
|
35
|
+
Messages,
|
|
36
|
+
Metadata,
|
|
37
|
+
Model,
|
|
38
|
+
RawContentBlockDeltaEvent,
|
|
39
|
+
RawContentBlockStartEvent,
|
|
40
|
+
RawContentBlockStopEvent,
|
|
41
|
+
RawMessageDeltaEvent,
|
|
42
|
+
RawMessageStartEvent,
|
|
43
|
+
RawMessageStopEvent,
|
|
44
|
+
RawMessageStreamEvent,
|
|
45
|
+
TextBlock,
|
|
46
|
+
TextBlockParam,
|
|
47
|
+
TextDelta,
|
|
48
|
+
Tool,
|
|
49
|
+
ToolChoice,
|
|
50
|
+
ToolChoiceAny,
|
|
51
|
+
ToolChoiceAuto,
|
|
52
|
+
ToolChoiceTool,
|
|
53
|
+
ToolResultBlockParam,
|
|
54
|
+
ToolUseBlock,
|
|
55
|
+
ToolUseBlockParam,
|
|
56
|
+
Usage,
|
|
57
|
+
} from "./resources/messages.js";
|
|
58
|
+
import {
|
|
59
|
+
AnthropicBeta,
|
|
60
|
+
Beta,
|
|
61
|
+
BetaAPIError,
|
|
62
|
+
BetaAuthenticationError,
|
|
63
|
+
BetaError,
|
|
64
|
+
BetaErrorResponse,
|
|
65
|
+
BetaInvalidRequestError,
|
|
66
|
+
BetaNotFoundError,
|
|
67
|
+
BetaOverloadedError,
|
|
68
|
+
BetaPermissionError,
|
|
69
|
+
BetaRateLimitError,
|
|
70
|
+
} from "./resources/beta/beta.js";
|
|
9
71
|
|
|
10
72
|
export interface ClientOptions {
|
|
11
73
|
/**
|
|
@@ -229,7 +291,7 @@ export class Anthropic extends Core.APIClient {
|
|
|
229
291
|
|
|
230
292
|
export const { HUMAN_PROMPT, AI_PROMPT } = Anthropic;
|
|
231
293
|
|
|
232
|
-
export
|
|
294
|
+
export {
|
|
233
295
|
AnthropicError,
|
|
234
296
|
APIError,
|
|
235
297
|
APIConnectionError,
|
|
@@ -243,75 +305,84 @@ export const {
|
|
|
243
305
|
InternalServerError,
|
|
244
306
|
PermissionDeniedError,
|
|
245
307
|
UnprocessableEntityError,
|
|
246
|
-
}
|
|
308
|
+
} from "./error.js";
|
|
247
309
|
|
|
248
310
|
export import toFile = Uploads.toFile;
|
|
249
311
|
export import fileFromPath = Uploads.fileFromPath;
|
|
250
312
|
|
|
251
|
-
|
|
252
|
-
|
|
313
|
+
Anthropic.Completions = Completions;
|
|
314
|
+
Anthropic.Messages = Messages;
|
|
315
|
+
Anthropic.Beta = Beta;
|
|
316
|
+
|
|
317
|
+
export declare namespace Anthropic {
|
|
318
|
+
export type RequestOptions = Core.RequestOptions;
|
|
253
319
|
|
|
254
320
|
export import Page = Pagination.Page;
|
|
255
|
-
export
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
export
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
export
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
321
|
+
export { type PageParams as PageParams, type PageResponse as PageResponse };
|
|
322
|
+
|
|
323
|
+
export {
|
|
324
|
+
Completions as Completions,
|
|
325
|
+
type Completion as Completion,
|
|
326
|
+
type CompletionCreateParams as CompletionCreateParams,
|
|
327
|
+
type CompletionCreateParamsNonStreaming as CompletionCreateParamsNonStreaming,
|
|
328
|
+
type CompletionCreateParamsStreaming as CompletionCreateParamsStreaming,
|
|
329
|
+
};
|
|
330
|
+
|
|
331
|
+
export {
|
|
332
|
+
Messages as Messages,
|
|
333
|
+
type ContentBlock as ContentBlock,
|
|
334
|
+
type ContentBlockDeltaEvent as ContentBlockDeltaEvent,
|
|
335
|
+
type ContentBlockStartEvent as ContentBlockStartEvent,
|
|
336
|
+
type ContentBlockStopEvent as ContentBlockStopEvent,
|
|
337
|
+
type ImageBlockParam as ImageBlockParam,
|
|
338
|
+
type InputJSONDelta as InputJSONDelta,
|
|
339
|
+
type Message as Message,
|
|
340
|
+
type MessageDeltaEvent as MessageDeltaEvent,
|
|
341
|
+
type MessageDeltaUsage as MessageDeltaUsage,
|
|
342
|
+
type MessageParam as MessageParam,
|
|
343
|
+
type MessageStartEvent as MessageStartEvent,
|
|
344
|
+
type MessageStopEvent as MessageStopEvent,
|
|
345
|
+
type MessageStreamEvent as MessageStreamEvent,
|
|
346
|
+
type Metadata as Metadata,
|
|
347
|
+
type Model as Model,
|
|
348
|
+
type RawContentBlockDeltaEvent as RawContentBlockDeltaEvent,
|
|
349
|
+
type RawContentBlockStartEvent as RawContentBlockStartEvent,
|
|
350
|
+
type RawContentBlockStopEvent as RawContentBlockStopEvent,
|
|
351
|
+
type RawMessageDeltaEvent as RawMessageDeltaEvent,
|
|
352
|
+
type RawMessageStartEvent as RawMessageStartEvent,
|
|
353
|
+
type RawMessageStopEvent as RawMessageStopEvent,
|
|
354
|
+
type RawMessageStreamEvent as RawMessageStreamEvent,
|
|
355
|
+
type TextBlock as TextBlock,
|
|
356
|
+
type TextBlockParam as TextBlockParam,
|
|
357
|
+
type TextDelta as TextDelta,
|
|
358
|
+
type Tool as Tool,
|
|
359
|
+
type ToolChoice as ToolChoice,
|
|
360
|
+
type ToolChoiceAny as ToolChoiceAny,
|
|
361
|
+
type ToolChoiceAuto as ToolChoiceAuto,
|
|
362
|
+
type ToolChoiceTool as ToolChoiceTool,
|
|
363
|
+
type ToolResultBlockParam as ToolResultBlockParam,
|
|
364
|
+
type ToolUseBlock as ToolUseBlock,
|
|
365
|
+
type ToolUseBlockParam as ToolUseBlockParam,
|
|
366
|
+
type Usage as Usage,
|
|
367
|
+
type MessageCreateParams as MessageCreateParams,
|
|
368
|
+
type MessageCreateParamsNonStreaming as MessageCreateParamsNonStreaming,
|
|
369
|
+
type MessageCreateParamsStreaming as MessageCreateParamsStreaming,
|
|
370
|
+
type MessageStreamParams as MessageStreamParams,
|
|
371
|
+
};
|
|
372
|
+
|
|
373
|
+
export {
|
|
374
|
+
Beta as Beta,
|
|
375
|
+
type AnthropicBeta as AnthropicBeta,
|
|
376
|
+
type BetaAPIError as BetaAPIError,
|
|
377
|
+
type BetaAuthenticationError as BetaAuthenticationError,
|
|
378
|
+
type BetaError as BetaError,
|
|
379
|
+
type BetaErrorResponse as BetaErrorResponse,
|
|
380
|
+
type BetaInvalidRequestError as BetaInvalidRequestError,
|
|
381
|
+
type BetaNotFoundError as BetaNotFoundError,
|
|
382
|
+
type BetaOverloadedError as BetaOverloadedError,
|
|
383
|
+
type BetaPermissionError as BetaPermissionError,
|
|
384
|
+
type BetaRateLimitError as BetaRateLimitError,
|
|
385
|
+
};
|
|
315
386
|
}
|
|
316
387
|
|
|
317
388
|
export default Anthropic;
|
|
@@ -1,9 +1,51 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
3
|
import { APIResource } from "../../resource.js";
|
|
4
|
-
import * as BetaAPI from "./beta.js";
|
|
5
4
|
import * as MessagesAPI from "./messages/messages.js";
|
|
5
|
+
import {
|
|
6
|
+
BetaBase64PDFBlock,
|
|
7
|
+
BetaBase64PDFSource,
|
|
8
|
+
BetaCacheControlEphemeral,
|
|
9
|
+
BetaContentBlock,
|
|
10
|
+
BetaContentBlockParam,
|
|
11
|
+
BetaImageBlockParam,
|
|
12
|
+
BetaInputJSONDelta,
|
|
13
|
+
BetaMessage,
|
|
14
|
+
BetaMessageDeltaUsage,
|
|
15
|
+
BetaMessageParam,
|
|
16
|
+
BetaMessageTokensCount,
|
|
17
|
+
BetaMetadata,
|
|
18
|
+
BetaRawContentBlockDeltaEvent,
|
|
19
|
+
BetaRawContentBlockStartEvent,
|
|
20
|
+
BetaRawContentBlockStopEvent,
|
|
21
|
+
BetaRawMessageDeltaEvent,
|
|
22
|
+
BetaRawMessageStartEvent,
|
|
23
|
+
BetaRawMessageStopEvent,
|
|
24
|
+
BetaRawMessageStreamEvent,
|
|
25
|
+
BetaTextBlock,
|
|
26
|
+
BetaTextBlockParam,
|
|
27
|
+
BetaTextDelta,
|
|
28
|
+
BetaTool,
|
|
29
|
+
BetaToolBash20241022,
|
|
30
|
+
BetaToolChoice,
|
|
31
|
+
BetaToolChoiceAny,
|
|
32
|
+
BetaToolChoiceAuto,
|
|
33
|
+
BetaToolChoiceTool,
|
|
34
|
+
BetaToolComputerUse20241022,
|
|
35
|
+
BetaToolResultBlockParam,
|
|
36
|
+
BetaToolTextEditor20241022,
|
|
37
|
+
BetaToolUnion,
|
|
38
|
+
BetaToolUseBlock,
|
|
39
|
+
BetaToolUseBlockParam,
|
|
40
|
+
BetaUsage,
|
|
41
|
+
MessageCountTokensParams,
|
|
42
|
+
MessageCreateParams,
|
|
43
|
+
MessageCreateParamsNonStreaming,
|
|
44
|
+
MessageCreateParamsStreaming,
|
|
45
|
+
Messages,
|
|
46
|
+
} from "./messages/messages.js";
|
|
6
47
|
import * as PromptCachingAPI from "./prompt-caching/prompt-caching.js";
|
|
48
|
+
import { PromptCaching } from "./prompt-caching/prompt-caching.js";
|
|
7
49
|
|
|
8
50
|
export class Beta extends APIResource {
|
|
9
51
|
messages: MessagesAPI.Messages = new MessagesAPI.Messages(this._client);
|
|
@@ -14,7 +56,9 @@ export type AnthropicBeta =
|
|
|
14
56
|
| (string & {})
|
|
15
57
|
| 'message-batches-2024-09-24'
|
|
16
58
|
| 'prompt-caching-2024-07-31'
|
|
17
|
-
| 'computer-use-2024-10-22'
|
|
59
|
+
| 'computer-use-2024-10-22'
|
|
60
|
+
| 'pdfs-2024-09-25'
|
|
61
|
+
| 'token-counting-2024-11-01';
|
|
18
62
|
|
|
19
63
|
export interface BetaAPIError {
|
|
20
64
|
message: string;
|
|
@@ -73,52 +117,65 @@ export interface BetaRateLimitError {
|
|
|
73
117
|
type: 'rate_limit_error';
|
|
74
118
|
}
|
|
75
119
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
export
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
export
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
120
|
+
Beta.Messages = Messages;
|
|
121
|
+
Beta.PromptCaching = PromptCaching;
|
|
122
|
+
|
|
123
|
+
export declare namespace Beta {
|
|
124
|
+
export {
|
|
125
|
+
type AnthropicBeta as AnthropicBeta,
|
|
126
|
+
type BetaAPIError as BetaAPIError,
|
|
127
|
+
type BetaAuthenticationError as BetaAuthenticationError,
|
|
128
|
+
type BetaError as BetaError,
|
|
129
|
+
type BetaErrorResponse as BetaErrorResponse,
|
|
130
|
+
type BetaInvalidRequestError as BetaInvalidRequestError,
|
|
131
|
+
type BetaNotFoundError as BetaNotFoundError,
|
|
132
|
+
type BetaOverloadedError as BetaOverloadedError,
|
|
133
|
+
type BetaPermissionError as BetaPermissionError,
|
|
134
|
+
type BetaRateLimitError as BetaRateLimitError,
|
|
135
|
+
};
|
|
136
|
+
|
|
137
|
+
export {
|
|
138
|
+
Messages as Messages,
|
|
139
|
+
type BetaBase64PDFBlock as BetaBase64PDFBlock,
|
|
140
|
+
type BetaBase64PDFSource as BetaBase64PDFSource,
|
|
141
|
+
type BetaCacheControlEphemeral as BetaCacheControlEphemeral,
|
|
142
|
+
type BetaContentBlock as BetaContentBlock,
|
|
143
|
+
type BetaContentBlockParam as BetaContentBlockParam,
|
|
144
|
+
type BetaImageBlockParam as BetaImageBlockParam,
|
|
145
|
+
type BetaInputJSONDelta as BetaInputJSONDelta,
|
|
146
|
+
type BetaMessage as BetaMessage,
|
|
147
|
+
type BetaMessageDeltaUsage as BetaMessageDeltaUsage,
|
|
148
|
+
type BetaMessageParam as BetaMessageParam,
|
|
149
|
+
type BetaMessageTokensCount as BetaMessageTokensCount,
|
|
150
|
+
type BetaMetadata as BetaMetadata,
|
|
151
|
+
type BetaRawContentBlockDeltaEvent as BetaRawContentBlockDeltaEvent,
|
|
152
|
+
type BetaRawContentBlockStartEvent as BetaRawContentBlockStartEvent,
|
|
153
|
+
type BetaRawContentBlockStopEvent as BetaRawContentBlockStopEvent,
|
|
154
|
+
type BetaRawMessageDeltaEvent as BetaRawMessageDeltaEvent,
|
|
155
|
+
type BetaRawMessageStartEvent as BetaRawMessageStartEvent,
|
|
156
|
+
type BetaRawMessageStopEvent as BetaRawMessageStopEvent,
|
|
157
|
+
type BetaRawMessageStreamEvent as BetaRawMessageStreamEvent,
|
|
158
|
+
type BetaTextBlock as BetaTextBlock,
|
|
159
|
+
type BetaTextBlockParam as BetaTextBlockParam,
|
|
160
|
+
type BetaTextDelta as BetaTextDelta,
|
|
161
|
+
type BetaTool as BetaTool,
|
|
162
|
+
type BetaToolBash20241022 as BetaToolBash20241022,
|
|
163
|
+
type BetaToolChoice as BetaToolChoice,
|
|
164
|
+
type BetaToolChoiceAny as BetaToolChoiceAny,
|
|
165
|
+
type BetaToolChoiceAuto as BetaToolChoiceAuto,
|
|
166
|
+
type BetaToolChoiceTool as BetaToolChoiceTool,
|
|
167
|
+
type BetaToolComputerUse20241022 as BetaToolComputerUse20241022,
|
|
168
|
+
type BetaToolResultBlockParam as BetaToolResultBlockParam,
|
|
169
|
+
type BetaToolTextEditor20241022 as BetaToolTextEditor20241022,
|
|
170
|
+
type BetaToolUnion as BetaToolUnion,
|
|
171
|
+
type BetaToolUseBlock as BetaToolUseBlock,
|
|
172
|
+
type BetaToolUseBlockParam as BetaToolUseBlockParam,
|
|
173
|
+
type BetaUsage as BetaUsage,
|
|
174
|
+
type MessageCreateParams as MessageCreateParams,
|
|
175
|
+
type MessageCreateParamsNonStreaming as MessageCreateParamsNonStreaming,
|
|
176
|
+
type MessageCreateParamsStreaming as MessageCreateParamsStreaming,
|
|
177
|
+
type MessageCountTokensParams as MessageCountTokensParams,
|
|
178
|
+
};
|
|
179
|
+
|
|
180
|
+
export { PromptCaching as PromptCaching };
|
|
124
181
|
}
|
|
@@ -1,54 +1,58 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
3
|
export {
|
|
4
|
-
AnthropicBeta,
|
|
5
|
-
BetaAPIError,
|
|
6
|
-
BetaAuthenticationError,
|
|
7
|
-
BetaError,
|
|
8
|
-
BetaErrorResponse,
|
|
9
|
-
BetaInvalidRequestError,
|
|
10
|
-
BetaNotFoundError,
|
|
11
|
-
BetaOverloadedError,
|
|
12
|
-
BetaPermissionError,
|
|
13
|
-
BetaRateLimitError,
|
|
14
4
|
Beta,
|
|
5
|
+
type AnthropicBeta,
|
|
6
|
+
type BetaAPIError,
|
|
7
|
+
type BetaAuthenticationError,
|
|
8
|
+
type BetaError,
|
|
9
|
+
type BetaErrorResponse,
|
|
10
|
+
type BetaInvalidRequestError,
|
|
11
|
+
type BetaNotFoundError,
|
|
12
|
+
type BetaOverloadedError,
|
|
13
|
+
type BetaPermissionError,
|
|
14
|
+
type BetaRateLimitError,
|
|
15
15
|
} from "./beta.js";
|
|
16
16
|
export {
|
|
17
|
-
BetaCacheControlEphemeral,
|
|
18
|
-
BetaContentBlock,
|
|
19
|
-
BetaContentBlockParam,
|
|
20
|
-
BetaImageBlockParam,
|
|
21
|
-
BetaInputJSONDelta,
|
|
22
|
-
BetaMessage,
|
|
23
|
-
BetaMessageDeltaUsage,
|
|
24
|
-
BetaMessageParam,
|
|
25
|
-
BetaMetadata,
|
|
26
|
-
BetaRawContentBlockDeltaEvent,
|
|
27
|
-
BetaRawContentBlockStartEvent,
|
|
28
|
-
BetaRawContentBlockStopEvent,
|
|
29
|
-
BetaRawMessageDeltaEvent,
|
|
30
|
-
BetaRawMessageStartEvent,
|
|
31
|
-
BetaRawMessageStopEvent,
|
|
32
|
-
BetaRawMessageStreamEvent,
|
|
33
|
-
BetaTextBlock,
|
|
34
|
-
BetaTextBlockParam,
|
|
35
|
-
BetaTextDelta,
|
|
36
|
-
BetaTool,
|
|
37
|
-
BetaToolBash20241022,
|
|
38
|
-
BetaToolChoice,
|
|
39
|
-
BetaToolChoiceAny,
|
|
40
|
-
BetaToolChoiceAuto,
|
|
41
|
-
BetaToolChoiceTool,
|
|
42
|
-
BetaToolComputerUse20241022,
|
|
43
|
-
BetaToolResultBlockParam,
|
|
44
|
-
BetaToolTextEditor20241022,
|
|
45
|
-
BetaToolUnion,
|
|
46
|
-
BetaToolUseBlock,
|
|
47
|
-
BetaToolUseBlockParam,
|
|
48
|
-
BetaUsage,
|
|
49
|
-
MessageCreateParams,
|
|
50
|
-
MessageCreateParamsNonStreaming,
|
|
51
|
-
MessageCreateParamsStreaming,
|
|
52
17
|
Messages,
|
|
18
|
+
type BetaBase64PDFBlock,
|
|
19
|
+
type BetaBase64PDFSource,
|
|
20
|
+
type BetaCacheControlEphemeral,
|
|
21
|
+
type BetaContentBlock,
|
|
22
|
+
type BetaContentBlockParam,
|
|
23
|
+
type BetaImageBlockParam,
|
|
24
|
+
type BetaInputJSONDelta,
|
|
25
|
+
type BetaMessage,
|
|
26
|
+
type BetaMessageDeltaUsage,
|
|
27
|
+
type BetaMessageParam,
|
|
28
|
+
type BetaMessageTokensCount,
|
|
29
|
+
type BetaMetadata,
|
|
30
|
+
type BetaRawContentBlockDeltaEvent,
|
|
31
|
+
type BetaRawContentBlockStartEvent,
|
|
32
|
+
type BetaRawContentBlockStopEvent,
|
|
33
|
+
type BetaRawMessageDeltaEvent,
|
|
34
|
+
type BetaRawMessageStartEvent,
|
|
35
|
+
type BetaRawMessageStopEvent,
|
|
36
|
+
type BetaRawMessageStreamEvent,
|
|
37
|
+
type BetaTextBlock,
|
|
38
|
+
type BetaTextBlockParam,
|
|
39
|
+
type BetaTextDelta,
|
|
40
|
+
type BetaTool,
|
|
41
|
+
type BetaToolBash20241022,
|
|
42
|
+
type BetaToolChoice,
|
|
43
|
+
type BetaToolChoiceAny,
|
|
44
|
+
type BetaToolChoiceAuto,
|
|
45
|
+
type BetaToolChoiceTool,
|
|
46
|
+
type BetaToolComputerUse20241022,
|
|
47
|
+
type BetaToolResultBlockParam,
|
|
48
|
+
type BetaToolTextEditor20241022,
|
|
49
|
+
type BetaToolUnion,
|
|
50
|
+
type BetaToolUseBlock,
|
|
51
|
+
type BetaToolUseBlockParam,
|
|
52
|
+
type BetaUsage,
|
|
53
|
+
type MessageCreateParams,
|
|
54
|
+
type MessageCreateParamsNonStreaming,
|
|
55
|
+
type MessageCreateParamsStreaming,
|
|
56
|
+
type MessageCountTokensParams,
|
|
53
57
|
} from "./messages/index.js";
|
|
54
58
|
export { PromptCaching } from "./prompt-caching/index.js";
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
import { APIResource } from "../../../resource.js";
|
|
4
4
|
import { isRequestOptions } from "../../../core.js";
|
|
5
5
|
import * as Core from "../../../core.js";
|
|
6
|
-
import * as BatchesAPI from "./batches.js";
|
|
7
6
|
import * as BetaAPI from "../beta.js";
|
|
8
7
|
import * as BetaMessagesAPI from "./messages.js";
|
|
9
8
|
import { Page, type PageParams } from "../../../pagination.js";
|
|
@@ -389,19 +388,23 @@ export interface BatchResultsParams {
|
|
|
389
388
|
betas?: Array<BetaAPI.AnthropicBeta>;
|
|
390
389
|
}
|
|
391
390
|
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
export
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
391
|
+
Batches.BetaMessageBatchesPage = BetaMessageBatchesPage;
|
|
392
|
+
|
|
393
|
+
export declare namespace Batches {
|
|
394
|
+
export {
|
|
395
|
+
type BetaMessageBatch as BetaMessageBatch,
|
|
396
|
+
type BetaMessageBatchCanceledResult as BetaMessageBatchCanceledResult,
|
|
397
|
+
type BetaMessageBatchErroredResult as BetaMessageBatchErroredResult,
|
|
398
|
+
type BetaMessageBatchExpiredResult as BetaMessageBatchExpiredResult,
|
|
399
|
+
type BetaMessageBatchIndividualResponse as BetaMessageBatchIndividualResponse,
|
|
400
|
+
type BetaMessageBatchRequestCounts as BetaMessageBatchRequestCounts,
|
|
401
|
+
type BetaMessageBatchResult as BetaMessageBatchResult,
|
|
402
|
+
type BetaMessageBatchSucceededResult as BetaMessageBatchSucceededResult,
|
|
403
|
+
BetaMessageBatchesPage as BetaMessageBatchesPage,
|
|
404
|
+
type BatchCreateParams as BatchCreateParams,
|
|
405
|
+
type BatchRetrieveParams as BatchRetrieveParams,
|
|
406
|
+
type BatchListParams as BatchListParams,
|
|
407
|
+
type BatchCancelParams as BatchCancelParams,
|
|
408
|
+
type BatchResultsParams as BatchResultsParams,
|
|
409
|
+
};
|
|
407
410
|
}
|