@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
package/dist-cjs/index.js
CHANGED
|
@@ -23,16 +23,24 @@ var src_exports = {};
|
|
|
23
23
|
__export(src_exports, {
|
|
24
24
|
AccessDeniedException: () => AccessDeniedException,
|
|
25
25
|
ApplyGuardrailCommand: () => ApplyGuardrailCommand,
|
|
26
|
+
ApplyGuardrailRequestFilterSensitiveLog: () => ApplyGuardrailRequestFilterSensitiveLog,
|
|
27
|
+
AsyncInvokeOutputDataConfig: () => AsyncInvokeOutputDataConfig,
|
|
28
|
+
AsyncInvokeStatus: () => AsyncInvokeStatus,
|
|
29
|
+
AsyncInvokeSummaryFilterSensitiveLog: () => AsyncInvokeSummaryFilterSensitiveLog,
|
|
26
30
|
BedrockRuntime: () => BedrockRuntime,
|
|
27
31
|
BedrockRuntimeClient: () => BedrockRuntimeClient,
|
|
28
32
|
BedrockRuntimeServiceException: () => BedrockRuntimeServiceException,
|
|
33
|
+
ConflictException: () => ConflictException,
|
|
29
34
|
ContentBlock: () => ContentBlock,
|
|
30
35
|
ContentBlockDelta: () => ContentBlockDelta,
|
|
36
|
+
ContentBlockFilterSensitiveLog: () => ContentBlockFilterSensitiveLog,
|
|
31
37
|
ContentBlockStart: () => ContentBlockStart,
|
|
32
38
|
ConversationRole: () => ConversationRole,
|
|
33
39
|
ConverseCommand: () => ConverseCommand,
|
|
34
40
|
ConverseOutput: () => ConverseOutput,
|
|
41
|
+
ConverseOutputFilterSensitiveLog: () => ConverseOutputFilterSensitiveLog,
|
|
35
42
|
ConverseRequestFilterSensitiveLog: () => ConverseRequestFilterSensitiveLog,
|
|
43
|
+
ConverseResponseFilterSensitiveLog: () => ConverseResponseFilterSensitiveLog,
|
|
36
44
|
ConverseStreamCommand: () => ConverseStreamCommand,
|
|
37
45
|
ConverseStreamOutput: () => ConverseStreamOutput,
|
|
38
46
|
ConverseStreamOutputFilterSensitiveLog: () => ConverseStreamOutputFilterSensitiveLog,
|
|
@@ -40,8 +48,11 @@ __export(src_exports, {
|
|
|
40
48
|
ConverseStreamResponseFilterSensitiveLog: () => ConverseStreamResponseFilterSensitiveLog,
|
|
41
49
|
DocumentFormat: () => DocumentFormat,
|
|
42
50
|
DocumentSource: () => DocumentSource,
|
|
51
|
+
GetAsyncInvokeCommand: () => GetAsyncInvokeCommand,
|
|
52
|
+
GetAsyncInvokeResponseFilterSensitiveLog: () => GetAsyncInvokeResponseFilterSensitiveLog,
|
|
43
53
|
GuardrailAction: () => GuardrailAction,
|
|
44
54
|
GuardrailContentBlock: () => GuardrailContentBlock,
|
|
55
|
+
GuardrailContentBlockFilterSensitiveLog: () => GuardrailContentBlockFilterSensitiveLog,
|
|
45
56
|
GuardrailContentFilterConfidence: () => GuardrailContentFilterConfidence,
|
|
46
57
|
GuardrailContentFilterStrength: () => GuardrailContentFilterStrength,
|
|
47
58
|
GuardrailContentFilterType: () => GuardrailContentFilterType,
|
|
@@ -51,7 +62,16 @@ __export(src_exports, {
|
|
|
51
62
|
GuardrailContextualGroundingFilterType: () => GuardrailContextualGroundingFilterType,
|
|
52
63
|
GuardrailContextualGroundingPolicyAction: () => GuardrailContextualGroundingPolicyAction,
|
|
53
64
|
GuardrailConverseContentBlock: () => GuardrailConverseContentBlock,
|
|
65
|
+
GuardrailConverseContentBlockFilterSensitiveLog: () => GuardrailConverseContentBlockFilterSensitiveLog,
|
|
54
66
|
GuardrailConverseContentQualifier: () => GuardrailConverseContentQualifier,
|
|
67
|
+
GuardrailConverseImageBlockFilterSensitiveLog: () => GuardrailConverseImageBlockFilterSensitiveLog,
|
|
68
|
+
GuardrailConverseImageFormat: () => GuardrailConverseImageFormat,
|
|
69
|
+
GuardrailConverseImageSource: () => GuardrailConverseImageSource,
|
|
70
|
+
GuardrailConverseImageSourceFilterSensitiveLog: () => GuardrailConverseImageSourceFilterSensitiveLog,
|
|
71
|
+
GuardrailImageBlockFilterSensitiveLog: () => GuardrailImageBlockFilterSensitiveLog,
|
|
72
|
+
GuardrailImageFormat: () => GuardrailImageFormat,
|
|
73
|
+
GuardrailImageSource: () => GuardrailImageSource,
|
|
74
|
+
GuardrailImageSourceFilterSensitiveLog: () => GuardrailImageSourceFilterSensitiveLog,
|
|
55
75
|
GuardrailManagedWordType: () => GuardrailManagedWordType,
|
|
56
76
|
GuardrailPiiEntityType: () => GuardrailPiiEntityType,
|
|
57
77
|
GuardrailSensitiveInformationPolicyAction: () => GuardrailSensitiveInformationPolicyAction,
|
|
@@ -69,6 +89,9 @@ __export(src_exports, {
|
|
|
69
89
|
InvokeModelWithResponseStreamCommand: () => InvokeModelWithResponseStreamCommand,
|
|
70
90
|
InvokeModelWithResponseStreamRequestFilterSensitiveLog: () => InvokeModelWithResponseStreamRequestFilterSensitiveLog,
|
|
71
91
|
InvokeModelWithResponseStreamResponseFilterSensitiveLog: () => InvokeModelWithResponseStreamResponseFilterSensitiveLog,
|
|
92
|
+
ListAsyncInvokesCommand: () => ListAsyncInvokesCommand,
|
|
93
|
+
ListAsyncInvokesResponseFilterSensitiveLog: () => ListAsyncInvokesResponseFilterSensitiveLog,
|
|
94
|
+
MessageFilterSensitiveLog: () => MessageFilterSensitiveLog,
|
|
72
95
|
ModelErrorException: () => ModelErrorException,
|
|
73
96
|
ModelNotReadyException: () => ModelNotReadyException,
|
|
74
97
|
ModelStreamErrorException: () => ModelStreamErrorException,
|
|
@@ -81,8 +104,13 @@ __export(src_exports, {
|
|
|
81
104
|
ResponseStreamFilterSensitiveLog: () => ResponseStreamFilterSensitiveLog,
|
|
82
105
|
ServiceQuotaExceededException: () => ServiceQuotaExceededException,
|
|
83
106
|
ServiceUnavailableException: () => ServiceUnavailableException,
|
|
107
|
+
SortAsyncInvocationBy: () => SortAsyncInvocationBy,
|
|
108
|
+
SortOrder: () => SortOrder,
|
|
109
|
+
StartAsyncInvokeCommand: () => StartAsyncInvokeCommand,
|
|
110
|
+
StartAsyncInvokeRequestFilterSensitiveLog: () => StartAsyncInvokeRequestFilterSensitiveLog,
|
|
84
111
|
StopReason: () => StopReason,
|
|
85
112
|
SystemContentBlock: () => SystemContentBlock,
|
|
113
|
+
SystemContentBlockFilterSensitiveLog: () => SystemContentBlockFilterSensitiveLog,
|
|
86
114
|
ThrottlingException: () => ThrottlingException,
|
|
87
115
|
Tool: () => Tool,
|
|
88
116
|
ToolChoice: () => ToolChoice,
|
|
@@ -91,7 +119,10 @@ __export(src_exports, {
|
|
|
91
119
|
ToolResultStatus: () => ToolResultStatus,
|
|
92
120
|
Trace: () => Trace,
|
|
93
121
|
ValidationException: () => ValidationException,
|
|
94
|
-
|
|
122
|
+
VideoFormat: () => VideoFormat,
|
|
123
|
+
VideoSource: () => VideoSource,
|
|
124
|
+
__Client: () => import_smithy_client.Client,
|
|
125
|
+
paginateListAsyncInvokes: () => paginateListAsyncInvokes
|
|
95
126
|
});
|
|
96
127
|
module.exports = __toCommonJS(src_exports);
|
|
97
128
|
|
|
@@ -242,9 +273,7 @@ var BedrockRuntimeClient = _BedrockRuntimeClient;
|
|
|
242
273
|
var import_middleware_serde = require("@smithy/middleware-serde");
|
|
243
274
|
|
|
244
275
|
|
|
245
|
-
// src/
|
|
246
|
-
var import_core2 = require("@aws-sdk/core");
|
|
247
|
-
|
|
276
|
+
// src/models/models_0.ts
|
|
248
277
|
|
|
249
278
|
|
|
250
279
|
// src/models/BedrockRuntimeServiceException.ts
|
|
@@ -262,7 +291,6 @@ __name(_BedrockRuntimeServiceException, "BedrockRuntimeServiceException");
|
|
|
262
291
|
var BedrockRuntimeServiceException = _BedrockRuntimeServiceException;
|
|
263
292
|
|
|
264
293
|
// src/models/models_0.ts
|
|
265
|
-
|
|
266
294
|
var _AccessDeniedException = class _AccessDeniedException extends BedrockRuntimeServiceException {
|
|
267
295
|
/**
|
|
268
296
|
* @internal
|
|
@@ -280,16 +308,169 @@ var _AccessDeniedException = class _AccessDeniedException extends BedrockRuntime
|
|
|
280
308
|
};
|
|
281
309
|
__name(_AccessDeniedException, "AccessDeniedException");
|
|
282
310
|
var AccessDeniedException = _AccessDeniedException;
|
|
311
|
+
var AsyncInvokeOutputDataConfig;
|
|
312
|
+
((AsyncInvokeOutputDataConfig3) => {
|
|
313
|
+
AsyncInvokeOutputDataConfig3.visit = /* @__PURE__ */ __name((value, visitor) => {
|
|
314
|
+
if (value.s3OutputDataConfig !== void 0)
|
|
315
|
+
return visitor.s3OutputDataConfig(value.s3OutputDataConfig);
|
|
316
|
+
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
317
|
+
}, "visit");
|
|
318
|
+
})(AsyncInvokeOutputDataConfig || (AsyncInvokeOutputDataConfig = {}));
|
|
319
|
+
var AsyncInvokeStatus = {
|
|
320
|
+
COMPLETED: "Completed",
|
|
321
|
+
FAILED: "Failed",
|
|
322
|
+
IN_PROGRESS: "InProgress"
|
|
323
|
+
};
|
|
324
|
+
var _InternalServerException = class _InternalServerException extends BedrockRuntimeServiceException {
|
|
325
|
+
/**
|
|
326
|
+
* @internal
|
|
327
|
+
*/
|
|
328
|
+
constructor(opts) {
|
|
329
|
+
super({
|
|
330
|
+
name: "InternalServerException",
|
|
331
|
+
$fault: "server",
|
|
332
|
+
...opts
|
|
333
|
+
});
|
|
334
|
+
this.name = "InternalServerException";
|
|
335
|
+
this.$fault = "server";
|
|
336
|
+
Object.setPrototypeOf(this, _InternalServerException.prototype);
|
|
337
|
+
}
|
|
338
|
+
};
|
|
339
|
+
__name(_InternalServerException, "InternalServerException");
|
|
340
|
+
var InternalServerException = _InternalServerException;
|
|
341
|
+
var _ThrottlingException = class _ThrottlingException extends BedrockRuntimeServiceException {
|
|
342
|
+
/**
|
|
343
|
+
* @internal
|
|
344
|
+
*/
|
|
345
|
+
constructor(opts) {
|
|
346
|
+
super({
|
|
347
|
+
name: "ThrottlingException",
|
|
348
|
+
$fault: "client",
|
|
349
|
+
...opts
|
|
350
|
+
});
|
|
351
|
+
this.name = "ThrottlingException";
|
|
352
|
+
this.$fault = "client";
|
|
353
|
+
Object.setPrototypeOf(this, _ThrottlingException.prototype);
|
|
354
|
+
}
|
|
355
|
+
};
|
|
356
|
+
__name(_ThrottlingException, "ThrottlingException");
|
|
357
|
+
var ThrottlingException = _ThrottlingException;
|
|
358
|
+
var _ValidationException = class _ValidationException extends BedrockRuntimeServiceException {
|
|
359
|
+
/**
|
|
360
|
+
* @internal
|
|
361
|
+
*/
|
|
362
|
+
constructor(opts) {
|
|
363
|
+
super({
|
|
364
|
+
name: "ValidationException",
|
|
365
|
+
$fault: "client",
|
|
366
|
+
...opts
|
|
367
|
+
});
|
|
368
|
+
this.name = "ValidationException";
|
|
369
|
+
this.$fault = "client";
|
|
370
|
+
Object.setPrototypeOf(this, _ValidationException.prototype);
|
|
371
|
+
}
|
|
372
|
+
};
|
|
373
|
+
__name(_ValidationException, "ValidationException");
|
|
374
|
+
var ValidationException = _ValidationException;
|
|
375
|
+
var SortAsyncInvocationBy = {
|
|
376
|
+
SUBMISSION_TIME: "SubmissionTime"
|
|
377
|
+
};
|
|
378
|
+
var SortOrder = {
|
|
379
|
+
ASCENDING: "Ascending",
|
|
380
|
+
DESCENDING: "Descending"
|
|
381
|
+
};
|
|
382
|
+
var _ConflictException = class _ConflictException extends BedrockRuntimeServiceException {
|
|
383
|
+
/**
|
|
384
|
+
* @internal
|
|
385
|
+
*/
|
|
386
|
+
constructor(opts) {
|
|
387
|
+
super({
|
|
388
|
+
name: "ConflictException",
|
|
389
|
+
$fault: "client",
|
|
390
|
+
...opts
|
|
391
|
+
});
|
|
392
|
+
this.name = "ConflictException";
|
|
393
|
+
this.$fault = "client";
|
|
394
|
+
Object.setPrototypeOf(this, _ConflictException.prototype);
|
|
395
|
+
}
|
|
396
|
+
};
|
|
397
|
+
__name(_ConflictException, "ConflictException");
|
|
398
|
+
var ConflictException = _ConflictException;
|
|
399
|
+
var _ResourceNotFoundException = class _ResourceNotFoundException extends BedrockRuntimeServiceException {
|
|
400
|
+
/**
|
|
401
|
+
* @internal
|
|
402
|
+
*/
|
|
403
|
+
constructor(opts) {
|
|
404
|
+
super({
|
|
405
|
+
name: "ResourceNotFoundException",
|
|
406
|
+
$fault: "client",
|
|
407
|
+
...opts
|
|
408
|
+
});
|
|
409
|
+
this.name = "ResourceNotFoundException";
|
|
410
|
+
this.$fault = "client";
|
|
411
|
+
Object.setPrototypeOf(this, _ResourceNotFoundException.prototype);
|
|
412
|
+
}
|
|
413
|
+
};
|
|
414
|
+
__name(_ResourceNotFoundException, "ResourceNotFoundException");
|
|
415
|
+
var ResourceNotFoundException = _ResourceNotFoundException;
|
|
416
|
+
var _ServiceQuotaExceededException = class _ServiceQuotaExceededException extends BedrockRuntimeServiceException {
|
|
417
|
+
/**
|
|
418
|
+
* @internal
|
|
419
|
+
*/
|
|
420
|
+
constructor(opts) {
|
|
421
|
+
super({
|
|
422
|
+
name: "ServiceQuotaExceededException",
|
|
423
|
+
$fault: "client",
|
|
424
|
+
...opts
|
|
425
|
+
});
|
|
426
|
+
this.name = "ServiceQuotaExceededException";
|
|
427
|
+
this.$fault = "client";
|
|
428
|
+
Object.setPrototypeOf(this, _ServiceQuotaExceededException.prototype);
|
|
429
|
+
}
|
|
430
|
+
};
|
|
431
|
+
__name(_ServiceQuotaExceededException, "ServiceQuotaExceededException");
|
|
432
|
+
var ServiceQuotaExceededException = _ServiceQuotaExceededException;
|
|
433
|
+
var _ServiceUnavailableException = class _ServiceUnavailableException extends BedrockRuntimeServiceException {
|
|
434
|
+
/**
|
|
435
|
+
* @internal
|
|
436
|
+
*/
|
|
437
|
+
constructor(opts) {
|
|
438
|
+
super({
|
|
439
|
+
name: "ServiceUnavailableException",
|
|
440
|
+
$fault: "server",
|
|
441
|
+
...opts
|
|
442
|
+
});
|
|
443
|
+
this.name = "ServiceUnavailableException";
|
|
444
|
+
this.$fault = "server";
|
|
445
|
+
Object.setPrototypeOf(this, _ServiceUnavailableException.prototype);
|
|
446
|
+
}
|
|
447
|
+
};
|
|
448
|
+
__name(_ServiceUnavailableException, "ServiceUnavailableException");
|
|
449
|
+
var ServiceUnavailableException = _ServiceUnavailableException;
|
|
450
|
+
var GuardrailImageFormat = {
|
|
451
|
+
JPEG: "jpeg",
|
|
452
|
+
PNG: "png"
|
|
453
|
+
};
|
|
454
|
+
var GuardrailImageSource;
|
|
455
|
+
((GuardrailImageSource2) => {
|
|
456
|
+
GuardrailImageSource2.visit = /* @__PURE__ */ __name((value, visitor) => {
|
|
457
|
+
if (value.bytes !== void 0)
|
|
458
|
+
return visitor.bytes(value.bytes);
|
|
459
|
+
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
460
|
+
}, "visit");
|
|
461
|
+
})(GuardrailImageSource || (GuardrailImageSource = {}));
|
|
283
462
|
var GuardrailContentQualifier = {
|
|
284
463
|
GROUNDING_SOURCE: "grounding_source",
|
|
285
464
|
GUARD_CONTENT: "guard_content",
|
|
286
465
|
QUERY: "query"
|
|
287
466
|
};
|
|
288
467
|
var GuardrailContentBlock;
|
|
289
|
-
((
|
|
290
|
-
|
|
468
|
+
((GuardrailContentBlock2) => {
|
|
469
|
+
GuardrailContentBlock2.visit = /* @__PURE__ */ __name((value, visitor) => {
|
|
291
470
|
if (value.text !== void 0)
|
|
292
471
|
return visitor.text(value.text);
|
|
472
|
+
if (value.image !== void 0)
|
|
473
|
+
return visitor.image(value.image);
|
|
293
474
|
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
294
475
|
}, "visit");
|
|
295
476
|
})(GuardrailContentBlock || (GuardrailContentBlock = {}));
|
|
@@ -381,91 +562,6 @@ var GuardrailWordPolicyAction = {
|
|
|
381
562
|
var GuardrailManagedWordType = {
|
|
382
563
|
PROFANITY: "PROFANITY"
|
|
383
564
|
};
|
|
384
|
-
var _InternalServerException = class _InternalServerException extends BedrockRuntimeServiceException {
|
|
385
|
-
/**
|
|
386
|
-
* @internal
|
|
387
|
-
*/
|
|
388
|
-
constructor(opts) {
|
|
389
|
-
super({
|
|
390
|
-
name: "InternalServerException",
|
|
391
|
-
$fault: "server",
|
|
392
|
-
...opts
|
|
393
|
-
});
|
|
394
|
-
this.name = "InternalServerException";
|
|
395
|
-
this.$fault = "server";
|
|
396
|
-
Object.setPrototypeOf(this, _InternalServerException.prototype);
|
|
397
|
-
}
|
|
398
|
-
};
|
|
399
|
-
__name(_InternalServerException, "InternalServerException");
|
|
400
|
-
var InternalServerException = _InternalServerException;
|
|
401
|
-
var _ResourceNotFoundException = class _ResourceNotFoundException extends BedrockRuntimeServiceException {
|
|
402
|
-
/**
|
|
403
|
-
* @internal
|
|
404
|
-
*/
|
|
405
|
-
constructor(opts) {
|
|
406
|
-
super({
|
|
407
|
-
name: "ResourceNotFoundException",
|
|
408
|
-
$fault: "client",
|
|
409
|
-
...opts
|
|
410
|
-
});
|
|
411
|
-
this.name = "ResourceNotFoundException";
|
|
412
|
-
this.$fault = "client";
|
|
413
|
-
Object.setPrototypeOf(this, _ResourceNotFoundException.prototype);
|
|
414
|
-
}
|
|
415
|
-
};
|
|
416
|
-
__name(_ResourceNotFoundException, "ResourceNotFoundException");
|
|
417
|
-
var ResourceNotFoundException = _ResourceNotFoundException;
|
|
418
|
-
var _ServiceQuotaExceededException = class _ServiceQuotaExceededException extends BedrockRuntimeServiceException {
|
|
419
|
-
/**
|
|
420
|
-
* @internal
|
|
421
|
-
*/
|
|
422
|
-
constructor(opts) {
|
|
423
|
-
super({
|
|
424
|
-
name: "ServiceQuotaExceededException",
|
|
425
|
-
$fault: "client",
|
|
426
|
-
...opts
|
|
427
|
-
});
|
|
428
|
-
this.name = "ServiceQuotaExceededException";
|
|
429
|
-
this.$fault = "client";
|
|
430
|
-
Object.setPrototypeOf(this, _ServiceQuotaExceededException.prototype);
|
|
431
|
-
}
|
|
432
|
-
};
|
|
433
|
-
__name(_ServiceQuotaExceededException, "ServiceQuotaExceededException");
|
|
434
|
-
var ServiceQuotaExceededException = _ServiceQuotaExceededException;
|
|
435
|
-
var _ThrottlingException = class _ThrottlingException extends BedrockRuntimeServiceException {
|
|
436
|
-
/**
|
|
437
|
-
* @internal
|
|
438
|
-
*/
|
|
439
|
-
constructor(opts) {
|
|
440
|
-
super({
|
|
441
|
-
name: "ThrottlingException",
|
|
442
|
-
$fault: "client",
|
|
443
|
-
...opts
|
|
444
|
-
});
|
|
445
|
-
this.name = "ThrottlingException";
|
|
446
|
-
this.$fault = "client";
|
|
447
|
-
Object.setPrototypeOf(this, _ThrottlingException.prototype);
|
|
448
|
-
}
|
|
449
|
-
};
|
|
450
|
-
__name(_ThrottlingException, "ThrottlingException");
|
|
451
|
-
var ThrottlingException = _ThrottlingException;
|
|
452
|
-
var _ValidationException = class _ValidationException extends BedrockRuntimeServiceException {
|
|
453
|
-
/**
|
|
454
|
-
* @internal
|
|
455
|
-
*/
|
|
456
|
-
constructor(opts) {
|
|
457
|
-
super({
|
|
458
|
-
name: "ValidationException",
|
|
459
|
-
$fault: "client",
|
|
460
|
-
...opts
|
|
461
|
-
});
|
|
462
|
-
this.name = "ValidationException";
|
|
463
|
-
this.$fault = "client";
|
|
464
|
-
Object.setPrototypeOf(this, _ValidationException.prototype);
|
|
465
|
-
}
|
|
466
|
-
};
|
|
467
|
-
__name(_ValidationException, "ValidationException");
|
|
468
|
-
var ValidationException = _ValidationException;
|
|
469
565
|
var GuardrailTrace = {
|
|
470
566
|
DISABLED: "disabled",
|
|
471
567
|
ENABLED: "enabled"
|
|
@@ -489,16 +585,30 @@ var DocumentSource;
|
|
|
489
585
|
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
490
586
|
}, "visit");
|
|
491
587
|
})(DocumentSource || (DocumentSource = {}));
|
|
588
|
+
var GuardrailConverseImageFormat = {
|
|
589
|
+
JPEG: "jpeg",
|
|
590
|
+
PNG: "png"
|
|
591
|
+
};
|
|
592
|
+
var GuardrailConverseImageSource;
|
|
593
|
+
((GuardrailConverseImageSource2) => {
|
|
594
|
+
GuardrailConverseImageSource2.visit = /* @__PURE__ */ __name((value, visitor) => {
|
|
595
|
+
if (value.bytes !== void 0)
|
|
596
|
+
return visitor.bytes(value.bytes);
|
|
597
|
+
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
598
|
+
}, "visit");
|
|
599
|
+
})(GuardrailConverseImageSource || (GuardrailConverseImageSource = {}));
|
|
492
600
|
var GuardrailConverseContentQualifier = {
|
|
493
601
|
GROUNDING_SOURCE: "grounding_source",
|
|
494
602
|
GUARD_CONTENT: "guard_content",
|
|
495
603
|
QUERY: "query"
|
|
496
604
|
};
|
|
497
605
|
var GuardrailConverseContentBlock;
|
|
498
|
-
((
|
|
499
|
-
|
|
606
|
+
((GuardrailConverseContentBlock2) => {
|
|
607
|
+
GuardrailConverseContentBlock2.visit = /* @__PURE__ */ __name((value, visitor) => {
|
|
500
608
|
if (value.text !== void 0)
|
|
501
609
|
return visitor.text(value.text);
|
|
610
|
+
if (value.image !== void 0)
|
|
611
|
+
return visitor.image(value.image);
|
|
502
612
|
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
503
613
|
}, "visit");
|
|
504
614
|
})(GuardrailConverseContentBlock || (GuardrailConverseContentBlock = {}));
|
|
@@ -516,6 +626,27 @@ var ImageSource;
|
|
|
516
626
|
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
517
627
|
}, "visit");
|
|
518
628
|
})(ImageSource || (ImageSource = {}));
|
|
629
|
+
var VideoFormat = {
|
|
630
|
+
FLV: "flv",
|
|
631
|
+
MKV: "mkv",
|
|
632
|
+
MOV: "mov",
|
|
633
|
+
MP4: "mp4",
|
|
634
|
+
MPEG: "mpeg",
|
|
635
|
+
MPG: "mpg",
|
|
636
|
+
THREE_GP: "three_gp",
|
|
637
|
+
WEBM: "webm",
|
|
638
|
+
WMV: "wmv"
|
|
639
|
+
};
|
|
640
|
+
var VideoSource;
|
|
641
|
+
((VideoSource2) => {
|
|
642
|
+
VideoSource2.visit = /* @__PURE__ */ __name((value, visitor) => {
|
|
643
|
+
if (value.bytes !== void 0)
|
|
644
|
+
return visitor.bytes(value.bytes);
|
|
645
|
+
if (value.s3Location !== void 0)
|
|
646
|
+
return visitor.s3Location(value.s3Location);
|
|
647
|
+
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
648
|
+
}, "visit");
|
|
649
|
+
})(VideoSource || (VideoSource = {}));
|
|
519
650
|
var ToolResultContentBlock;
|
|
520
651
|
((ToolResultContentBlock2) => {
|
|
521
652
|
ToolResultContentBlock2.visit = /* @__PURE__ */ __name((value, visitor) => {
|
|
@@ -527,6 +658,8 @@ var ToolResultContentBlock;
|
|
|
527
658
|
return visitor.image(value.image);
|
|
528
659
|
if (value.document !== void 0)
|
|
529
660
|
return visitor.document(value.document);
|
|
661
|
+
if (value.video !== void 0)
|
|
662
|
+
return visitor.video(value.video);
|
|
530
663
|
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
531
664
|
}, "visit");
|
|
532
665
|
})(ToolResultContentBlock || (ToolResultContentBlock = {}));
|
|
@@ -543,6 +676,8 @@ var ContentBlock;
|
|
|
543
676
|
return visitor.image(value.image);
|
|
544
677
|
if (value.document !== void 0)
|
|
545
678
|
return visitor.document(value.document);
|
|
679
|
+
if (value.video !== void 0)
|
|
680
|
+
return visitor.video(value.video);
|
|
546
681
|
if (value.toolUse !== void 0)
|
|
547
682
|
return visitor.toolUse(value.toolUse);
|
|
548
683
|
if (value.toolResult !== void 0)
|
|
@@ -569,8 +704,8 @@ var PromptVariableValues;
|
|
|
569
704
|
}, "visit");
|
|
570
705
|
})(PromptVariableValues || (PromptVariableValues = {}));
|
|
571
706
|
var SystemContentBlock;
|
|
572
|
-
((
|
|
573
|
-
|
|
707
|
+
((SystemContentBlock2) => {
|
|
708
|
+
SystemContentBlock2.visit = /* @__PURE__ */ __name((value, visitor) => {
|
|
574
709
|
if (value.text !== void 0)
|
|
575
710
|
return visitor.text(value.text);
|
|
576
711
|
if (value.guardContent !== void 0)
|
|
@@ -676,23 +811,6 @@ var _ModelTimeoutException = class _ModelTimeoutException extends BedrockRuntime
|
|
|
676
811
|
};
|
|
677
812
|
__name(_ModelTimeoutException, "ModelTimeoutException");
|
|
678
813
|
var ModelTimeoutException = _ModelTimeoutException;
|
|
679
|
-
var _ServiceUnavailableException = class _ServiceUnavailableException extends BedrockRuntimeServiceException {
|
|
680
|
-
/**
|
|
681
|
-
* @internal
|
|
682
|
-
*/
|
|
683
|
-
constructor(opts) {
|
|
684
|
-
super({
|
|
685
|
-
name: "ServiceUnavailableException",
|
|
686
|
-
$fault: "server",
|
|
687
|
-
...opts
|
|
688
|
-
});
|
|
689
|
-
this.name = "ServiceUnavailableException";
|
|
690
|
-
this.$fault = "server";
|
|
691
|
-
Object.setPrototypeOf(this, _ServiceUnavailableException.prototype);
|
|
692
|
-
}
|
|
693
|
-
};
|
|
694
|
-
__name(_ServiceUnavailableException, "ServiceUnavailableException");
|
|
695
|
-
var ServiceUnavailableException = _ServiceUnavailableException;
|
|
696
814
|
var GuardrailStreamProcessingMode = {
|
|
697
815
|
ASYNC: "async",
|
|
698
816
|
SYNC: "sync"
|
|
@@ -786,19 +904,122 @@ var ResponseStream;
|
|
|
786
904
|
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
787
905
|
}, "visit");
|
|
788
906
|
})(ResponseStream || (ResponseStream = {}));
|
|
907
|
+
var GetAsyncInvokeResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
|
|
908
|
+
...obj,
|
|
909
|
+
...obj.failureMessage && { failureMessage: import_smithy_client.SENSITIVE_STRING },
|
|
910
|
+
...obj.outputDataConfig && { outputDataConfig: obj.outputDataConfig }
|
|
911
|
+
}), "GetAsyncInvokeResponseFilterSensitiveLog");
|
|
912
|
+
var AsyncInvokeSummaryFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
|
|
913
|
+
...obj,
|
|
914
|
+
...obj.failureMessage && { failureMessage: import_smithy_client.SENSITIVE_STRING },
|
|
915
|
+
...obj.outputDataConfig && { outputDataConfig: obj.outputDataConfig }
|
|
916
|
+
}), "AsyncInvokeSummaryFilterSensitiveLog");
|
|
917
|
+
var ListAsyncInvokesResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
|
|
918
|
+
...obj,
|
|
919
|
+
...obj.asyncInvokeSummaries && {
|
|
920
|
+
asyncInvokeSummaries: obj.asyncInvokeSummaries.map((item) => AsyncInvokeSummaryFilterSensitiveLog(item))
|
|
921
|
+
}
|
|
922
|
+
}), "ListAsyncInvokesResponseFilterSensitiveLog");
|
|
923
|
+
var StartAsyncInvokeRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
|
|
924
|
+
...obj,
|
|
925
|
+
...obj.modelInput && { modelInput: import_smithy_client.SENSITIVE_STRING },
|
|
926
|
+
...obj.outputDataConfig && { outputDataConfig: obj.outputDataConfig }
|
|
927
|
+
}), "StartAsyncInvokeRequestFilterSensitiveLog");
|
|
928
|
+
var GuardrailImageSourceFilterSensitiveLog = /* @__PURE__ */ __name((obj) => {
|
|
929
|
+
if (obj.bytes !== void 0)
|
|
930
|
+
return { bytes: obj.bytes };
|
|
931
|
+
if (obj.$unknown !== void 0)
|
|
932
|
+
return { [obj.$unknown[0]]: "UNKNOWN" };
|
|
933
|
+
}, "GuardrailImageSourceFilterSensitiveLog");
|
|
934
|
+
var GuardrailImageBlockFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
|
|
935
|
+
...obj,
|
|
936
|
+
...obj.source && { source: import_smithy_client.SENSITIVE_STRING }
|
|
937
|
+
}), "GuardrailImageBlockFilterSensitiveLog");
|
|
938
|
+
var GuardrailContentBlockFilterSensitiveLog = /* @__PURE__ */ __name((obj) => {
|
|
939
|
+
if (obj.text !== void 0)
|
|
940
|
+
return { text: obj.text };
|
|
941
|
+
if (obj.image !== void 0)
|
|
942
|
+
return { image: import_smithy_client.SENSITIVE_STRING };
|
|
943
|
+
if (obj.$unknown !== void 0)
|
|
944
|
+
return { [obj.$unknown[0]]: "UNKNOWN" };
|
|
945
|
+
}, "GuardrailContentBlockFilterSensitiveLog");
|
|
946
|
+
var ApplyGuardrailRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
|
|
947
|
+
...obj,
|
|
948
|
+
...obj.content && { content: obj.content.map((item) => GuardrailContentBlockFilterSensitiveLog(item)) }
|
|
949
|
+
}), "ApplyGuardrailRequestFilterSensitiveLog");
|
|
950
|
+
var GuardrailConverseImageSourceFilterSensitiveLog = /* @__PURE__ */ __name((obj) => {
|
|
951
|
+
if (obj.bytes !== void 0)
|
|
952
|
+
return { bytes: obj.bytes };
|
|
953
|
+
if (obj.$unknown !== void 0)
|
|
954
|
+
return { [obj.$unknown[0]]: "UNKNOWN" };
|
|
955
|
+
}, "GuardrailConverseImageSourceFilterSensitiveLog");
|
|
956
|
+
var GuardrailConverseImageBlockFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
|
|
957
|
+
...obj,
|
|
958
|
+
...obj.source && { source: import_smithy_client.SENSITIVE_STRING }
|
|
959
|
+
}), "GuardrailConverseImageBlockFilterSensitiveLog");
|
|
960
|
+
var GuardrailConverseContentBlockFilterSensitiveLog = /* @__PURE__ */ __name((obj) => {
|
|
961
|
+
if (obj.text !== void 0)
|
|
962
|
+
return { text: obj.text };
|
|
963
|
+
if (obj.image !== void 0)
|
|
964
|
+
return { image: import_smithy_client.SENSITIVE_STRING };
|
|
965
|
+
if (obj.$unknown !== void 0)
|
|
966
|
+
return { [obj.$unknown[0]]: "UNKNOWN" };
|
|
967
|
+
}, "GuardrailConverseContentBlockFilterSensitiveLog");
|
|
968
|
+
var ContentBlockFilterSensitiveLog = /* @__PURE__ */ __name((obj) => {
|
|
969
|
+
if (obj.text !== void 0)
|
|
970
|
+
return { text: obj.text };
|
|
971
|
+
if (obj.image !== void 0)
|
|
972
|
+
return { image: obj.image };
|
|
973
|
+
if (obj.document !== void 0)
|
|
974
|
+
return { document: obj.document };
|
|
975
|
+
if (obj.video !== void 0)
|
|
976
|
+
return { video: obj.video };
|
|
977
|
+
if (obj.toolUse !== void 0)
|
|
978
|
+
return { toolUse: obj.toolUse };
|
|
979
|
+
if (obj.toolResult !== void 0)
|
|
980
|
+
return { toolResult: obj.toolResult };
|
|
981
|
+
if (obj.guardContent !== void 0)
|
|
982
|
+
return { guardContent: GuardrailConverseContentBlockFilterSensitiveLog(obj.guardContent) };
|
|
983
|
+
if (obj.$unknown !== void 0)
|
|
984
|
+
return { [obj.$unknown[0]]: "UNKNOWN" };
|
|
985
|
+
}, "ContentBlockFilterSensitiveLog");
|
|
986
|
+
var MessageFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
|
|
987
|
+
...obj,
|
|
988
|
+
...obj.content && { content: obj.content.map((item) => ContentBlockFilterSensitiveLog(item)) }
|
|
989
|
+
}), "MessageFilterSensitiveLog");
|
|
990
|
+
var SystemContentBlockFilterSensitiveLog = /* @__PURE__ */ __name((obj) => {
|
|
991
|
+
if (obj.text !== void 0)
|
|
992
|
+
return { text: obj.text };
|
|
993
|
+
if (obj.guardContent !== void 0)
|
|
994
|
+
return { guardContent: GuardrailConverseContentBlockFilterSensitiveLog(obj.guardContent) };
|
|
995
|
+
if (obj.$unknown !== void 0)
|
|
996
|
+
return { [obj.$unknown[0]]: "UNKNOWN" };
|
|
997
|
+
}, "SystemContentBlockFilterSensitiveLog");
|
|
789
998
|
var ConverseRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
|
|
790
999
|
...obj,
|
|
791
|
-
...obj.messages && { messages: obj.messages.map((item) => item) },
|
|
792
|
-
...obj.system && { system: obj.system.map((item) => item) },
|
|
1000
|
+
...obj.messages && { messages: obj.messages.map((item) => MessageFilterSensitiveLog(item)) },
|
|
1001
|
+
...obj.system && { system: obj.system.map((item) => SystemContentBlockFilterSensitiveLog(item)) },
|
|
793
1002
|
...obj.toolConfig && { toolConfig: obj.toolConfig },
|
|
794
|
-
...obj.promptVariables && { promptVariables: import_smithy_client.SENSITIVE_STRING }
|
|
1003
|
+
...obj.promptVariables && { promptVariables: import_smithy_client.SENSITIVE_STRING },
|
|
1004
|
+
...obj.requestMetadata && { requestMetadata: import_smithy_client.SENSITIVE_STRING }
|
|
795
1005
|
}), "ConverseRequestFilterSensitiveLog");
|
|
1006
|
+
var ConverseOutputFilterSensitiveLog = /* @__PURE__ */ __name((obj) => {
|
|
1007
|
+
if (obj.message !== void 0)
|
|
1008
|
+
return { message: MessageFilterSensitiveLog(obj.message) };
|
|
1009
|
+
if (obj.$unknown !== void 0)
|
|
1010
|
+
return { [obj.$unknown[0]]: "UNKNOWN" };
|
|
1011
|
+
}, "ConverseOutputFilterSensitiveLog");
|
|
1012
|
+
var ConverseResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
|
|
1013
|
+
...obj,
|
|
1014
|
+
...obj.output && { output: ConverseOutputFilterSensitiveLog(obj.output) }
|
|
1015
|
+
}), "ConverseResponseFilterSensitiveLog");
|
|
796
1016
|
var ConverseStreamRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
|
|
797
1017
|
...obj,
|
|
798
|
-
...obj.messages && { messages: obj.messages.map((item) => item) },
|
|
799
|
-
...obj.system && { system: obj.system.map((item) => item) },
|
|
1018
|
+
...obj.messages && { messages: obj.messages.map((item) => MessageFilterSensitiveLog(item)) },
|
|
1019
|
+
...obj.system && { system: obj.system.map((item) => SystemContentBlockFilterSensitiveLog(item)) },
|
|
800
1020
|
...obj.toolConfig && { toolConfig: obj.toolConfig },
|
|
801
|
-
...obj.promptVariables && { promptVariables: import_smithy_client.SENSITIVE_STRING }
|
|
1021
|
+
...obj.promptVariables && { promptVariables: import_smithy_client.SENSITIVE_STRING },
|
|
1022
|
+
...obj.requestMetadata && { requestMetadata: import_smithy_client.SENSITIVE_STRING }
|
|
802
1023
|
}), "ConverseStreamRequestFilterSensitiveLog");
|
|
803
1024
|
var ConverseStreamOutputFilterSensitiveLog = /* @__PURE__ */ __name((obj) => {
|
|
804
1025
|
if (obj.messageStart !== void 0)
|
|
@@ -870,6 +1091,10 @@ var InvokeModelWithResponseStreamResponseFilterSensitiveLog = /* @__PURE__ */ __
|
|
|
870
1091
|
}), "InvokeModelWithResponseStreamResponseFilterSensitiveLog");
|
|
871
1092
|
|
|
872
1093
|
// src/protocols/Aws_restJson1.ts
|
|
1094
|
+
var import_core2 = require("@aws-sdk/core");
|
|
1095
|
+
|
|
1096
|
+
|
|
1097
|
+
var import_uuid = require("uuid");
|
|
873
1098
|
var se_ApplyGuardrailCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
874
1099
|
const b = (0, import_core.requestBuilder)(input, context);
|
|
875
1100
|
const headers = {
|
|
@@ -881,7 +1106,7 @@ var se_ApplyGuardrailCommand = /* @__PURE__ */ __name(async (input, context) =>
|
|
|
881
1106
|
let body;
|
|
882
1107
|
body = JSON.stringify(
|
|
883
1108
|
(0, import_smithy_client.take)(input, {
|
|
884
|
-
content: (_) => (
|
|
1109
|
+
content: (_) => se_GuardrailContentBlockList(_, context),
|
|
885
1110
|
source: []
|
|
886
1111
|
})
|
|
887
1112
|
);
|
|
@@ -905,7 +1130,8 @@ var se_ConverseCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
|
905
1130
|
messages: (_) => se_Messages(_, context),
|
|
906
1131
|
performanceConfig: (_) => (0, import_smithy_client._json)(_),
|
|
907
1132
|
promptVariables: (_) => (0, import_smithy_client._json)(_),
|
|
908
|
-
|
|
1133
|
+
requestMetadata: (_) => (0, import_smithy_client._json)(_),
|
|
1134
|
+
system: (_) => se_SystemContentBlocks(_, context),
|
|
909
1135
|
toolConfig: (_) => se_ToolConfiguration(_, context)
|
|
910
1136
|
})
|
|
911
1137
|
);
|
|
@@ -929,13 +1155,23 @@ var se_ConverseStreamCommand = /* @__PURE__ */ __name(async (input, context) =>
|
|
|
929
1155
|
messages: (_) => se_Messages(_, context),
|
|
930
1156
|
performanceConfig: (_) => (0, import_smithy_client._json)(_),
|
|
931
1157
|
promptVariables: (_) => (0, import_smithy_client._json)(_),
|
|
932
|
-
|
|
1158
|
+
requestMetadata: (_) => (0, import_smithy_client._json)(_),
|
|
1159
|
+
system: (_) => se_SystemContentBlocks(_, context),
|
|
933
1160
|
toolConfig: (_) => se_ToolConfiguration(_, context)
|
|
934
1161
|
})
|
|
935
1162
|
);
|
|
936
1163
|
b.m("POST").h(headers).b(body);
|
|
937
1164
|
return b.build();
|
|
938
1165
|
}, "se_ConverseStreamCommand");
|
|
1166
|
+
var se_GetAsyncInvokeCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
1167
|
+
const b = (0, import_core.requestBuilder)(input, context);
|
|
1168
|
+
const headers = {};
|
|
1169
|
+
b.bp("/async-invoke/{invocationArn}");
|
|
1170
|
+
b.p("invocationArn", () => input.invocationArn, "{invocationArn}", false);
|
|
1171
|
+
let body;
|
|
1172
|
+
b.m("GET").h(headers).b(body);
|
|
1173
|
+
return b.build();
|
|
1174
|
+
}, "se_GetAsyncInvokeCommand");
|
|
939
1175
|
var se_InvokeModelCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
940
1176
|
const b = (0, import_core.requestBuilder)(input, context);
|
|
941
1177
|
const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
|
|
@@ -974,6 +1210,42 @@ var se_InvokeModelWithResponseStreamCommand = /* @__PURE__ */ __name(async (inpu
|
|
|
974
1210
|
b.m("POST").h(headers).b(body);
|
|
975
1211
|
return b.build();
|
|
976
1212
|
}, "se_InvokeModelWithResponseStreamCommand");
|
|
1213
|
+
var se_ListAsyncInvokesCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
1214
|
+
const b = (0, import_core.requestBuilder)(input, context);
|
|
1215
|
+
const headers = {};
|
|
1216
|
+
b.bp("/async-invoke");
|
|
1217
|
+
const query = (0, import_smithy_client.map)({
|
|
1218
|
+
[_sTA]: [() => input.submitTimeAfter !== void 0, () => (0, import_smithy_client.serializeDateTime)(input[_sTA]).toString()],
|
|
1219
|
+
[_sTB]: [() => input.submitTimeBefore !== void 0, () => (0, import_smithy_client.serializeDateTime)(input[_sTB]).toString()],
|
|
1220
|
+
[_sE]: [, input[_sE]],
|
|
1221
|
+
[_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
|
|
1222
|
+
[_nT]: [, input[_nT]],
|
|
1223
|
+
[_sB]: [, input[_sB]],
|
|
1224
|
+
[_sO]: [, input[_sO]]
|
|
1225
|
+
});
|
|
1226
|
+
let body;
|
|
1227
|
+
b.m("GET").h(headers).q(query).b(body);
|
|
1228
|
+
return b.build();
|
|
1229
|
+
}, "se_ListAsyncInvokesCommand");
|
|
1230
|
+
var se_StartAsyncInvokeCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
1231
|
+
const b = (0, import_core.requestBuilder)(input, context);
|
|
1232
|
+
const headers = {
|
|
1233
|
+
"content-type": "application/json"
|
|
1234
|
+
};
|
|
1235
|
+
b.bp("/async-invoke");
|
|
1236
|
+
let body;
|
|
1237
|
+
body = JSON.stringify(
|
|
1238
|
+
(0, import_smithy_client.take)(input, {
|
|
1239
|
+
clientRequestToken: [true, (_) => _ ?? (0, import_uuid.v4)()],
|
|
1240
|
+
modelId: [],
|
|
1241
|
+
modelInput: (_) => se_ModelInputPayload(_, context),
|
|
1242
|
+
outputDataConfig: (_) => (0, import_smithy_client._json)(_),
|
|
1243
|
+
tags: (_) => (0, import_smithy_client._json)(_)
|
|
1244
|
+
})
|
|
1245
|
+
);
|
|
1246
|
+
b.m("POST").h(headers).b(body);
|
|
1247
|
+
return b.build();
|
|
1248
|
+
}, "se_StartAsyncInvokeCommand");
|
|
977
1249
|
var de_ApplyGuardrailCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
978
1250
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
979
1251
|
return de_CommandError(output, context);
|
|
@@ -1023,6 +1295,28 @@ var de_ConverseStreamCommand = /* @__PURE__ */ __name(async (output, context) =>
|
|
|
1023
1295
|
contents.stream = de_ConverseStreamOutput(data, context);
|
|
1024
1296
|
return contents;
|
|
1025
1297
|
}, "de_ConverseStreamCommand");
|
|
1298
|
+
var de_GetAsyncInvokeCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
1299
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1300
|
+
return de_CommandError(output, context);
|
|
1301
|
+
}
|
|
1302
|
+
const contents = (0, import_smithy_client.map)({
|
|
1303
|
+
$metadata: deserializeMetadata(output)
|
|
1304
|
+
});
|
|
1305
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
1306
|
+
const doc = (0, import_smithy_client.take)(data, {
|
|
1307
|
+
clientRequestToken: import_smithy_client.expectString,
|
|
1308
|
+
endTime: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(_)),
|
|
1309
|
+
failureMessage: import_smithy_client.expectString,
|
|
1310
|
+
invocationArn: import_smithy_client.expectString,
|
|
1311
|
+
lastModifiedTime: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(_)),
|
|
1312
|
+
modelArn: import_smithy_client.expectString,
|
|
1313
|
+
outputDataConfig: (_) => (0, import_smithy_client._json)((0, import_core2.awsExpectUnion)(_)),
|
|
1314
|
+
status: import_smithy_client.expectString,
|
|
1315
|
+
submitTime: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(_))
|
|
1316
|
+
});
|
|
1317
|
+
Object.assign(contents, doc);
|
|
1318
|
+
return contents;
|
|
1319
|
+
}, "de_GetAsyncInvokeCommand");
|
|
1026
1320
|
var de_InvokeModelCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
1027
1321
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1028
1322
|
return de_CommandError(output, context);
|
|
@@ -1049,6 +1343,35 @@ var de_InvokeModelWithResponseStreamCommand = /* @__PURE__ */ __name(async (outp
|
|
|
1049
1343
|
contents.body = de_ResponseStream(data, context);
|
|
1050
1344
|
return contents;
|
|
1051
1345
|
}, "de_InvokeModelWithResponseStreamCommand");
|
|
1346
|
+
var de_ListAsyncInvokesCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
1347
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1348
|
+
return de_CommandError(output, context);
|
|
1349
|
+
}
|
|
1350
|
+
const contents = (0, import_smithy_client.map)({
|
|
1351
|
+
$metadata: deserializeMetadata(output)
|
|
1352
|
+
});
|
|
1353
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
1354
|
+
const doc = (0, import_smithy_client.take)(data, {
|
|
1355
|
+
asyncInvokeSummaries: (_) => de_AsyncInvokeSummaries(_, context),
|
|
1356
|
+
nextToken: import_smithy_client.expectString
|
|
1357
|
+
});
|
|
1358
|
+
Object.assign(contents, doc);
|
|
1359
|
+
return contents;
|
|
1360
|
+
}, "de_ListAsyncInvokesCommand");
|
|
1361
|
+
var de_StartAsyncInvokeCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
1362
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1363
|
+
return de_CommandError(output, context);
|
|
1364
|
+
}
|
|
1365
|
+
const contents = (0, import_smithy_client.map)({
|
|
1366
|
+
$metadata: deserializeMetadata(output)
|
|
1367
|
+
});
|
|
1368
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
1369
|
+
const doc = (0, import_smithy_client.take)(data, {
|
|
1370
|
+
invocationArn: import_smithy_client.expectString
|
|
1371
|
+
});
|
|
1372
|
+
Object.assign(contents, doc);
|
|
1373
|
+
return contents;
|
|
1374
|
+
}, "de_StartAsyncInvokeCommand");
|
|
1052
1375
|
var de_CommandError = /* @__PURE__ */ __name(async (output, context) => {
|
|
1053
1376
|
const parsedOutput = {
|
|
1054
1377
|
...output,
|
|
@@ -1089,6 +1412,9 @@ var de_CommandError = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
1089
1412
|
case "ModelStreamErrorException":
|
|
1090
1413
|
case "com.amazonaws.bedrockruntime#ModelStreamErrorException":
|
|
1091
1414
|
throw await de_ModelStreamErrorExceptionRes(parsedOutput, context);
|
|
1415
|
+
case "ConflictException":
|
|
1416
|
+
case "com.amazonaws.bedrockruntime#ConflictException":
|
|
1417
|
+
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
1092
1418
|
default:
|
|
1093
1419
|
const parsedBody = parsedOutput.body;
|
|
1094
1420
|
return throwDefaultError({
|
|
@@ -1112,6 +1438,19 @@ var de_AccessDeniedExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, co
|
|
|
1112
1438
|
});
|
|
1113
1439
|
return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
|
|
1114
1440
|
}, "de_AccessDeniedExceptionRes");
|
|
1441
|
+
var de_ConflictExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
|
|
1442
|
+
const contents = (0, import_smithy_client.map)({});
|
|
1443
|
+
const data = parsedOutput.body;
|
|
1444
|
+
const doc = (0, import_smithy_client.take)(data, {
|
|
1445
|
+
message: import_smithy_client.expectString
|
|
1446
|
+
});
|
|
1447
|
+
Object.assign(contents, doc);
|
|
1448
|
+
const exception = new ConflictException({
|
|
1449
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1450
|
+
...contents
|
|
1451
|
+
});
|
|
1452
|
+
return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
|
|
1453
|
+
}, "de_ConflictExceptionRes");
|
|
1115
1454
|
var de_InternalServerExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
|
|
1116
1455
|
const contents = (0, import_smithy_client.map)({});
|
|
1117
1456
|
const data = parsedOutput.body;
|
|
@@ -1445,11 +1784,12 @@ var de_ValidationException_event = /* @__PURE__ */ __name(async (output, context
|
|
|
1445
1784
|
var se_ContentBlock = /* @__PURE__ */ __name((input, context) => {
|
|
1446
1785
|
return ContentBlock.visit(input, {
|
|
1447
1786
|
document: (value) => ({ document: se_DocumentBlock(value, context) }),
|
|
1448
|
-
guardContent: (value) => ({ guardContent: (
|
|
1787
|
+
guardContent: (value) => ({ guardContent: se_GuardrailConverseContentBlock(value, context) }),
|
|
1449
1788
|
image: (value) => ({ image: se_ImageBlock(value, context) }),
|
|
1450
1789
|
text: (value) => ({ text: value }),
|
|
1451
1790
|
toolResult: (value) => ({ toolResult: se_ToolResultBlock(value, context) }),
|
|
1452
1791
|
toolUse: (value) => ({ toolUse: se_ToolUseBlock(value, context) }),
|
|
1792
|
+
video: (value) => ({ video: se_VideoBlock(value, context) }),
|
|
1453
1793
|
_: (name, value) => ({ name: value })
|
|
1454
1794
|
});
|
|
1455
1795
|
}, "se_ContentBlock");
|
|
@@ -1471,6 +1811,49 @@ var se_DocumentSource = /* @__PURE__ */ __name((input, context) => {
|
|
|
1471
1811
|
_: (name, value) => ({ name: value })
|
|
1472
1812
|
});
|
|
1473
1813
|
}, "se_DocumentSource");
|
|
1814
|
+
var se_GuardrailContentBlock = /* @__PURE__ */ __name((input, context) => {
|
|
1815
|
+
return GuardrailContentBlock.visit(input, {
|
|
1816
|
+
image: (value) => ({ image: se_GuardrailImageBlock(value, context) }),
|
|
1817
|
+
text: (value) => ({ text: (0, import_smithy_client._json)(value) }),
|
|
1818
|
+
_: (name, value) => ({ name: value })
|
|
1819
|
+
});
|
|
1820
|
+
}, "se_GuardrailContentBlock");
|
|
1821
|
+
var se_GuardrailContentBlockList = /* @__PURE__ */ __name((input, context) => {
|
|
1822
|
+
return input.filter((e) => e != null).map((entry) => {
|
|
1823
|
+
return se_GuardrailContentBlock(entry, context);
|
|
1824
|
+
});
|
|
1825
|
+
}, "se_GuardrailContentBlockList");
|
|
1826
|
+
var se_GuardrailConverseContentBlock = /* @__PURE__ */ __name((input, context) => {
|
|
1827
|
+
return GuardrailConverseContentBlock.visit(input, {
|
|
1828
|
+
image: (value) => ({ image: se_GuardrailConverseImageBlock(value, context) }),
|
|
1829
|
+
text: (value) => ({ text: (0, import_smithy_client._json)(value) }),
|
|
1830
|
+
_: (name, value) => ({ name: value })
|
|
1831
|
+
});
|
|
1832
|
+
}, "se_GuardrailConverseContentBlock");
|
|
1833
|
+
var se_GuardrailConverseImageBlock = /* @__PURE__ */ __name((input, context) => {
|
|
1834
|
+
return (0, import_smithy_client.take)(input, {
|
|
1835
|
+
format: [],
|
|
1836
|
+
source: (_) => se_GuardrailConverseImageSource(_, context)
|
|
1837
|
+
});
|
|
1838
|
+
}, "se_GuardrailConverseImageBlock");
|
|
1839
|
+
var se_GuardrailConverseImageSource = /* @__PURE__ */ __name((input, context) => {
|
|
1840
|
+
return GuardrailConverseImageSource.visit(input, {
|
|
1841
|
+
bytes: (value) => ({ bytes: context.base64Encoder(value) }),
|
|
1842
|
+
_: (name, value) => ({ name: value })
|
|
1843
|
+
});
|
|
1844
|
+
}, "se_GuardrailConverseImageSource");
|
|
1845
|
+
var se_GuardrailImageBlock = /* @__PURE__ */ __name((input, context) => {
|
|
1846
|
+
return (0, import_smithy_client.take)(input, {
|
|
1847
|
+
format: [],
|
|
1848
|
+
source: (_) => se_GuardrailImageSource(_, context)
|
|
1849
|
+
});
|
|
1850
|
+
}, "se_GuardrailImageBlock");
|
|
1851
|
+
var se_GuardrailImageSource = /* @__PURE__ */ __name((input, context) => {
|
|
1852
|
+
return GuardrailImageSource.visit(input, {
|
|
1853
|
+
bytes: (value) => ({ bytes: context.base64Encoder(value) }),
|
|
1854
|
+
_: (name, value) => ({ name: value })
|
|
1855
|
+
});
|
|
1856
|
+
}, "se_GuardrailImageSource");
|
|
1474
1857
|
var se_ImageBlock = /* @__PURE__ */ __name((input, context) => {
|
|
1475
1858
|
return (0, import_smithy_client.take)(input, {
|
|
1476
1859
|
format: [],
|
|
@@ -1502,6 +1885,21 @@ var se_Messages = /* @__PURE__ */ __name((input, context) => {
|
|
|
1502
1885
|
return se_Message(entry, context);
|
|
1503
1886
|
});
|
|
1504
1887
|
}, "se_Messages");
|
|
1888
|
+
var se_ModelInputPayload = /* @__PURE__ */ __name((input, context) => {
|
|
1889
|
+
return input;
|
|
1890
|
+
}, "se_ModelInputPayload");
|
|
1891
|
+
var se_SystemContentBlock = /* @__PURE__ */ __name((input, context) => {
|
|
1892
|
+
return SystemContentBlock.visit(input, {
|
|
1893
|
+
guardContent: (value) => ({ guardContent: se_GuardrailConverseContentBlock(value, context) }),
|
|
1894
|
+
text: (value) => ({ text: value }),
|
|
1895
|
+
_: (name, value) => ({ name: value })
|
|
1896
|
+
});
|
|
1897
|
+
}, "se_SystemContentBlock");
|
|
1898
|
+
var se_SystemContentBlocks = /* @__PURE__ */ __name((input, context) => {
|
|
1899
|
+
return input.filter((e) => e != null).map((entry) => {
|
|
1900
|
+
return se_SystemContentBlock(entry, context);
|
|
1901
|
+
});
|
|
1902
|
+
}, "se_SystemContentBlocks");
|
|
1505
1903
|
var se_Tool = /* @__PURE__ */ __name((input, context) => {
|
|
1506
1904
|
return Tool.visit(input, {
|
|
1507
1905
|
toolSpec: (value) => ({ toolSpec: se_ToolSpecification(value, context) }),
|
|
@@ -1533,6 +1931,7 @@ var se_ToolResultContentBlock = /* @__PURE__ */ __name((input, context) => {
|
|
|
1533
1931
|
image: (value) => ({ image: se_ImageBlock(value, context) }),
|
|
1534
1932
|
json: (value) => ({ json: se_Document(value, context) }),
|
|
1535
1933
|
text: (value) => ({ text: value }),
|
|
1934
|
+
video: (value) => ({ video: se_VideoBlock(value, context) }),
|
|
1536
1935
|
_: (name, value) => ({ name: value })
|
|
1537
1936
|
});
|
|
1538
1937
|
}, "se_ToolResultContentBlock");
|
|
@@ -1560,9 +1959,41 @@ var se_ToolUseBlock = /* @__PURE__ */ __name((input, context) => {
|
|
|
1560
1959
|
toolUseId: []
|
|
1561
1960
|
});
|
|
1562
1961
|
}, "se_ToolUseBlock");
|
|
1962
|
+
var se_VideoBlock = /* @__PURE__ */ __name((input, context) => {
|
|
1963
|
+
return (0, import_smithy_client.take)(input, {
|
|
1964
|
+
format: [],
|
|
1965
|
+
source: (_) => se_VideoSource(_, context)
|
|
1966
|
+
});
|
|
1967
|
+
}, "se_VideoBlock");
|
|
1968
|
+
var se_VideoSource = /* @__PURE__ */ __name((input, context) => {
|
|
1969
|
+
return VideoSource.visit(input, {
|
|
1970
|
+
bytes: (value) => ({ bytes: context.base64Encoder(value) }),
|
|
1971
|
+
s3Location: (value) => ({ s3Location: (0, import_smithy_client._json)(value) }),
|
|
1972
|
+
_: (name, value) => ({ name: value })
|
|
1973
|
+
});
|
|
1974
|
+
}, "se_VideoSource");
|
|
1563
1975
|
var se_Document = /* @__PURE__ */ __name((input, context) => {
|
|
1564
1976
|
return input;
|
|
1565
1977
|
}, "se_Document");
|
|
1978
|
+
var de_AsyncInvokeSummaries = /* @__PURE__ */ __name((output, context) => {
|
|
1979
|
+
const retVal = (output || []).filter((e) => e != null).map((entry) => {
|
|
1980
|
+
return de_AsyncInvokeSummary(entry, context);
|
|
1981
|
+
});
|
|
1982
|
+
return retVal;
|
|
1983
|
+
}, "de_AsyncInvokeSummaries");
|
|
1984
|
+
var de_AsyncInvokeSummary = /* @__PURE__ */ __name((output, context) => {
|
|
1985
|
+
return (0, import_smithy_client.take)(output, {
|
|
1986
|
+
clientRequestToken: import_smithy_client.expectString,
|
|
1987
|
+
endTime: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(_)),
|
|
1988
|
+
failureMessage: import_smithy_client.expectString,
|
|
1989
|
+
invocationArn: import_smithy_client.expectString,
|
|
1990
|
+
lastModifiedTime: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(_)),
|
|
1991
|
+
modelArn: import_smithy_client.expectString,
|
|
1992
|
+
outputDataConfig: (_) => (0, import_smithy_client._json)((0, import_core2.awsExpectUnion)(_)),
|
|
1993
|
+
status: import_smithy_client.expectString,
|
|
1994
|
+
submitTime: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(_))
|
|
1995
|
+
});
|
|
1996
|
+
}, "de_AsyncInvokeSummary");
|
|
1566
1997
|
var de_ContentBlock = /* @__PURE__ */ __name((output, context) => {
|
|
1567
1998
|
if (output.document != null) {
|
|
1568
1999
|
return {
|
|
@@ -1571,7 +2002,7 @@ var de_ContentBlock = /* @__PURE__ */ __name((output, context) => {
|
|
|
1571
2002
|
}
|
|
1572
2003
|
if (output.guardContent != null) {
|
|
1573
2004
|
return {
|
|
1574
|
-
guardContent: (
|
|
2005
|
+
guardContent: de_GuardrailConverseContentBlock((0, import_core2.awsExpectUnion)(output.guardContent), context)
|
|
1575
2006
|
};
|
|
1576
2007
|
}
|
|
1577
2008
|
if (output.image != null) {
|
|
@@ -1592,6 +2023,11 @@ var de_ContentBlock = /* @__PURE__ */ __name((output, context) => {
|
|
|
1592
2023
|
toolUse: de_ToolUseBlock(output.toolUse, context)
|
|
1593
2024
|
};
|
|
1594
2025
|
}
|
|
2026
|
+
if (output.video != null) {
|
|
2027
|
+
return {
|
|
2028
|
+
video: de_VideoBlock(output.video, context)
|
|
2029
|
+
};
|
|
2030
|
+
}
|
|
1595
2031
|
return { $unknown: Object.entries(output)[0] };
|
|
1596
2032
|
}, "de_ContentBlock");
|
|
1597
2033
|
var de_ContentBlocks = /* @__PURE__ */ __name((output, context) => {
|
|
@@ -1618,12 +2054,14 @@ var de_ConverseStreamMetadataEvent = /* @__PURE__ */ __name((output, context) =>
|
|
|
1618
2054
|
}, "de_ConverseStreamMetadataEvent");
|
|
1619
2055
|
var de_ConverseStreamTrace = /* @__PURE__ */ __name((output, context) => {
|
|
1620
2056
|
return (0, import_smithy_client.take)(output, {
|
|
1621
|
-
guardrail: (_) => de_GuardrailTraceAssessment(_, context)
|
|
2057
|
+
guardrail: (_) => de_GuardrailTraceAssessment(_, context),
|
|
2058
|
+
promptRouter: import_smithy_client._json
|
|
1622
2059
|
});
|
|
1623
2060
|
}, "de_ConverseStreamTrace");
|
|
1624
2061
|
var de_ConverseTrace = /* @__PURE__ */ __name((output, context) => {
|
|
1625
2062
|
return (0, import_smithy_client.take)(output, {
|
|
1626
|
-
guardrail: (_) => de_GuardrailTraceAssessment(_, context)
|
|
2063
|
+
guardrail: (_) => de_GuardrailTraceAssessment(_, context),
|
|
2064
|
+
promptRouter: import_smithy_client._json
|
|
1627
2065
|
});
|
|
1628
2066
|
}, "de_ConverseTrace");
|
|
1629
2067
|
var de_DocumentBlock = /* @__PURE__ */ __name((output, context) => {
|
|
@@ -1694,6 +2132,33 @@ var de_GuardrailContextualGroundingPolicyAssessment = /* @__PURE__ */ __name((ou
|
|
|
1694
2132
|
filters: (_) => de_GuardrailContextualGroundingFilters(_, context)
|
|
1695
2133
|
});
|
|
1696
2134
|
}, "de_GuardrailContextualGroundingPolicyAssessment");
|
|
2135
|
+
var de_GuardrailConverseContentBlock = /* @__PURE__ */ __name((output, context) => {
|
|
2136
|
+
if (output.image != null) {
|
|
2137
|
+
return {
|
|
2138
|
+
image: de_GuardrailConverseImageBlock(output.image, context)
|
|
2139
|
+
};
|
|
2140
|
+
}
|
|
2141
|
+
if (output.text != null) {
|
|
2142
|
+
return {
|
|
2143
|
+
text: (0, import_smithy_client._json)(output.text)
|
|
2144
|
+
};
|
|
2145
|
+
}
|
|
2146
|
+
return { $unknown: Object.entries(output)[0] };
|
|
2147
|
+
}, "de_GuardrailConverseContentBlock");
|
|
2148
|
+
var de_GuardrailConverseImageBlock = /* @__PURE__ */ __name((output, context) => {
|
|
2149
|
+
return (0, import_smithy_client.take)(output, {
|
|
2150
|
+
format: import_smithy_client.expectString,
|
|
2151
|
+
source: (_) => de_GuardrailConverseImageSource((0, import_core2.awsExpectUnion)(_), context)
|
|
2152
|
+
});
|
|
2153
|
+
}, "de_GuardrailConverseImageBlock");
|
|
2154
|
+
var de_GuardrailConverseImageSource = /* @__PURE__ */ __name((output, context) => {
|
|
2155
|
+
if (output.bytes != null) {
|
|
2156
|
+
return {
|
|
2157
|
+
bytes: context.base64Decoder(output.bytes)
|
|
2158
|
+
};
|
|
2159
|
+
}
|
|
2160
|
+
return { $unknown: Object.entries(output)[0] };
|
|
2161
|
+
}, "de_GuardrailConverseImageSource");
|
|
1697
2162
|
var de_GuardrailTraceAssessment = /* @__PURE__ */ __name((output, context) => {
|
|
1698
2163
|
return (0, import_smithy_client.take)(output, {
|
|
1699
2164
|
inputAssessment: (_) => de_GuardrailAssessmentMap(_, context),
|
|
@@ -1758,6 +2223,11 @@ var de_ToolResultContentBlock = /* @__PURE__ */ __name((output, context) => {
|
|
|
1758
2223
|
if ((0, import_smithy_client.expectString)(output.text) !== void 0) {
|
|
1759
2224
|
return { text: (0, import_smithy_client.expectString)(output.text) };
|
|
1760
2225
|
}
|
|
2226
|
+
if (output.video != null) {
|
|
2227
|
+
return {
|
|
2228
|
+
video: de_VideoBlock(output.video, context)
|
|
2229
|
+
};
|
|
2230
|
+
}
|
|
1761
2231
|
return { $unknown: Object.entries(output)[0] };
|
|
1762
2232
|
}, "de_ToolResultContentBlock");
|
|
1763
2233
|
var de_ToolResultContentBlocks = /* @__PURE__ */ __name((output, context) => {
|
|
@@ -1773,6 +2243,25 @@ var de_ToolUseBlock = /* @__PURE__ */ __name((output, context) => {
|
|
|
1773
2243
|
toolUseId: import_smithy_client.expectString
|
|
1774
2244
|
});
|
|
1775
2245
|
}, "de_ToolUseBlock");
|
|
2246
|
+
var de_VideoBlock = /* @__PURE__ */ __name((output, context) => {
|
|
2247
|
+
return (0, import_smithy_client.take)(output, {
|
|
2248
|
+
format: import_smithy_client.expectString,
|
|
2249
|
+
source: (_) => de_VideoSource((0, import_core2.awsExpectUnion)(_), context)
|
|
2250
|
+
});
|
|
2251
|
+
}, "de_VideoBlock");
|
|
2252
|
+
var de_VideoSource = /* @__PURE__ */ __name((output, context) => {
|
|
2253
|
+
if (output.bytes != null) {
|
|
2254
|
+
return {
|
|
2255
|
+
bytes: context.base64Decoder(output.bytes)
|
|
2256
|
+
};
|
|
2257
|
+
}
|
|
2258
|
+
if (output.s3Location != null) {
|
|
2259
|
+
return {
|
|
2260
|
+
s3Location: (0, import_smithy_client._json)(output.s3Location)
|
|
2261
|
+
};
|
|
2262
|
+
}
|
|
2263
|
+
return { $unknown: Object.entries(output)[0] };
|
|
2264
|
+
}, "de_VideoSource");
|
|
1776
2265
|
var de_Document = /* @__PURE__ */ __name((output, context) => {
|
|
1777
2266
|
return output;
|
|
1778
2267
|
}, "de_Document");
|
|
@@ -1787,7 +2276,14 @@ var _cT = "contentType";
|
|
|
1787
2276
|
var _ct = "content-type";
|
|
1788
2277
|
var _gI = "guardrailIdentifier";
|
|
1789
2278
|
var _gV = "guardrailVersion";
|
|
2279
|
+
var _mR = "maxResults";
|
|
2280
|
+
var _nT = "nextToken";
|
|
1790
2281
|
var _pCL = "performanceConfigLatency";
|
|
2282
|
+
var _sB = "sortBy";
|
|
2283
|
+
var _sE = "statusEquals";
|
|
2284
|
+
var _sO = "sortOrder";
|
|
2285
|
+
var _sTA = "submitTimeAfter";
|
|
2286
|
+
var _sTB = "submitTimeBefore";
|
|
1791
2287
|
var _t = "trace";
|
|
1792
2288
|
var _xaba = "x-amzn-bedrock-accept";
|
|
1793
2289
|
var _xabct = "x-amzn-bedrock-content-type";
|
|
@@ -1802,7 +2298,7 @@ var _ApplyGuardrailCommand = class _ApplyGuardrailCommand extends import_smithy_
|
|
|
1802
2298
|
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
|
|
1803
2299
|
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
|
|
1804
2300
|
];
|
|
1805
|
-
}).s("AmazonBedrockFrontendService", "ApplyGuardrail", {}).n("BedrockRuntimeClient", "ApplyGuardrailCommand").f(
|
|
2301
|
+
}).s("AmazonBedrockFrontendService", "ApplyGuardrail", {}).n("BedrockRuntimeClient", "ApplyGuardrailCommand").f(ApplyGuardrailRequestFilterSensitiveLog, void 0).ser(se_ApplyGuardrailCommand).de(de_ApplyGuardrailCommand).build() {
|
|
1806
2302
|
};
|
|
1807
2303
|
__name(_ApplyGuardrailCommand, "ApplyGuardrailCommand");
|
|
1808
2304
|
var ApplyGuardrailCommand = _ApplyGuardrailCommand;
|
|
@@ -1816,7 +2312,7 @@ var _ConverseCommand = class _ConverseCommand extends import_smithy_client.Comma
|
|
|
1816
2312
|
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
|
|
1817
2313
|
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
|
|
1818
2314
|
];
|
|
1819
|
-
}).s("AmazonBedrockFrontendService", "Converse", {}).n("BedrockRuntimeClient", "ConverseCommand").f(ConverseRequestFilterSensitiveLog,
|
|
2315
|
+
}).s("AmazonBedrockFrontendService", "Converse", {}).n("BedrockRuntimeClient", "ConverseCommand").f(ConverseRequestFilterSensitiveLog, ConverseResponseFilterSensitiveLog).ser(se_ConverseCommand).de(de_ConverseCommand).build() {
|
|
1820
2316
|
};
|
|
1821
2317
|
__name(_ConverseCommand, "ConverseCommand");
|
|
1822
2318
|
var ConverseCommand = _ConverseCommand;
|
|
@@ -1842,6 +2338,20 @@ var _ConverseStreamCommand = class _ConverseStreamCommand extends import_smithy_
|
|
|
1842
2338
|
__name(_ConverseStreamCommand, "ConverseStreamCommand");
|
|
1843
2339
|
var ConverseStreamCommand = _ConverseStreamCommand;
|
|
1844
2340
|
|
|
2341
|
+
// src/commands/GetAsyncInvokeCommand.ts
|
|
2342
|
+
|
|
2343
|
+
|
|
2344
|
+
|
|
2345
|
+
var _GetAsyncInvokeCommand = class _GetAsyncInvokeCommand extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
|
|
2346
|
+
return [
|
|
2347
|
+
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
|
|
2348
|
+
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
|
|
2349
|
+
];
|
|
2350
|
+
}).s("AmazonBedrockFrontendService", "GetAsyncInvoke", {}).n("BedrockRuntimeClient", "GetAsyncInvokeCommand").f(void 0, GetAsyncInvokeResponseFilterSensitiveLog).ser(se_GetAsyncInvokeCommand).de(de_GetAsyncInvokeCommand).build() {
|
|
2351
|
+
};
|
|
2352
|
+
__name(_GetAsyncInvokeCommand, "GetAsyncInvokeCommand");
|
|
2353
|
+
var GetAsyncInvokeCommand = _GetAsyncInvokeCommand;
|
|
2354
|
+
|
|
1845
2355
|
// src/commands/InvokeModelCommand.ts
|
|
1846
2356
|
|
|
1847
2357
|
|
|
@@ -1877,19 +2387,54 @@ var _InvokeModelWithResponseStreamCommand = class _InvokeModelWithResponseStream
|
|
|
1877
2387
|
__name(_InvokeModelWithResponseStreamCommand, "InvokeModelWithResponseStreamCommand");
|
|
1878
2388
|
var InvokeModelWithResponseStreamCommand = _InvokeModelWithResponseStreamCommand;
|
|
1879
2389
|
|
|
2390
|
+
// src/commands/ListAsyncInvokesCommand.ts
|
|
2391
|
+
|
|
2392
|
+
|
|
2393
|
+
|
|
2394
|
+
var _ListAsyncInvokesCommand = class _ListAsyncInvokesCommand extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
|
|
2395
|
+
return [
|
|
2396
|
+
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
|
|
2397
|
+
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
|
|
2398
|
+
];
|
|
2399
|
+
}).s("AmazonBedrockFrontendService", "ListAsyncInvokes", {}).n("BedrockRuntimeClient", "ListAsyncInvokesCommand").f(void 0, ListAsyncInvokesResponseFilterSensitiveLog).ser(se_ListAsyncInvokesCommand).de(de_ListAsyncInvokesCommand).build() {
|
|
2400
|
+
};
|
|
2401
|
+
__name(_ListAsyncInvokesCommand, "ListAsyncInvokesCommand");
|
|
2402
|
+
var ListAsyncInvokesCommand = _ListAsyncInvokesCommand;
|
|
2403
|
+
|
|
2404
|
+
// src/commands/StartAsyncInvokeCommand.ts
|
|
2405
|
+
|
|
2406
|
+
|
|
2407
|
+
|
|
2408
|
+
var _StartAsyncInvokeCommand = class _StartAsyncInvokeCommand extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
|
|
2409
|
+
return [
|
|
2410
|
+
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
|
|
2411
|
+
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
|
|
2412
|
+
];
|
|
2413
|
+
}).s("AmazonBedrockFrontendService", "StartAsyncInvoke", {}).n("BedrockRuntimeClient", "StartAsyncInvokeCommand").f(StartAsyncInvokeRequestFilterSensitiveLog, void 0).ser(se_StartAsyncInvokeCommand).de(de_StartAsyncInvokeCommand).build() {
|
|
2414
|
+
};
|
|
2415
|
+
__name(_StartAsyncInvokeCommand, "StartAsyncInvokeCommand");
|
|
2416
|
+
var StartAsyncInvokeCommand = _StartAsyncInvokeCommand;
|
|
2417
|
+
|
|
1880
2418
|
// src/BedrockRuntime.ts
|
|
1881
2419
|
var commands = {
|
|
1882
2420
|
ApplyGuardrailCommand,
|
|
1883
2421
|
ConverseCommand,
|
|
1884
2422
|
ConverseStreamCommand,
|
|
2423
|
+
GetAsyncInvokeCommand,
|
|
1885
2424
|
InvokeModelCommand,
|
|
1886
|
-
InvokeModelWithResponseStreamCommand
|
|
2425
|
+
InvokeModelWithResponseStreamCommand,
|
|
2426
|
+
ListAsyncInvokesCommand,
|
|
2427
|
+
StartAsyncInvokeCommand
|
|
1887
2428
|
};
|
|
1888
2429
|
var _BedrockRuntime = class _BedrockRuntime extends BedrockRuntimeClient {
|
|
1889
2430
|
};
|
|
1890
2431
|
__name(_BedrockRuntime, "BedrockRuntime");
|
|
1891
2432
|
var BedrockRuntime = _BedrockRuntime;
|
|
1892
2433
|
(0, import_smithy_client.createAggregatedClient)(commands, BedrockRuntime);
|
|
2434
|
+
|
|
2435
|
+
// src/pagination/ListAsyncInvokesPaginator.ts
|
|
2436
|
+
|
|
2437
|
+
var paginateListAsyncInvokes = (0, import_core.createPaginator)(BedrockRuntimeClient, ListAsyncInvokesCommand, "nextToken", "nextToken", "maxResults");
|
|
1893
2438
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1894
2439
|
|
|
1895
2440
|
0 && (module.exports = {
|
|
@@ -1901,9 +2446,26 @@ var BedrockRuntime = _BedrockRuntime;
|
|
|
1901
2446
|
ApplyGuardrailCommand,
|
|
1902
2447
|
ConverseCommand,
|
|
1903
2448
|
ConverseStreamCommand,
|
|
2449
|
+
GetAsyncInvokeCommand,
|
|
1904
2450
|
InvokeModelCommand,
|
|
1905
2451
|
InvokeModelWithResponseStreamCommand,
|
|
2452
|
+
ListAsyncInvokesCommand,
|
|
2453
|
+
StartAsyncInvokeCommand,
|
|
2454
|
+
paginateListAsyncInvokes,
|
|
1906
2455
|
AccessDeniedException,
|
|
2456
|
+
AsyncInvokeOutputDataConfig,
|
|
2457
|
+
AsyncInvokeStatus,
|
|
2458
|
+
InternalServerException,
|
|
2459
|
+
ThrottlingException,
|
|
2460
|
+
ValidationException,
|
|
2461
|
+
SortAsyncInvocationBy,
|
|
2462
|
+
SortOrder,
|
|
2463
|
+
ConflictException,
|
|
2464
|
+
ResourceNotFoundException,
|
|
2465
|
+
ServiceQuotaExceededException,
|
|
2466
|
+
ServiceUnavailableException,
|
|
2467
|
+
GuardrailImageFormat,
|
|
2468
|
+
GuardrailImageSource,
|
|
1907
2469
|
GuardrailContentQualifier,
|
|
1908
2470
|
GuardrailContentBlock,
|
|
1909
2471
|
GuardrailContentSource,
|
|
@@ -1920,18 +2482,17 @@ var BedrockRuntime = _BedrockRuntime;
|
|
|
1920
2482
|
GuardrailTopicType,
|
|
1921
2483
|
GuardrailWordPolicyAction,
|
|
1922
2484
|
GuardrailManagedWordType,
|
|
1923
|
-
InternalServerException,
|
|
1924
|
-
ResourceNotFoundException,
|
|
1925
|
-
ServiceQuotaExceededException,
|
|
1926
|
-
ThrottlingException,
|
|
1927
|
-
ValidationException,
|
|
1928
2485
|
GuardrailTrace,
|
|
1929
2486
|
DocumentFormat,
|
|
1930
2487
|
DocumentSource,
|
|
2488
|
+
GuardrailConverseImageFormat,
|
|
2489
|
+
GuardrailConverseImageSource,
|
|
1931
2490
|
GuardrailConverseContentQualifier,
|
|
1932
2491
|
GuardrailConverseContentBlock,
|
|
1933
2492
|
ImageFormat,
|
|
1934
2493
|
ImageSource,
|
|
2494
|
+
VideoFormat,
|
|
2495
|
+
VideoSource,
|
|
1935
2496
|
ToolResultContentBlock,
|
|
1936
2497
|
ToolResultStatus,
|
|
1937
2498
|
ContentBlock,
|
|
@@ -1947,7 +2508,6 @@ var BedrockRuntime = _BedrockRuntime;
|
|
|
1947
2508
|
ModelErrorException,
|
|
1948
2509
|
ModelNotReadyException,
|
|
1949
2510
|
ModelTimeoutException,
|
|
1950
|
-
ServiceUnavailableException,
|
|
1951
2511
|
GuardrailStreamProcessingMode,
|
|
1952
2512
|
ContentBlockDelta,
|
|
1953
2513
|
ContentBlockStart,
|
|
@@ -1955,7 +2515,23 @@ var BedrockRuntime = _BedrockRuntime;
|
|
|
1955
2515
|
ConverseStreamOutput,
|
|
1956
2516
|
Trace,
|
|
1957
2517
|
ResponseStream,
|
|
2518
|
+
GetAsyncInvokeResponseFilterSensitiveLog,
|
|
2519
|
+
AsyncInvokeSummaryFilterSensitiveLog,
|
|
2520
|
+
ListAsyncInvokesResponseFilterSensitiveLog,
|
|
2521
|
+
StartAsyncInvokeRequestFilterSensitiveLog,
|
|
2522
|
+
GuardrailImageSourceFilterSensitiveLog,
|
|
2523
|
+
GuardrailImageBlockFilterSensitiveLog,
|
|
2524
|
+
GuardrailContentBlockFilterSensitiveLog,
|
|
2525
|
+
ApplyGuardrailRequestFilterSensitiveLog,
|
|
2526
|
+
GuardrailConverseImageSourceFilterSensitiveLog,
|
|
2527
|
+
GuardrailConverseImageBlockFilterSensitiveLog,
|
|
2528
|
+
GuardrailConverseContentBlockFilterSensitiveLog,
|
|
2529
|
+
ContentBlockFilterSensitiveLog,
|
|
2530
|
+
MessageFilterSensitiveLog,
|
|
2531
|
+
SystemContentBlockFilterSensitiveLog,
|
|
1958
2532
|
ConverseRequestFilterSensitiveLog,
|
|
2533
|
+
ConverseOutputFilterSensitiveLog,
|
|
2534
|
+
ConverseResponseFilterSensitiveLog,
|
|
1959
2535
|
ConverseStreamRequestFilterSensitiveLog,
|
|
1960
2536
|
ConverseStreamOutputFilterSensitiveLog,
|
|
1961
2537
|
ConverseStreamResponseFilterSensitiveLog,
|