forked from anthropics/anthropic-sdk-typescript
-
Notifications
You must be signed in to change notification settings - Fork 0
/
beta.ts
203 lines (175 loc) · 5.76 KB
/
beta.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from '../../resource';
import * as ModelsAPI from './models';
import { BetaModelInfo, BetaModelInfosPage, ModelListParams, Models } from './models';
import * as MessagesAPI from './messages/messages';
import {
BetaBase64PDFBlock,
BetaBase64PDFSource,
BetaCacheControlEphemeral,
BetaContentBlock,
BetaContentBlockParam,
BetaImageBlockParam,
BetaInputJSONDelta,
BetaMessage,
BetaMessageDeltaUsage,
BetaMessageParam,
BetaMessageTokensCount,
BetaMetadata,
BetaRawContentBlockDeltaEvent,
BetaRawContentBlockStartEvent,
BetaRawContentBlockStopEvent,
BetaRawMessageDeltaEvent,
BetaRawMessageStartEvent,
BetaRawMessageStopEvent,
BetaRawMessageStreamEvent,
BetaTextBlock,
BetaTextBlockParam,
BetaTextDelta,
BetaTool,
BetaToolBash20241022,
BetaToolChoice,
BetaToolChoiceAny,
BetaToolChoiceAuto,
BetaToolChoiceTool,
BetaToolComputerUse20241022,
BetaToolResultBlockParam,
BetaToolTextEditor20241022,
BetaToolUnion,
BetaToolUseBlock,
BetaToolUseBlockParam,
BetaUsage,
MessageCountTokensParams,
MessageCreateParams,
MessageCreateParamsNonStreaming,
MessageCreateParamsStreaming,
Messages,
} from './messages/messages';
export class Beta extends APIResource {
models: ModelsAPI.Models = new ModelsAPI.Models(this._client);
messages: MessagesAPI.Messages = new MessagesAPI.Messages(this._client);
}
export type AnthropicBeta =
| (string & {})
| 'message-batches-2024-09-24'
| 'prompt-caching-2024-07-31'
| 'computer-use-2024-10-22'
| 'pdfs-2024-09-25'
| 'token-counting-2024-11-01';
export interface BetaAPIError {
message: string;
type: 'api_error';
}
export interface BetaAuthenticationError {
message: string;
type: 'authentication_error';
}
export interface BetaBillingError {
message: string;
type: 'billing_error';
}
export type BetaError =
| BetaInvalidRequestError
| BetaAuthenticationError
| BetaBillingError
| BetaPermissionError
| BetaNotFoundError
| BetaRateLimitError
| BetaGatewayTimeoutError
| BetaAPIError
| BetaOverloadedError;
export interface BetaErrorResponse {
error: BetaError;
type: 'error';
}
export interface BetaGatewayTimeoutError {
message: string;
type: 'timeout_error';
}
export interface BetaInvalidRequestError {
message: string;
type: 'invalid_request_error';
}
export interface BetaNotFoundError {
message: string;
type: 'not_found_error';
}
export interface BetaOverloadedError {
message: string;
type: 'overloaded_error';
}
export interface BetaPermissionError {
message: string;
type: 'permission_error';
}
export interface BetaRateLimitError {
message: string;
type: 'rate_limit_error';
}
Beta.Models = Models;
Beta.BetaModelInfosPage = BetaModelInfosPage;
Beta.Messages = Messages;
export declare namespace Beta {
export {
type AnthropicBeta as AnthropicBeta,
type BetaAPIError as BetaAPIError,
type BetaAuthenticationError as BetaAuthenticationError,
type BetaBillingError as BetaBillingError,
type BetaError as BetaError,
type BetaErrorResponse as BetaErrorResponse,
type BetaGatewayTimeoutError as BetaGatewayTimeoutError,
type BetaInvalidRequestError as BetaInvalidRequestError,
type BetaNotFoundError as BetaNotFoundError,
type BetaOverloadedError as BetaOverloadedError,
type BetaPermissionError as BetaPermissionError,
type BetaRateLimitError as BetaRateLimitError,
};
export {
Models as Models,
type BetaModelInfo as BetaModelInfo,
BetaModelInfosPage as BetaModelInfosPage,
type ModelListParams as ModelListParams,
};
export {
Messages as Messages,
type BetaBase64PDFBlock as BetaBase64PDFBlock,
type BetaBase64PDFSource as BetaBase64PDFSource,
type BetaCacheControlEphemeral as BetaCacheControlEphemeral,
type BetaContentBlock as BetaContentBlock,
type BetaContentBlockParam as BetaContentBlockParam,
type BetaImageBlockParam as BetaImageBlockParam,
type BetaInputJSONDelta as BetaInputJSONDelta,
type BetaMessage as BetaMessage,
type BetaMessageDeltaUsage as BetaMessageDeltaUsage,
type BetaMessageParam as BetaMessageParam,
type BetaMessageTokensCount as BetaMessageTokensCount,
type BetaMetadata as BetaMetadata,
type BetaRawContentBlockDeltaEvent as BetaRawContentBlockDeltaEvent,
type BetaRawContentBlockStartEvent as BetaRawContentBlockStartEvent,
type BetaRawContentBlockStopEvent as BetaRawContentBlockStopEvent,
type BetaRawMessageDeltaEvent as BetaRawMessageDeltaEvent,
type BetaRawMessageStartEvent as BetaRawMessageStartEvent,
type BetaRawMessageStopEvent as BetaRawMessageStopEvent,
type BetaRawMessageStreamEvent as BetaRawMessageStreamEvent,
type BetaTextBlock as BetaTextBlock,
type BetaTextBlockParam as BetaTextBlockParam,
type BetaTextDelta as BetaTextDelta,
type BetaTool as BetaTool,
type BetaToolBash20241022 as BetaToolBash20241022,
type BetaToolChoice as BetaToolChoice,
type BetaToolChoiceAny as BetaToolChoiceAny,
type BetaToolChoiceAuto as BetaToolChoiceAuto,
type BetaToolChoiceTool as BetaToolChoiceTool,
type BetaToolComputerUse20241022 as BetaToolComputerUse20241022,
type BetaToolResultBlockParam as BetaToolResultBlockParam,
type BetaToolTextEditor20241022 as BetaToolTextEditor20241022,
type BetaToolUnion as BetaToolUnion,
type BetaToolUseBlock as BetaToolUseBlock,
type BetaToolUseBlockParam as BetaToolUseBlockParam,
type BetaUsage as BetaUsage,
type MessageCreateParams as MessageCreateParams,
type MessageCreateParamsNonStreaming as MessageCreateParamsNonStreaming,
type MessageCreateParamsStreaming as MessageCreateParamsStreaming,
type MessageCountTokensParams as MessageCountTokensParams,
};
}