@aws-sdk/client-bedrock-runtime 3.704.0 → 3.706.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/README.md +31 -7
- package/dist-cjs/index.js +711 -135
- package/dist-es/BedrockRuntime.js +6 -0
- package/dist-es/commands/ApplyGuardrailCommand.js +2 -1
- package/dist-es/commands/ConverseCommand.js +2 -2
- package/dist-es/commands/GetAsyncInvokeCommand.js +23 -0
- package/dist-es/commands/ListAsyncInvokesCommand.js +23 -0
- package/dist-es/commands/StartAsyncInvokeCommand.js +23 -0
- package/dist-es/commands/index.js +3 -0
- package/dist-es/index.js +1 -0
- package/dist-es/models/models_0.js +264 -76
- package/dist-es/pagination/Interfaces.js +1 -0
- package/dist-es/pagination/ListAsyncInvokesPaginator.js +4 -0
- package/dist-es/pagination/index.js +2 -0
- package/dist-es/protocols/Aws_restJson1.js +283 -7
- package/dist-types/BedrockRuntime.d.ts +22 -0
- package/dist-types/BedrockRuntimeClient.d.ts +5 -2
- package/dist-types/commands/ApplyGuardrailCommand.d.ts +16 -0
- package/dist-types/commands/ConverseCommand.d.ts +72 -0
- package/dist-types/commands/ConverseStreamCommand.d.ts +46 -0
- package/dist-types/commands/GetAsyncInvokeCommand.d.ts +101 -0
- package/dist-types/commands/ListAsyncInvokesCommand.d.ts +112 -0
- package/dist-types/commands/StartAsyncInvokeCommand.d.ts +124 -0
- package/dist-types/commands/index.d.ts +3 -0
- package/dist-types/index.d.ts +1 -0
- package/dist-types/models/models_0.d.ts +828 -119
- package/dist-types/pagination/Interfaces.d.ts +8 -0
- package/dist-types/pagination/ListAsyncInvokesPaginator.d.ts +7 -0
- package/dist-types/pagination/index.d.ts +2 -0
- package/dist-types/protocols/Aws_restJson1.d.ts +27 -0
- package/dist-types/ts3.4/BedrockRuntime.d.ts +52 -0
- package/dist-types/ts3.4/BedrockRuntimeClient.d.ts +20 -2
- package/dist-types/ts3.4/commands/GetAsyncInvokeCommand.d.ts +50 -0
- package/dist-types/ts3.4/commands/ListAsyncInvokesCommand.d.ts +50 -0
- package/dist-types/ts3.4/commands/StartAsyncInvokeCommand.d.ts +50 -0
- package/dist-types/ts3.4/commands/index.d.ts +3 -0
- package/dist-types/ts3.4/index.d.ts +1 -0
- package/dist-types/ts3.4/models/models_0.d.ts +356 -42
- package/dist-types/ts3.4/pagination/Interfaces.d.ts +6 -0
- package/dist-types/ts3.4/pagination/ListAsyncInvokesPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/index.d.ts +2 -0
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +36 -0
- package/package.json +4 -2
|
@@ -14,6 +14,462 @@ export declare class AccessDeniedException extends __BaseException {
|
|
|
14
14
|
*/
|
|
15
15
|
constructor(opts: __ExceptionOptionType<AccessDeniedException, __BaseException>);
|
|
16
16
|
}
|
|
17
|
+
/**
|
|
18
|
+
* @public
|
|
19
|
+
*/
|
|
20
|
+
export interface GetAsyncInvokeRequest {
|
|
21
|
+
/**
|
|
22
|
+
* <p>The invocation's ARN.</p>
|
|
23
|
+
* @public
|
|
24
|
+
*/
|
|
25
|
+
invocationArn: string | undefined;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* <p>Asynchronous invocation output data settings.</p>
|
|
29
|
+
* @public
|
|
30
|
+
*/
|
|
31
|
+
export interface AsyncInvokeS3OutputDataConfig {
|
|
32
|
+
/**
|
|
33
|
+
* <p>An object URI starting with <code>s3://</code>.</p>
|
|
34
|
+
* @public
|
|
35
|
+
*/
|
|
36
|
+
s3Uri: string | undefined;
|
|
37
|
+
/**
|
|
38
|
+
* <p>A KMS encryption key ID.</p>
|
|
39
|
+
* @public
|
|
40
|
+
*/
|
|
41
|
+
kmsKeyId?: string | undefined;
|
|
42
|
+
/**
|
|
43
|
+
* <p>If the bucket belongs to another AWS account, specify that account's ID.</p>
|
|
44
|
+
* @public
|
|
45
|
+
*/
|
|
46
|
+
bucketOwner?: string | undefined;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* <p>Asynchronous invocation output data settings.</p>
|
|
50
|
+
* @public
|
|
51
|
+
*/
|
|
52
|
+
export type AsyncInvokeOutputDataConfig = AsyncInvokeOutputDataConfig.S3OutputDataConfigMember | AsyncInvokeOutputDataConfig.$UnknownMember;
|
|
53
|
+
/**
|
|
54
|
+
* @public
|
|
55
|
+
*/
|
|
56
|
+
export declare namespace AsyncInvokeOutputDataConfig {
|
|
57
|
+
/**
|
|
58
|
+
* <p>A storage location for the output data in an S3 bucket</p>
|
|
59
|
+
* @public
|
|
60
|
+
*/
|
|
61
|
+
interface S3OutputDataConfigMember {
|
|
62
|
+
s3OutputDataConfig: AsyncInvokeS3OutputDataConfig;
|
|
63
|
+
$unknown?: never;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* @public
|
|
67
|
+
*/
|
|
68
|
+
interface $UnknownMember {
|
|
69
|
+
s3OutputDataConfig?: never;
|
|
70
|
+
$unknown: [string, any];
|
|
71
|
+
}
|
|
72
|
+
interface Visitor<T> {
|
|
73
|
+
s3OutputDataConfig: (value: AsyncInvokeS3OutputDataConfig) => T;
|
|
74
|
+
_: (name: string, value: any) => T;
|
|
75
|
+
}
|
|
76
|
+
const visit: <T>(value: AsyncInvokeOutputDataConfig, visitor: Visitor<T>) => T;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* @public
|
|
80
|
+
* @enum
|
|
81
|
+
*/
|
|
82
|
+
export declare const AsyncInvokeStatus: {
|
|
83
|
+
readonly COMPLETED: "Completed";
|
|
84
|
+
readonly FAILED: "Failed";
|
|
85
|
+
readonly IN_PROGRESS: "InProgress";
|
|
86
|
+
};
|
|
87
|
+
/**
|
|
88
|
+
* @public
|
|
89
|
+
*/
|
|
90
|
+
export type AsyncInvokeStatus = (typeof AsyncInvokeStatus)[keyof typeof AsyncInvokeStatus];
|
|
91
|
+
/**
|
|
92
|
+
* @public
|
|
93
|
+
*/
|
|
94
|
+
export interface GetAsyncInvokeResponse {
|
|
95
|
+
/**
|
|
96
|
+
* <p>The invocation's ARN.</p>
|
|
97
|
+
* @public
|
|
98
|
+
*/
|
|
99
|
+
invocationArn: string | undefined;
|
|
100
|
+
/**
|
|
101
|
+
* <p>The invocation's model ARN.</p>
|
|
102
|
+
* @public
|
|
103
|
+
*/
|
|
104
|
+
modelArn: string | undefined;
|
|
105
|
+
/**
|
|
106
|
+
* <p>The invocation's idempotency token.</p>
|
|
107
|
+
* @public
|
|
108
|
+
*/
|
|
109
|
+
clientRequestToken?: string | undefined;
|
|
110
|
+
/**
|
|
111
|
+
* <p>The invocation's status.</p>
|
|
112
|
+
* @public
|
|
113
|
+
*/
|
|
114
|
+
status: AsyncInvokeStatus | undefined;
|
|
115
|
+
/**
|
|
116
|
+
* <p>An error message.</p>
|
|
117
|
+
* @public
|
|
118
|
+
*/
|
|
119
|
+
failureMessage?: string | undefined;
|
|
120
|
+
/**
|
|
121
|
+
* <p>When the invocation request was submitted.</p>
|
|
122
|
+
* @public
|
|
123
|
+
*/
|
|
124
|
+
submitTime: Date | undefined;
|
|
125
|
+
/**
|
|
126
|
+
* <p>The invocation's last modified time.</p>
|
|
127
|
+
* @public
|
|
128
|
+
*/
|
|
129
|
+
lastModifiedTime?: Date | undefined;
|
|
130
|
+
/**
|
|
131
|
+
* <p>When the invocation ended.</p>
|
|
132
|
+
* @public
|
|
133
|
+
*/
|
|
134
|
+
endTime?: Date | undefined;
|
|
135
|
+
/**
|
|
136
|
+
* <p>Output data settings.</p>
|
|
137
|
+
* @public
|
|
138
|
+
*/
|
|
139
|
+
outputDataConfig: AsyncInvokeOutputDataConfig | undefined;
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* <p>An internal server error occurred. For troubleshooting this error,
|
|
143
|
+
* see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-internal-failure">InternalFailure</a> in the Amazon Bedrock User Guide</p>
|
|
144
|
+
* @public
|
|
145
|
+
*/
|
|
146
|
+
export declare class InternalServerException extends __BaseException {
|
|
147
|
+
readonly name: "InternalServerException";
|
|
148
|
+
readonly $fault: "server";
|
|
149
|
+
/**
|
|
150
|
+
* @internal
|
|
151
|
+
*/
|
|
152
|
+
constructor(opts: __ExceptionOptionType<InternalServerException, __BaseException>);
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* <p>Your request was denied due to exceeding the account quotas for <i>Amazon Bedrock</i>. For
|
|
156
|
+
* troubleshooting this error, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-throttling-exception">ThrottlingException</a> in the Amazon Bedrock User Guide</p>
|
|
157
|
+
* @public
|
|
158
|
+
*/
|
|
159
|
+
export declare class ThrottlingException extends __BaseException {
|
|
160
|
+
readonly name: "ThrottlingException";
|
|
161
|
+
readonly $fault: "client";
|
|
162
|
+
/**
|
|
163
|
+
* @internal
|
|
164
|
+
*/
|
|
165
|
+
constructor(opts: __ExceptionOptionType<ThrottlingException, __BaseException>);
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* <p>The input fails to satisfy the constraints specified by <i>Amazon Bedrock</i>. For troubleshooting this error,
|
|
169
|
+
* see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-validation-error">ValidationError</a> in the Amazon Bedrock User Guide</p>
|
|
170
|
+
* @public
|
|
171
|
+
*/
|
|
172
|
+
export declare class ValidationException extends __BaseException {
|
|
173
|
+
readonly name: "ValidationException";
|
|
174
|
+
readonly $fault: "client";
|
|
175
|
+
/**
|
|
176
|
+
* @internal
|
|
177
|
+
*/
|
|
178
|
+
constructor(opts: __ExceptionOptionType<ValidationException, __BaseException>);
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* @public
|
|
182
|
+
* @enum
|
|
183
|
+
*/
|
|
184
|
+
export declare const SortAsyncInvocationBy: {
|
|
185
|
+
readonly SUBMISSION_TIME: "SubmissionTime";
|
|
186
|
+
};
|
|
187
|
+
/**
|
|
188
|
+
* @public
|
|
189
|
+
*/
|
|
190
|
+
export type SortAsyncInvocationBy = (typeof SortAsyncInvocationBy)[keyof typeof SortAsyncInvocationBy];
|
|
191
|
+
/**
|
|
192
|
+
* @public
|
|
193
|
+
* @enum
|
|
194
|
+
*/
|
|
195
|
+
export declare const SortOrder: {
|
|
196
|
+
readonly ASCENDING: "Ascending";
|
|
197
|
+
readonly DESCENDING: "Descending";
|
|
198
|
+
};
|
|
199
|
+
/**
|
|
200
|
+
* @public
|
|
201
|
+
*/
|
|
202
|
+
export type SortOrder = (typeof SortOrder)[keyof typeof SortOrder];
|
|
203
|
+
/**
|
|
204
|
+
* @public
|
|
205
|
+
*/
|
|
206
|
+
export interface ListAsyncInvokesRequest {
|
|
207
|
+
/**
|
|
208
|
+
* <p>Include invocations submitted after this time.</p>
|
|
209
|
+
* @public
|
|
210
|
+
*/
|
|
211
|
+
submitTimeAfter?: Date | undefined;
|
|
212
|
+
/**
|
|
213
|
+
* <p>Include invocations submitted before this time.</p>
|
|
214
|
+
* @public
|
|
215
|
+
*/
|
|
216
|
+
submitTimeBefore?: Date | undefined;
|
|
217
|
+
/**
|
|
218
|
+
* <p>Filter invocations by status.</p>
|
|
219
|
+
* @public
|
|
220
|
+
*/
|
|
221
|
+
statusEquals?: AsyncInvokeStatus | undefined;
|
|
222
|
+
/**
|
|
223
|
+
* <p>The maximum number of invocations to return in one page of results.</p>
|
|
224
|
+
* @public
|
|
225
|
+
*/
|
|
226
|
+
maxResults?: number | undefined;
|
|
227
|
+
/**
|
|
228
|
+
* <p>Specify the pagination token from a previous request to retrieve the next page of results.</p>
|
|
229
|
+
* @public
|
|
230
|
+
*/
|
|
231
|
+
nextToken?: string | undefined;
|
|
232
|
+
/**
|
|
233
|
+
* <p>How to sort the response.</p>
|
|
234
|
+
* @public
|
|
235
|
+
*/
|
|
236
|
+
sortBy?: SortAsyncInvocationBy | undefined;
|
|
237
|
+
/**
|
|
238
|
+
* <p>The sorting order for the response.</p>
|
|
239
|
+
* @public
|
|
240
|
+
*/
|
|
241
|
+
sortOrder?: SortOrder | undefined;
|
|
242
|
+
}
|
|
243
|
+
/**
|
|
244
|
+
* <p>A summary of an asynchronous invocation.</p>
|
|
245
|
+
* @public
|
|
246
|
+
*/
|
|
247
|
+
export interface AsyncInvokeSummary {
|
|
248
|
+
/**
|
|
249
|
+
* <p>The invocation's ARN.</p>
|
|
250
|
+
* @public
|
|
251
|
+
*/
|
|
252
|
+
invocationArn: string | undefined;
|
|
253
|
+
/**
|
|
254
|
+
* <p>The invoked model's ARN.</p>
|
|
255
|
+
* @public
|
|
256
|
+
*/
|
|
257
|
+
modelArn: string | undefined;
|
|
258
|
+
/**
|
|
259
|
+
* <p>The invocation's idempotency token.</p>
|
|
260
|
+
* @public
|
|
261
|
+
*/
|
|
262
|
+
clientRequestToken?: string | undefined;
|
|
263
|
+
/**
|
|
264
|
+
* <p>The invocation's status.</p>
|
|
265
|
+
* @public
|
|
266
|
+
*/
|
|
267
|
+
status?: AsyncInvokeStatus | undefined;
|
|
268
|
+
/**
|
|
269
|
+
* <p>An error message.</p>
|
|
270
|
+
* @public
|
|
271
|
+
*/
|
|
272
|
+
failureMessage?: string | undefined;
|
|
273
|
+
/**
|
|
274
|
+
* <p>When the invocation was submitted.</p>
|
|
275
|
+
* @public
|
|
276
|
+
*/
|
|
277
|
+
submitTime: Date | undefined;
|
|
278
|
+
/**
|
|
279
|
+
* <p>When the invocation was last modified.</p>
|
|
280
|
+
* @public
|
|
281
|
+
*/
|
|
282
|
+
lastModifiedTime?: Date | undefined;
|
|
283
|
+
/**
|
|
284
|
+
* <p>When the invocation ended.</p>
|
|
285
|
+
* @public
|
|
286
|
+
*/
|
|
287
|
+
endTime?: Date | undefined;
|
|
288
|
+
/**
|
|
289
|
+
* <p>The invocation's output data settings.</p>
|
|
290
|
+
* @public
|
|
291
|
+
*/
|
|
292
|
+
outputDataConfig: AsyncInvokeOutputDataConfig | undefined;
|
|
293
|
+
}
|
|
294
|
+
/**
|
|
295
|
+
* @public
|
|
296
|
+
*/
|
|
297
|
+
export interface ListAsyncInvokesResponse {
|
|
298
|
+
/**
|
|
299
|
+
* <p>Specify the pagination token from a previous request to retrieve the next page of results.</p>
|
|
300
|
+
* @public
|
|
301
|
+
*/
|
|
302
|
+
nextToken?: string | undefined;
|
|
303
|
+
/**
|
|
304
|
+
* <p>A list of invocation summaries.</p>
|
|
305
|
+
* @public
|
|
306
|
+
*/
|
|
307
|
+
asyncInvokeSummaries?: AsyncInvokeSummary[] | undefined;
|
|
308
|
+
}
|
|
309
|
+
/**
|
|
310
|
+
* <p>Error occurred because of a conflict while performing an operation.</p>
|
|
311
|
+
* @public
|
|
312
|
+
*/
|
|
313
|
+
export declare class ConflictException extends __BaseException {
|
|
314
|
+
readonly name: "ConflictException";
|
|
315
|
+
readonly $fault: "client";
|
|
316
|
+
/**
|
|
317
|
+
* @internal
|
|
318
|
+
*/
|
|
319
|
+
constructor(opts: __ExceptionOptionType<ConflictException, __BaseException>);
|
|
320
|
+
}
|
|
321
|
+
/**
|
|
322
|
+
* <p>The specified resource ARN was not found. For troubleshooting this error,
|
|
323
|
+
* see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-resource-not-found">ResourceNotFound</a> in the Amazon Bedrock User Guide</p>
|
|
324
|
+
* @public
|
|
325
|
+
*/
|
|
326
|
+
export declare class ResourceNotFoundException extends __BaseException {
|
|
327
|
+
readonly name: "ResourceNotFoundException";
|
|
328
|
+
readonly $fault: "client";
|
|
329
|
+
/**
|
|
330
|
+
* @internal
|
|
331
|
+
*/
|
|
332
|
+
constructor(opts: __ExceptionOptionType<ResourceNotFoundException, __BaseException>);
|
|
333
|
+
}
|
|
334
|
+
/**
|
|
335
|
+
* <p>Your request exceeds the service quota for your account. You can view your quotas at <a href="https://docs.aws.amazon.com/servicequotas/latest/userguide/gs-request-quota.html">Viewing service quotas</a>. You can resubmit your request later.</p>
|
|
336
|
+
* @public
|
|
337
|
+
*/
|
|
338
|
+
export declare class ServiceQuotaExceededException extends __BaseException {
|
|
339
|
+
readonly name: "ServiceQuotaExceededException";
|
|
340
|
+
readonly $fault: "client";
|
|
341
|
+
/**
|
|
342
|
+
* @internal
|
|
343
|
+
*/
|
|
344
|
+
constructor(opts: __ExceptionOptionType<ServiceQuotaExceededException, __BaseException>);
|
|
345
|
+
}
|
|
346
|
+
/**
|
|
347
|
+
* <p>The service isn't currently available. For troubleshooting this error,
|
|
348
|
+
* see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-service-unavailable">ServiceUnavailable</a> in the Amazon Bedrock User Guide</p>
|
|
349
|
+
* @public
|
|
350
|
+
*/
|
|
351
|
+
export declare class ServiceUnavailableException extends __BaseException {
|
|
352
|
+
readonly name: "ServiceUnavailableException";
|
|
353
|
+
readonly $fault: "server";
|
|
354
|
+
/**
|
|
355
|
+
* @internal
|
|
356
|
+
*/
|
|
357
|
+
constructor(opts: __ExceptionOptionType<ServiceUnavailableException, __BaseException>);
|
|
358
|
+
}
|
|
359
|
+
/**
|
|
360
|
+
* <p>A tag.</p>
|
|
361
|
+
* @public
|
|
362
|
+
*/
|
|
363
|
+
export interface Tag {
|
|
364
|
+
/**
|
|
365
|
+
* <p>The tag's key.</p>
|
|
366
|
+
* @public
|
|
367
|
+
*/
|
|
368
|
+
key: string | undefined;
|
|
369
|
+
/**
|
|
370
|
+
* <p>The tag's value.</p>
|
|
371
|
+
* @public
|
|
372
|
+
*/
|
|
373
|
+
value: string | undefined;
|
|
374
|
+
}
|
|
375
|
+
/**
|
|
376
|
+
* @public
|
|
377
|
+
*/
|
|
378
|
+
export interface StartAsyncInvokeRequest {
|
|
379
|
+
/**
|
|
380
|
+
* <p>Specify idempotency token to ensure that requests are not duplicated.</p>
|
|
381
|
+
* @public
|
|
382
|
+
*/
|
|
383
|
+
clientRequestToken?: string | undefined;
|
|
384
|
+
/**
|
|
385
|
+
* <p>The model to invoke.</p>
|
|
386
|
+
* @public
|
|
387
|
+
*/
|
|
388
|
+
modelId: string | undefined;
|
|
389
|
+
/**
|
|
390
|
+
* <p>Input to send to the model.</p>
|
|
391
|
+
* @public
|
|
392
|
+
*/
|
|
393
|
+
modelInput: __DocumentType | undefined;
|
|
394
|
+
/**
|
|
395
|
+
* <p>Where to store the output.</p>
|
|
396
|
+
* @public
|
|
397
|
+
*/
|
|
398
|
+
outputDataConfig: AsyncInvokeOutputDataConfig | undefined;
|
|
399
|
+
/**
|
|
400
|
+
* <p>Tags to apply to the invocation.</p>
|
|
401
|
+
* @public
|
|
402
|
+
*/
|
|
403
|
+
tags?: Tag[] | undefined;
|
|
404
|
+
}
|
|
405
|
+
/**
|
|
406
|
+
* @public
|
|
407
|
+
*/
|
|
408
|
+
export interface StartAsyncInvokeResponse {
|
|
409
|
+
/**
|
|
410
|
+
* <p>The ARN of the invocation.</p>
|
|
411
|
+
* @public
|
|
412
|
+
*/
|
|
413
|
+
invocationArn: string | undefined;
|
|
414
|
+
}
|
|
415
|
+
/**
|
|
416
|
+
* @public
|
|
417
|
+
* @enum
|
|
418
|
+
*/
|
|
419
|
+
export declare const GuardrailImageFormat: {
|
|
420
|
+
readonly JPEG: "jpeg";
|
|
421
|
+
readonly PNG: "png";
|
|
422
|
+
};
|
|
423
|
+
/**
|
|
424
|
+
* @public
|
|
425
|
+
*/
|
|
426
|
+
export type GuardrailImageFormat = (typeof GuardrailImageFormat)[keyof typeof GuardrailImageFormat];
|
|
427
|
+
/**
|
|
428
|
+
* <p>The image source (image bytes) of the guardrail image source. Object used in independent api.</p>
|
|
429
|
+
* @public
|
|
430
|
+
*/
|
|
431
|
+
export type GuardrailImageSource = GuardrailImageSource.BytesMember | GuardrailImageSource.$UnknownMember;
|
|
432
|
+
/**
|
|
433
|
+
* @public
|
|
434
|
+
*/
|
|
435
|
+
export declare namespace GuardrailImageSource {
|
|
436
|
+
/**
|
|
437
|
+
* <p>The bytes details of the guardrail image source. Object used in independent api.</p>
|
|
438
|
+
* @public
|
|
439
|
+
*/
|
|
440
|
+
interface BytesMember {
|
|
441
|
+
bytes: Uint8Array;
|
|
442
|
+
$unknown?: never;
|
|
443
|
+
}
|
|
444
|
+
/**
|
|
445
|
+
* @public
|
|
446
|
+
*/
|
|
447
|
+
interface $UnknownMember {
|
|
448
|
+
bytes?: never;
|
|
449
|
+
$unknown: [string, any];
|
|
450
|
+
}
|
|
451
|
+
interface Visitor<T> {
|
|
452
|
+
bytes: (value: Uint8Array) => T;
|
|
453
|
+
_: (name: string, value: any) => T;
|
|
454
|
+
}
|
|
455
|
+
const visit: <T>(value: GuardrailImageSource, visitor: Visitor<T>) => T;
|
|
456
|
+
}
|
|
457
|
+
/**
|
|
458
|
+
* <p>Contain an image which user wants guarded. This block is accepted by the guardrails independent API.</p>
|
|
459
|
+
* @public
|
|
460
|
+
*/
|
|
461
|
+
export interface GuardrailImageBlock {
|
|
462
|
+
/**
|
|
463
|
+
* <p>The format details for the file type of the image blocked by the guardrail.</p>
|
|
464
|
+
* @public
|
|
465
|
+
*/
|
|
466
|
+
format: GuardrailImageFormat | undefined;
|
|
467
|
+
/**
|
|
468
|
+
* <p>The image source (image bytes) details of the image blocked by the guardrail.</p>
|
|
469
|
+
* @public
|
|
470
|
+
*/
|
|
471
|
+
source: GuardrailImageSource | undefined;
|
|
472
|
+
}
|
|
17
473
|
/**
|
|
18
474
|
* @public
|
|
19
475
|
* @enum
|
|
@@ -47,7 +503,7 @@ export interface GuardrailTextBlock {
|
|
|
47
503
|
* <p>The content block to be evaluated by the guardrail.</p>
|
|
48
504
|
* @public
|
|
49
505
|
*/
|
|
50
|
-
export type GuardrailContentBlock = GuardrailContentBlock.TextMember | GuardrailContentBlock.$UnknownMember;
|
|
506
|
+
export type GuardrailContentBlock = GuardrailContentBlock.ImageMember | GuardrailContentBlock.TextMember | GuardrailContentBlock.$UnknownMember;
|
|
51
507
|
/**
|
|
52
508
|
* @public
|
|
53
509
|
*/
|
|
@@ -58,6 +514,16 @@ export declare namespace GuardrailContentBlock {
|
|
|
58
514
|
*/
|
|
59
515
|
interface TextMember {
|
|
60
516
|
text: GuardrailTextBlock;
|
|
517
|
+
image?: never;
|
|
518
|
+
$unknown?: never;
|
|
519
|
+
}
|
|
520
|
+
/**
|
|
521
|
+
* <p>Image within guardrail content block to be evaluated by the guardrail.</p>
|
|
522
|
+
* @public
|
|
523
|
+
*/
|
|
524
|
+
interface ImageMember {
|
|
525
|
+
text?: never;
|
|
526
|
+
image: GuardrailImageBlock;
|
|
61
527
|
$unknown?: never;
|
|
62
528
|
}
|
|
63
529
|
/**
|
|
@@ -65,10 +531,12 @@ export declare namespace GuardrailContentBlock {
|
|
|
65
531
|
*/
|
|
66
532
|
interface $UnknownMember {
|
|
67
533
|
text?: never;
|
|
534
|
+
image?: never;
|
|
68
535
|
$unknown: [string, any];
|
|
69
536
|
}
|
|
70
537
|
interface Visitor<T> {
|
|
71
538
|
text: (value: GuardrailTextBlock) => T;
|
|
539
|
+
image: (value: GuardrailImageBlock) => T;
|
|
72
540
|
_: (name: string, value: any) => T;
|
|
73
541
|
}
|
|
74
542
|
const visit: <T>(value: GuardrailContentBlock, visitor: Visitor<T>) => T;
|
|
@@ -275,6 +743,22 @@ export interface GuardrailContextualGroundingPolicyAssessment {
|
|
|
275
743
|
*/
|
|
276
744
|
filters?: GuardrailContextualGroundingFilter[] | undefined;
|
|
277
745
|
}
|
|
746
|
+
/**
|
|
747
|
+
* <p>The details of the guardrail image coverage.</p>
|
|
748
|
+
* @public
|
|
749
|
+
*/
|
|
750
|
+
export interface GuardrailImageCoverage {
|
|
751
|
+
/**
|
|
752
|
+
* <p>The count (integer) of images guardrails guarded.</p>
|
|
753
|
+
* @public
|
|
754
|
+
*/
|
|
755
|
+
guarded?: number | undefined;
|
|
756
|
+
/**
|
|
757
|
+
* <p>Represents the total number of images (integer) that were in the request (guarded and unguarded).</p>
|
|
758
|
+
* @public
|
|
759
|
+
*/
|
|
760
|
+
total?: number | undefined;
|
|
761
|
+
}
|
|
278
762
|
/**
|
|
279
763
|
* <p>The guardrail coverage for the text characters.</p>
|
|
280
764
|
* @public
|
|
@@ -301,6 +785,11 @@ export interface GuardrailCoverage {
|
|
|
301
785
|
* @public
|
|
302
786
|
*/
|
|
303
787
|
textCharacters?: GuardrailTextCharactersCoverage | undefined;
|
|
788
|
+
/**
|
|
789
|
+
* <p>The guardrail coverage for images (the number of images that guardrails guarded).</p>
|
|
790
|
+
* @public
|
|
791
|
+
*/
|
|
792
|
+
images?: GuardrailImageCoverage | undefined;
|
|
304
793
|
}
|
|
305
794
|
/**
|
|
306
795
|
* <p>The details on the use of the guardrail.</p>
|
|
@@ -646,104 +1135,40 @@ export interface GuardrailAssessment {
|
|
|
646
1135
|
*/
|
|
647
1136
|
export interface GuardrailOutputContent {
|
|
648
1137
|
/**
|
|
649
|
-
* <p>The specific text for the output content produced by the guardrail.</p>
|
|
650
|
-
* @public
|
|
651
|
-
*/
|
|
652
|
-
text?: string | undefined;
|
|
653
|
-
}
|
|
654
|
-
/**
|
|
655
|
-
* @public
|
|
656
|
-
*/
|
|
657
|
-
export interface ApplyGuardrailResponse {
|
|
658
|
-
/**
|
|
659
|
-
* <p>The usage details in the response from the guardrail.</p>
|
|
660
|
-
* @public
|
|
661
|
-
*/
|
|
662
|
-
usage: GuardrailUsage | undefined;
|
|
663
|
-
/**
|
|
664
|
-
* <p>The action taken in the response from the guardrail.</p>
|
|
665
|
-
* @public
|
|
666
|
-
*/
|
|
667
|
-
action: GuardrailAction | undefined;
|
|
668
|
-
/**
|
|
669
|
-
* <p>The output details in the response from the guardrail.</p>
|
|
670
|
-
* @public
|
|
671
|
-
*/
|
|
672
|
-
outputs: GuardrailOutputContent[] | undefined;
|
|
673
|
-
/**
|
|
674
|
-
* <p>The assessment details in the response from the guardrail.</p>
|
|
675
|
-
* @public
|
|
676
|
-
*/
|
|
677
|
-
assessments: GuardrailAssessment[] | undefined;
|
|
678
|
-
/**
|
|
679
|
-
* <p>The guardrail coverage details in the apply guardrail response.</p>
|
|
680
|
-
* @public
|
|
681
|
-
*/
|
|
682
|
-
guardrailCoverage?: GuardrailCoverage | undefined;
|
|
683
|
-
}
|
|
684
|
-
/**
|
|
685
|
-
* <p>An internal server error occurred. For troubleshooting this error,
|
|
686
|
-
* see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-internal-failure">InternalFailure</a> in the Amazon Bedrock User Guide</p>
|
|
687
|
-
* @public
|
|
688
|
-
*/
|
|
689
|
-
export declare class InternalServerException extends __BaseException {
|
|
690
|
-
readonly name: "InternalServerException";
|
|
691
|
-
readonly $fault: "server";
|
|
692
|
-
/**
|
|
693
|
-
* @internal
|
|
694
|
-
*/
|
|
695
|
-
constructor(opts: __ExceptionOptionType<InternalServerException, __BaseException>);
|
|
696
|
-
}
|
|
697
|
-
/**
|
|
698
|
-
* <p>The specified resource ARN was not found. For troubleshooting this error,
|
|
699
|
-
* see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-resource-not-found">ResourceNotFound</a> in the Amazon Bedrock User Guide</p>
|
|
700
|
-
* @public
|
|
701
|
-
*/
|
|
702
|
-
export declare class ResourceNotFoundException extends __BaseException {
|
|
703
|
-
readonly name: "ResourceNotFoundException";
|
|
704
|
-
readonly $fault: "client";
|
|
705
|
-
/**
|
|
706
|
-
* @internal
|
|
707
|
-
*/
|
|
708
|
-
constructor(opts: __ExceptionOptionType<ResourceNotFoundException, __BaseException>);
|
|
709
|
-
}
|
|
710
|
-
/**
|
|
711
|
-
* <p>Your request exceeds the service quota for your account. You can view your quotas at <a href="https://docs.aws.amazon.com/servicequotas/latest/userguide/gs-request-quota.html">Viewing service quotas</a>. You can resubmit your request later.</p>
|
|
712
|
-
* @public
|
|
713
|
-
*/
|
|
714
|
-
export declare class ServiceQuotaExceededException extends __BaseException {
|
|
715
|
-
readonly name: "ServiceQuotaExceededException";
|
|
716
|
-
readonly $fault: "client";
|
|
717
|
-
/**
|
|
718
|
-
* @internal
|
|
719
|
-
*/
|
|
720
|
-
constructor(opts: __ExceptionOptionType<ServiceQuotaExceededException, __BaseException>);
|
|
721
|
-
}
|
|
722
|
-
/**
|
|
723
|
-
* <p>Your request was denied due to exceeding the account quotas for <i>Amazon Bedrock</i>. For
|
|
724
|
-
* troubleshooting this error, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-throttling-exception">ThrottlingException</a> in the Amazon Bedrock User Guide</p>
|
|
725
|
-
* @public
|
|
726
|
-
*/
|
|
727
|
-
export declare class ThrottlingException extends __BaseException {
|
|
728
|
-
readonly name: "ThrottlingException";
|
|
729
|
-
readonly $fault: "client";
|
|
730
|
-
/**
|
|
731
|
-
* @internal
|
|
1138
|
+
* <p>The specific text for the output content produced by the guardrail.</p>
|
|
1139
|
+
* @public
|
|
732
1140
|
*/
|
|
733
|
-
|
|
1141
|
+
text?: string | undefined;
|
|
734
1142
|
}
|
|
735
1143
|
/**
|
|
736
|
-
* <p>The input fails to satisfy the constraints specified by <i>Amazon Bedrock</i>. For troubleshooting this error,
|
|
737
|
-
* see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-validation-error">ValidationError</a> in the Amazon Bedrock User Guide</p>
|
|
738
1144
|
* @public
|
|
739
1145
|
*/
|
|
740
|
-
export
|
|
741
|
-
readonly name: "ValidationException";
|
|
742
|
-
readonly $fault: "client";
|
|
1146
|
+
export interface ApplyGuardrailResponse {
|
|
743
1147
|
/**
|
|
744
|
-
*
|
|
1148
|
+
* <p>The usage details in the response from the guardrail.</p>
|
|
1149
|
+
* @public
|
|
745
1150
|
*/
|
|
746
|
-
|
|
1151
|
+
usage: GuardrailUsage | undefined;
|
|
1152
|
+
/**
|
|
1153
|
+
* <p>The action taken in the response from the guardrail.</p>
|
|
1154
|
+
* @public
|
|
1155
|
+
*/
|
|
1156
|
+
action: GuardrailAction | undefined;
|
|
1157
|
+
/**
|
|
1158
|
+
* <p>The output details in the response from the guardrail.</p>
|
|
1159
|
+
* @public
|
|
1160
|
+
*/
|
|
1161
|
+
outputs: GuardrailOutputContent[] | undefined;
|
|
1162
|
+
/**
|
|
1163
|
+
* <p>The assessment details in the response from the guardrail.</p>
|
|
1164
|
+
* @public
|
|
1165
|
+
*/
|
|
1166
|
+
assessments: GuardrailAssessment[] | undefined;
|
|
1167
|
+
/**
|
|
1168
|
+
* <p>The guardrail coverage details in the apply guardrail response.</p>
|
|
1169
|
+
* @public
|
|
1170
|
+
*/
|
|
1171
|
+
guardrailCoverage?: GuardrailCoverage | undefined;
|
|
747
1172
|
}
|
|
748
1173
|
/**
|
|
749
1174
|
* @public
|
|
@@ -912,6 +1337,64 @@ export interface DocumentBlock {
|
|
|
912
1337
|
*/
|
|
913
1338
|
source: DocumentSource | undefined;
|
|
914
1339
|
}
|
|
1340
|
+
/**
|
|
1341
|
+
* @public
|
|
1342
|
+
* @enum
|
|
1343
|
+
*/
|
|
1344
|
+
export declare const GuardrailConverseImageFormat: {
|
|
1345
|
+
readonly JPEG: "jpeg";
|
|
1346
|
+
readonly PNG: "png";
|
|
1347
|
+
};
|
|
1348
|
+
/**
|
|
1349
|
+
* @public
|
|
1350
|
+
*/
|
|
1351
|
+
export type GuardrailConverseImageFormat = (typeof GuardrailConverseImageFormat)[keyof typeof GuardrailConverseImageFormat];
|
|
1352
|
+
/**
|
|
1353
|
+
* <p>The image source (image bytes) of the guardrail converse image source.</p>
|
|
1354
|
+
* @public
|
|
1355
|
+
*/
|
|
1356
|
+
export type GuardrailConverseImageSource = GuardrailConverseImageSource.BytesMember | GuardrailConverseImageSource.$UnknownMember;
|
|
1357
|
+
/**
|
|
1358
|
+
* @public
|
|
1359
|
+
*/
|
|
1360
|
+
export declare namespace GuardrailConverseImageSource {
|
|
1361
|
+
/**
|
|
1362
|
+
* <p>The raw image bytes for the image.</p>
|
|
1363
|
+
* @public
|
|
1364
|
+
*/
|
|
1365
|
+
interface BytesMember {
|
|
1366
|
+
bytes: Uint8Array;
|
|
1367
|
+
$unknown?: never;
|
|
1368
|
+
}
|
|
1369
|
+
/**
|
|
1370
|
+
* @public
|
|
1371
|
+
*/
|
|
1372
|
+
interface $UnknownMember {
|
|
1373
|
+
bytes?: never;
|
|
1374
|
+
$unknown: [string, any];
|
|
1375
|
+
}
|
|
1376
|
+
interface Visitor<T> {
|
|
1377
|
+
bytes: (value: Uint8Array) => T;
|
|
1378
|
+
_: (name: string, value: any) => T;
|
|
1379
|
+
}
|
|
1380
|
+
const visit: <T>(value: GuardrailConverseImageSource, visitor: Visitor<T>) => T;
|
|
1381
|
+
}
|
|
1382
|
+
/**
|
|
1383
|
+
* <p>An image block that contains images that you want to assess with a guardrail.</p>
|
|
1384
|
+
* @public
|
|
1385
|
+
*/
|
|
1386
|
+
export interface GuardrailConverseImageBlock {
|
|
1387
|
+
/**
|
|
1388
|
+
* <p>The format details for the image type of the guardrail converse image block.</p>
|
|
1389
|
+
* @public
|
|
1390
|
+
*/
|
|
1391
|
+
format: GuardrailConverseImageFormat | undefined;
|
|
1392
|
+
/**
|
|
1393
|
+
* <p>The image source (image bytes) of the guardrail converse image block.</p>
|
|
1394
|
+
* @public
|
|
1395
|
+
*/
|
|
1396
|
+
source: GuardrailConverseImageSource | undefined;
|
|
1397
|
+
}
|
|
915
1398
|
/**
|
|
916
1399
|
* @public
|
|
917
1400
|
* @enum
|
|
@@ -947,7 +1430,7 @@ export interface GuardrailConverseTextBlock {
|
|
|
947
1430
|
* </p>
|
|
948
1431
|
* @public
|
|
949
1432
|
*/
|
|
950
|
-
export type GuardrailConverseContentBlock = GuardrailConverseContentBlock.TextMember | GuardrailConverseContentBlock.$UnknownMember;
|
|
1433
|
+
export type GuardrailConverseContentBlock = GuardrailConverseContentBlock.ImageMember | GuardrailConverseContentBlock.TextMember | GuardrailConverseContentBlock.$UnknownMember;
|
|
951
1434
|
/**
|
|
952
1435
|
* @public
|
|
953
1436
|
*/
|
|
@@ -958,6 +1441,16 @@ export declare namespace GuardrailConverseContentBlock {
|
|
|
958
1441
|
*/
|
|
959
1442
|
interface TextMember {
|
|
960
1443
|
text: GuardrailConverseTextBlock;
|
|
1444
|
+
image?: never;
|
|
1445
|
+
$unknown?: never;
|
|
1446
|
+
}
|
|
1447
|
+
/**
|
|
1448
|
+
* <p>Image within converse content block to be evaluated by the guardrail.</p>
|
|
1449
|
+
* @public
|
|
1450
|
+
*/
|
|
1451
|
+
interface ImageMember {
|
|
1452
|
+
text?: never;
|
|
1453
|
+
image: GuardrailConverseImageBlock;
|
|
961
1454
|
$unknown?: never;
|
|
962
1455
|
}
|
|
963
1456
|
/**
|
|
@@ -965,10 +1458,12 @@ export declare namespace GuardrailConverseContentBlock {
|
|
|
965
1458
|
*/
|
|
966
1459
|
interface $UnknownMember {
|
|
967
1460
|
text?: never;
|
|
1461
|
+
image?: never;
|
|
968
1462
|
$unknown: [string, any];
|
|
969
1463
|
}
|
|
970
1464
|
interface Visitor<T> {
|
|
971
1465
|
text: (value: GuardrailConverseTextBlock) => T;
|
|
1466
|
+
image: (value: GuardrailConverseImageBlock) => T;
|
|
972
1467
|
_: (name: string, value: any) => T;
|
|
973
1468
|
}
|
|
974
1469
|
const visit: <T>(value: GuardrailConverseContentBlock, visitor: Visitor<T>) => T;
|
|
@@ -1033,11 +1528,106 @@ export interface ImageBlock {
|
|
|
1033
1528
|
*/
|
|
1034
1529
|
source: ImageSource | undefined;
|
|
1035
1530
|
}
|
|
1531
|
+
/**
|
|
1532
|
+
* @public
|
|
1533
|
+
* @enum
|
|
1534
|
+
*/
|
|
1535
|
+
export declare const VideoFormat: {
|
|
1536
|
+
readonly FLV: "flv";
|
|
1537
|
+
readonly MKV: "mkv";
|
|
1538
|
+
readonly MOV: "mov";
|
|
1539
|
+
readonly MP4: "mp4";
|
|
1540
|
+
readonly MPEG: "mpeg";
|
|
1541
|
+
readonly MPG: "mpg";
|
|
1542
|
+
readonly THREE_GP: "three_gp";
|
|
1543
|
+
readonly WEBM: "webm";
|
|
1544
|
+
readonly WMV: "wmv";
|
|
1545
|
+
};
|
|
1546
|
+
/**
|
|
1547
|
+
* @public
|
|
1548
|
+
*/
|
|
1549
|
+
export type VideoFormat = (typeof VideoFormat)[keyof typeof VideoFormat];
|
|
1550
|
+
/**
|
|
1551
|
+
* <p>A storage location in an S3 bucket.</p>
|
|
1552
|
+
* @public
|
|
1553
|
+
*/
|
|
1554
|
+
export interface S3Location {
|
|
1555
|
+
/**
|
|
1556
|
+
* <p>An object URI starting with <code>s3://</code>.</p>
|
|
1557
|
+
* @public
|
|
1558
|
+
*/
|
|
1559
|
+
uri: string | undefined;
|
|
1560
|
+
/**
|
|
1561
|
+
* <p>If the bucket belongs to another AWS account, specify that account's ID.</p>
|
|
1562
|
+
* @public
|
|
1563
|
+
*/
|
|
1564
|
+
bucketOwner?: string | undefined;
|
|
1565
|
+
}
|
|
1566
|
+
/**
|
|
1567
|
+
* <p>A video source. You can upload a smaller video as a base64-encoded string as
|
|
1568
|
+
* long as the encoded file is less than 25MB. You can also transfer videos up to 1GB in size
|
|
1569
|
+
* from an S3 bucket.</p>
|
|
1570
|
+
* @public
|
|
1571
|
+
*/
|
|
1572
|
+
export type VideoSource = VideoSource.BytesMember | VideoSource.S3LocationMember | VideoSource.$UnknownMember;
|
|
1573
|
+
/**
|
|
1574
|
+
* @public
|
|
1575
|
+
*/
|
|
1576
|
+
export declare namespace VideoSource {
|
|
1577
|
+
/**
|
|
1578
|
+
* <p>Video content encoded in base64.</p>
|
|
1579
|
+
* @public
|
|
1580
|
+
*/
|
|
1581
|
+
interface BytesMember {
|
|
1582
|
+
bytes: Uint8Array;
|
|
1583
|
+
s3Location?: never;
|
|
1584
|
+
$unknown?: never;
|
|
1585
|
+
}
|
|
1586
|
+
/**
|
|
1587
|
+
* <p>The location of a video object in an S3 bucket.</p>
|
|
1588
|
+
* @public
|
|
1589
|
+
*/
|
|
1590
|
+
interface S3LocationMember {
|
|
1591
|
+
bytes?: never;
|
|
1592
|
+
s3Location: S3Location;
|
|
1593
|
+
$unknown?: never;
|
|
1594
|
+
}
|
|
1595
|
+
/**
|
|
1596
|
+
* @public
|
|
1597
|
+
*/
|
|
1598
|
+
interface $UnknownMember {
|
|
1599
|
+
bytes?: never;
|
|
1600
|
+
s3Location?: never;
|
|
1601
|
+
$unknown: [string, any];
|
|
1602
|
+
}
|
|
1603
|
+
interface Visitor<T> {
|
|
1604
|
+
bytes: (value: Uint8Array) => T;
|
|
1605
|
+
s3Location: (value: S3Location) => T;
|
|
1606
|
+
_: (name: string, value: any) => T;
|
|
1607
|
+
}
|
|
1608
|
+
const visit: <T>(value: VideoSource, visitor: Visitor<T>) => T;
|
|
1609
|
+
}
|
|
1610
|
+
/**
|
|
1611
|
+
* <p>A video block.</p>
|
|
1612
|
+
* @public
|
|
1613
|
+
*/
|
|
1614
|
+
export interface VideoBlock {
|
|
1615
|
+
/**
|
|
1616
|
+
* <p>The block's format.</p>
|
|
1617
|
+
* @public
|
|
1618
|
+
*/
|
|
1619
|
+
format: VideoFormat | undefined;
|
|
1620
|
+
/**
|
|
1621
|
+
* <p>The block's source.</p>
|
|
1622
|
+
* @public
|
|
1623
|
+
*/
|
|
1624
|
+
source: VideoSource | undefined;
|
|
1625
|
+
}
|
|
1036
1626
|
/**
|
|
1037
1627
|
* <p>The tool result content block.</p>
|
|
1038
1628
|
* @public
|
|
1039
1629
|
*/
|
|
1040
|
-
export type ToolResultContentBlock = ToolResultContentBlock.DocumentMember | ToolResultContentBlock.ImageMember | ToolResultContentBlock.JsonMember | ToolResultContentBlock.TextMember | ToolResultContentBlock.$UnknownMember;
|
|
1630
|
+
export type ToolResultContentBlock = ToolResultContentBlock.DocumentMember | ToolResultContentBlock.ImageMember | ToolResultContentBlock.JsonMember | ToolResultContentBlock.TextMember | ToolResultContentBlock.VideoMember | ToolResultContentBlock.$UnknownMember;
|
|
1041
1631
|
/**
|
|
1042
1632
|
* @public
|
|
1043
1633
|
*/
|
|
@@ -1051,6 +1641,7 @@ export declare namespace ToolResultContentBlock {
|
|
|
1051
1641
|
text?: never;
|
|
1052
1642
|
image?: never;
|
|
1053
1643
|
document?: never;
|
|
1644
|
+
video?: never;
|
|
1054
1645
|
$unknown?: never;
|
|
1055
1646
|
}
|
|
1056
1647
|
/**
|
|
@@ -1062,6 +1653,7 @@ export declare namespace ToolResultContentBlock {
|
|
|
1062
1653
|
text: string;
|
|
1063
1654
|
image?: never;
|
|
1064
1655
|
document?: never;
|
|
1656
|
+
video?: never;
|
|
1065
1657
|
$unknown?: never;
|
|
1066
1658
|
}
|
|
1067
1659
|
/**
|
|
@@ -1076,6 +1668,7 @@ export declare namespace ToolResultContentBlock {
|
|
|
1076
1668
|
text?: never;
|
|
1077
1669
|
image: ImageBlock;
|
|
1078
1670
|
document?: never;
|
|
1671
|
+
video?: never;
|
|
1079
1672
|
$unknown?: never;
|
|
1080
1673
|
}
|
|
1081
1674
|
/**
|
|
@@ -1087,6 +1680,19 @@ export declare namespace ToolResultContentBlock {
|
|
|
1087
1680
|
text?: never;
|
|
1088
1681
|
image?: never;
|
|
1089
1682
|
document: DocumentBlock;
|
|
1683
|
+
video?: never;
|
|
1684
|
+
$unknown?: never;
|
|
1685
|
+
}
|
|
1686
|
+
/**
|
|
1687
|
+
* <p>A tool result that is video.</p>
|
|
1688
|
+
* @public
|
|
1689
|
+
*/
|
|
1690
|
+
interface VideoMember {
|
|
1691
|
+
json?: never;
|
|
1692
|
+
text?: never;
|
|
1693
|
+
image?: never;
|
|
1694
|
+
document?: never;
|
|
1695
|
+
video: VideoBlock;
|
|
1090
1696
|
$unknown?: never;
|
|
1091
1697
|
}
|
|
1092
1698
|
/**
|
|
@@ -1097,6 +1703,7 @@ export declare namespace ToolResultContentBlock {
|
|
|
1097
1703
|
text?: never;
|
|
1098
1704
|
image?: never;
|
|
1099
1705
|
document?: never;
|
|
1706
|
+
video?: never;
|
|
1100
1707
|
$unknown: [string, any];
|
|
1101
1708
|
}
|
|
1102
1709
|
interface Visitor<T> {
|
|
@@ -1104,6 +1711,7 @@ export declare namespace ToolResultContentBlock {
|
|
|
1104
1711
|
text: (value: string) => T;
|
|
1105
1712
|
image: (value: ImageBlock) => T;
|
|
1106
1713
|
document: (value: DocumentBlock) => T;
|
|
1714
|
+
video: (value: VideoBlock) => T;
|
|
1107
1715
|
_: (name: string, value: any) => T;
|
|
1108
1716
|
}
|
|
1109
1717
|
const visit: <T>(value: ToolResultContentBlock, visitor: Visitor<T>) => T;
|
|
@@ -1171,7 +1779,7 @@ export interface ToolUseBlock {
|
|
|
1171
1779
|
* <p>A block of content for a message that you pass to, or receive from, a model with the <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_Converse.html">Converse</a> or <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_ConverseStream.html">ConverseStream</a> API operations.</p>
|
|
1172
1780
|
* @public
|
|
1173
1781
|
*/
|
|
1174
|
-
export type ContentBlock = ContentBlock.DocumentMember | ContentBlock.GuardContentMember | ContentBlock.ImageMember | ContentBlock.TextMember | ContentBlock.ToolResultMember | ContentBlock.ToolUseMember | ContentBlock.$UnknownMember;
|
|
1782
|
+
export type ContentBlock = ContentBlock.DocumentMember | ContentBlock.GuardContentMember | ContentBlock.ImageMember | ContentBlock.TextMember | ContentBlock.ToolResultMember | ContentBlock.ToolUseMember | ContentBlock.VideoMember | ContentBlock.$UnknownMember;
|
|
1175
1783
|
/**
|
|
1176
1784
|
* @public
|
|
1177
1785
|
*/
|
|
@@ -1184,6 +1792,7 @@ export declare namespace ContentBlock {
|
|
|
1184
1792
|
text: string;
|
|
1185
1793
|
image?: never;
|
|
1186
1794
|
document?: never;
|
|
1795
|
+
video?: never;
|
|
1187
1796
|
toolUse?: never;
|
|
1188
1797
|
toolResult?: never;
|
|
1189
1798
|
guardContent?: never;
|
|
@@ -1200,6 +1809,7 @@ export declare namespace ContentBlock {
|
|
|
1200
1809
|
text?: never;
|
|
1201
1810
|
image: ImageBlock;
|
|
1202
1811
|
document?: never;
|
|
1812
|
+
video?: never;
|
|
1203
1813
|
toolUse?: never;
|
|
1204
1814
|
toolResult?: never;
|
|
1205
1815
|
guardContent?: never;
|
|
@@ -1213,6 +1823,21 @@ export declare namespace ContentBlock {
|
|
|
1213
1823
|
text?: never;
|
|
1214
1824
|
image?: never;
|
|
1215
1825
|
document: DocumentBlock;
|
|
1826
|
+
video?: never;
|
|
1827
|
+
toolUse?: never;
|
|
1828
|
+
toolResult?: never;
|
|
1829
|
+
guardContent?: never;
|
|
1830
|
+
$unknown?: never;
|
|
1831
|
+
}
|
|
1832
|
+
/**
|
|
1833
|
+
* <p>Video to include in the message. </p>
|
|
1834
|
+
* @public
|
|
1835
|
+
*/
|
|
1836
|
+
interface VideoMember {
|
|
1837
|
+
text?: never;
|
|
1838
|
+
image?: never;
|
|
1839
|
+
document?: never;
|
|
1840
|
+
video: VideoBlock;
|
|
1216
1841
|
toolUse?: never;
|
|
1217
1842
|
toolResult?: never;
|
|
1218
1843
|
guardContent?: never;
|
|
@@ -1226,6 +1851,7 @@ export declare namespace ContentBlock {
|
|
|
1226
1851
|
text?: never;
|
|
1227
1852
|
image?: never;
|
|
1228
1853
|
document?: never;
|
|
1854
|
+
video?: never;
|
|
1229
1855
|
toolUse: ToolUseBlock;
|
|
1230
1856
|
toolResult?: never;
|
|
1231
1857
|
guardContent?: never;
|
|
@@ -1239,6 +1865,7 @@ export declare namespace ContentBlock {
|
|
|
1239
1865
|
text?: never;
|
|
1240
1866
|
image?: never;
|
|
1241
1867
|
document?: never;
|
|
1868
|
+
video?: never;
|
|
1242
1869
|
toolUse?: never;
|
|
1243
1870
|
toolResult: ToolResultBlock;
|
|
1244
1871
|
guardContent?: never;
|
|
@@ -1257,6 +1884,7 @@ export declare namespace ContentBlock {
|
|
|
1257
1884
|
text?: never;
|
|
1258
1885
|
image?: never;
|
|
1259
1886
|
document?: never;
|
|
1887
|
+
video?: never;
|
|
1260
1888
|
toolUse?: never;
|
|
1261
1889
|
toolResult?: never;
|
|
1262
1890
|
guardContent: GuardrailConverseContentBlock;
|
|
@@ -1269,6 +1897,7 @@ export declare namespace ContentBlock {
|
|
|
1269
1897
|
text?: never;
|
|
1270
1898
|
image?: never;
|
|
1271
1899
|
document?: never;
|
|
1900
|
+
video?: never;
|
|
1272
1901
|
toolUse?: never;
|
|
1273
1902
|
toolResult?: never;
|
|
1274
1903
|
guardContent?: never;
|
|
@@ -1278,6 +1907,7 @@ export declare namespace ContentBlock {
|
|
|
1278
1907
|
text: (value: string) => T;
|
|
1279
1908
|
image: (value: ImageBlock) => T;
|
|
1280
1909
|
document: (value: DocumentBlock) => T;
|
|
1910
|
+
video: (value: VideoBlock) => T;
|
|
1281
1911
|
toolUse: (value: ToolUseBlock) => T;
|
|
1282
1912
|
toolResult: (value: ToolResultBlock) => T;
|
|
1283
1913
|
guardContent: (value: GuardrailConverseContentBlock) => T;
|
|
@@ -1592,9 +2222,6 @@ export declare namespace Tool {
|
|
|
1592
2222
|
}
|
|
1593
2223
|
/**
|
|
1594
2224
|
* <p>Configuration information for the tools that you pass to a model. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/tool-use.html">Tool use (function calling)</a> in the Amazon Bedrock User Guide.</p>
|
|
1595
|
-
* <note>
|
|
1596
|
-
* <p>This field is only supported by Anthropic Claude 3, Cohere Command R, Cohere Command R+, and Mistral Large models.</p>
|
|
1597
|
-
* </note>
|
|
1598
2225
|
* @public
|
|
1599
2226
|
*/
|
|
1600
2227
|
export interface ToolConfiguration {
|
|
@@ -1655,9 +2282,8 @@ export interface ConverseRequest {
|
|
|
1655
2282
|
inferenceConfig?: InferenceConfiguration | undefined;
|
|
1656
2283
|
/**
|
|
1657
2284
|
* <p>Configuration information for the tools that the model can use when generating a response. </p>
|
|
1658
|
-
* <
|
|
1659
|
-
*
|
|
1660
|
-
* </note>
|
|
2285
|
+
* <p>For information about models that support tool use, see
|
|
2286
|
+
* <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/conversation-inference.html#conversation-inference-supported-models-features">Supported models and model features</a>.</p>
|
|
1661
2287
|
* @public
|
|
1662
2288
|
*/
|
|
1663
2289
|
toolConfig?: ToolConfiguration | undefined;
|
|
@@ -1696,6 +2322,11 @@ export interface ConverseRequest {
|
|
|
1696
2322
|
* @public
|
|
1697
2323
|
*/
|
|
1698
2324
|
additionalModelResponseFieldPaths?: string[] | undefined;
|
|
2325
|
+
/**
|
|
2326
|
+
* <p>Key-value pairs that you can use to filter invocation logs.</p>
|
|
2327
|
+
* @public
|
|
2328
|
+
*/
|
|
2329
|
+
requestMetadata?: Record<string, string> | undefined;
|
|
1699
2330
|
/**
|
|
1700
2331
|
* <p>Model performance settings for the request.</p>
|
|
1701
2332
|
* @public
|
|
@@ -1781,6 +2412,17 @@ export interface GuardrailTraceAssessment {
|
|
|
1781
2412
|
*/
|
|
1782
2413
|
outputAssessments?: Record<string, GuardrailAssessment[]> | undefined;
|
|
1783
2414
|
}
|
|
2415
|
+
/**
|
|
2416
|
+
* <p>A prompt router trace.</p>
|
|
2417
|
+
* @public
|
|
2418
|
+
*/
|
|
2419
|
+
export interface PromptRouterTrace {
|
|
2420
|
+
/**
|
|
2421
|
+
* <p>The ID of the invoked model.</p>
|
|
2422
|
+
* @public
|
|
2423
|
+
*/
|
|
2424
|
+
invokedModelId?: string | undefined;
|
|
2425
|
+
}
|
|
1784
2426
|
/**
|
|
1785
2427
|
* <p>The trace object in a response from <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_Converse.html">Converse</a>. Currently, you can only trace guardrails.</p>
|
|
1786
2428
|
* @public
|
|
@@ -1791,6 +2433,11 @@ export interface ConverseTrace {
|
|
|
1791
2433
|
* @public
|
|
1792
2434
|
*/
|
|
1793
2435
|
guardrail?: GuardrailTraceAssessment | undefined;
|
|
2436
|
+
/**
|
|
2437
|
+
* <p>The request's prompt router.</p>
|
|
2438
|
+
* @public
|
|
2439
|
+
*/
|
|
2440
|
+
promptRouter?: PromptRouterTrace | undefined;
|
|
1794
2441
|
}
|
|
1795
2442
|
/**
|
|
1796
2443
|
* <p>The tokens used in a message API inference call. </p>
|
|
@@ -1904,19 +2551,6 @@ export declare class ModelTimeoutException extends __BaseException {
|
|
|
1904
2551
|
*/
|
|
1905
2552
|
constructor(opts: __ExceptionOptionType<ModelTimeoutException, __BaseException>);
|
|
1906
2553
|
}
|
|
1907
|
-
/**
|
|
1908
|
-
* <p>The service isn't currently available. For troubleshooting this error,
|
|
1909
|
-
* see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-service-unavailable">ServiceUnavailable</a> in the Amazon Bedrock User Guide</p>
|
|
1910
|
-
* @public
|
|
1911
|
-
*/
|
|
1912
|
-
export declare class ServiceUnavailableException extends __BaseException {
|
|
1913
|
-
readonly name: "ServiceUnavailableException";
|
|
1914
|
-
readonly $fault: "server";
|
|
1915
|
-
/**
|
|
1916
|
-
* @internal
|
|
1917
|
-
*/
|
|
1918
|
-
constructor(opts: __ExceptionOptionType<ServiceUnavailableException, __BaseException>);
|
|
1919
|
-
}
|
|
1920
2554
|
/**
|
|
1921
2555
|
* @public
|
|
1922
2556
|
* @enum
|
|
@@ -2004,9 +2638,8 @@ export interface ConverseStreamRequest {
|
|
|
2004
2638
|
inferenceConfig?: InferenceConfiguration | undefined;
|
|
2005
2639
|
/**
|
|
2006
2640
|
* <p>Configuration information for the tools that the model can use when generating a response.</p>
|
|
2007
|
-
* <
|
|
2008
|
-
* <
|
|
2009
|
-
* </note>
|
|
2641
|
+
* <p>For information about models that support streaming tool use, see
|
|
2642
|
+
* <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/conversation-inference.html#conversation-inference-supported-models-features">Supported models and model features</a>.</p>
|
|
2010
2643
|
* @public
|
|
2011
2644
|
*/
|
|
2012
2645
|
toolConfig?: ToolConfiguration | undefined;
|
|
@@ -2045,6 +2678,11 @@ export interface ConverseStreamRequest {
|
|
|
2045
2678
|
* @public
|
|
2046
2679
|
*/
|
|
2047
2680
|
additionalModelResponseFieldPaths?: string[] | undefined;
|
|
2681
|
+
/**
|
|
2682
|
+
* <p>Key-value pairs that you can use to filter invocation logs.</p>
|
|
2683
|
+
* @public
|
|
2684
|
+
*/
|
|
2685
|
+
requestMetadata?: Record<string, string> | undefined;
|
|
2048
2686
|
/**
|
|
2049
2687
|
* <p>Model performance settings for the request.</p>
|
|
2050
2688
|
* @public
|
|
@@ -2241,6 +2879,11 @@ export interface ConverseStreamTrace {
|
|
|
2241
2879
|
* @public
|
|
2242
2880
|
*/
|
|
2243
2881
|
guardrail?: GuardrailTraceAssessment | undefined;
|
|
2882
|
+
/**
|
|
2883
|
+
* <p>The request's prompt router.</p>
|
|
2884
|
+
* @public
|
|
2885
|
+
*/
|
|
2886
|
+
promptRouter?: PromptRouterTrace | undefined;
|
|
2244
2887
|
}
|
|
2245
2888
|
/**
|
|
2246
2889
|
* <p>A conversation stream metadata event.</p>
|
|
@@ -2444,7 +3087,8 @@ export declare namespace ConverseStreamOutput {
|
|
|
2444
3087
|
$unknown?: never;
|
|
2445
3088
|
}
|
|
2446
3089
|
/**
|
|
2447
|
-
* <p>
|
|
3090
|
+
* <p>The input fails to satisfy the constraints specified by <i>Amazon Bedrock</i>. For troubleshooting this error,
|
|
3091
|
+
* see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-validation-error">ValidationError</a> in the Amazon Bedrock User Guide</p>
|
|
2448
3092
|
* @public
|
|
2449
3093
|
*/
|
|
2450
3094
|
interface ValidationExceptionMember {
|
|
@@ -2462,7 +3106,8 @@ export declare namespace ConverseStreamOutput {
|
|
|
2462
3106
|
$unknown?: never;
|
|
2463
3107
|
}
|
|
2464
3108
|
/**
|
|
2465
|
-
* <p>
|
|
3109
|
+
* <p>Your request was denied due to exceeding the account quotas for <i>Amazon Bedrock</i>. For
|
|
3110
|
+
* troubleshooting this error, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-throttling-exception">ThrottlingException</a> in the Amazon Bedrock User Guide</p>
|
|
2466
3111
|
* @public
|
|
2467
3112
|
*/
|
|
2468
3113
|
interface ThrottlingExceptionMember {
|
|
@@ -2891,10 +3536,74 @@ export interface InvokeModelWithResponseStreamResponse {
|
|
|
2891
3536
|
*/
|
|
2892
3537
|
performanceConfigLatency?: PerformanceConfigLatency | undefined;
|
|
2893
3538
|
}
|
|
3539
|
+
/**
|
|
3540
|
+
* @internal
|
|
3541
|
+
*/
|
|
3542
|
+
export declare const GetAsyncInvokeResponseFilterSensitiveLog: (obj: GetAsyncInvokeResponse) => any;
|
|
3543
|
+
/**
|
|
3544
|
+
* @internal
|
|
3545
|
+
*/
|
|
3546
|
+
export declare const AsyncInvokeSummaryFilterSensitiveLog: (obj: AsyncInvokeSummary) => any;
|
|
3547
|
+
/**
|
|
3548
|
+
* @internal
|
|
3549
|
+
*/
|
|
3550
|
+
export declare const ListAsyncInvokesResponseFilterSensitiveLog: (obj: ListAsyncInvokesResponse) => any;
|
|
3551
|
+
/**
|
|
3552
|
+
* @internal
|
|
3553
|
+
*/
|
|
3554
|
+
export declare const StartAsyncInvokeRequestFilterSensitiveLog: (obj: StartAsyncInvokeRequest) => any;
|
|
3555
|
+
/**
|
|
3556
|
+
* @internal
|
|
3557
|
+
*/
|
|
3558
|
+
export declare const GuardrailImageSourceFilterSensitiveLog: (obj: GuardrailImageSource) => any;
|
|
3559
|
+
/**
|
|
3560
|
+
* @internal
|
|
3561
|
+
*/
|
|
3562
|
+
export declare const GuardrailImageBlockFilterSensitiveLog: (obj: GuardrailImageBlock) => any;
|
|
3563
|
+
/**
|
|
3564
|
+
* @internal
|
|
3565
|
+
*/
|
|
3566
|
+
export declare const GuardrailContentBlockFilterSensitiveLog: (obj: GuardrailContentBlock) => any;
|
|
3567
|
+
/**
|
|
3568
|
+
* @internal
|
|
3569
|
+
*/
|
|
3570
|
+
export declare const ApplyGuardrailRequestFilterSensitiveLog: (obj: ApplyGuardrailRequest) => any;
|
|
3571
|
+
/**
|
|
3572
|
+
* @internal
|
|
3573
|
+
*/
|
|
3574
|
+
export declare const GuardrailConverseImageSourceFilterSensitiveLog: (obj: GuardrailConverseImageSource) => any;
|
|
3575
|
+
/**
|
|
3576
|
+
* @internal
|
|
3577
|
+
*/
|
|
3578
|
+
export declare const GuardrailConverseImageBlockFilterSensitiveLog: (obj: GuardrailConverseImageBlock) => any;
|
|
3579
|
+
/**
|
|
3580
|
+
* @internal
|
|
3581
|
+
*/
|
|
3582
|
+
export declare const GuardrailConverseContentBlockFilterSensitiveLog: (obj: GuardrailConverseContentBlock) => any;
|
|
3583
|
+
/**
|
|
3584
|
+
* @internal
|
|
3585
|
+
*/
|
|
3586
|
+
export declare const ContentBlockFilterSensitiveLog: (obj: ContentBlock) => any;
|
|
3587
|
+
/**
|
|
3588
|
+
* @internal
|
|
3589
|
+
*/
|
|
3590
|
+
export declare const MessageFilterSensitiveLog: (obj: Message) => any;
|
|
3591
|
+
/**
|
|
3592
|
+
* @internal
|
|
3593
|
+
*/
|
|
3594
|
+
export declare const SystemContentBlockFilterSensitiveLog: (obj: SystemContentBlock) => any;
|
|
2894
3595
|
/**
|
|
2895
3596
|
* @internal
|
|
2896
3597
|
*/
|
|
2897
3598
|
export declare const ConverseRequestFilterSensitiveLog: (obj: ConverseRequest) => any;
|
|
3599
|
+
/**
|
|
3600
|
+
* @internal
|
|
3601
|
+
*/
|
|
3602
|
+
export declare const ConverseOutputFilterSensitiveLog: (obj: ConverseOutput) => any;
|
|
3603
|
+
/**
|
|
3604
|
+
* @internal
|
|
3605
|
+
*/
|
|
3606
|
+
export declare const ConverseResponseFilterSensitiveLog: (obj: ConverseResponse) => any;
|
|
2898
3607
|
/**
|
|
2899
3608
|
* @internal
|
|
2900
3609
|
*/
|