@aws-sdk/client-bedrock-agent-runtime 3.738.0 → 3.740.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/dist-cjs/index.js +18 -3
- package/dist-es/models/models_0.js +8 -0
- package/dist-es/protocols/Aws_restJson1.js +3 -0
- package/dist-types/commands/InvokeAgentCommand.d.ts +1 -0
- package/dist-types/commands/InvokeFlowCommand.d.ts +1 -0
- package/dist-types/commands/InvokeInlineAgentCommand.d.ts +1 -0
- package/dist-types/commands/OptimizePromptCommand.d.ts +1 -0
- package/dist-types/commands/RetrieveAndGenerateStreamCommand.d.ts +57 -0
- package/dist-types/models/models_0.d.ts +17 -0
- package/dist-types/ts3.4/models/models_0.d.ts +3 -0
- package/package.json +1 -1
package/dist-cjs/index.js
CHANGED
|
@@ -637,6 +637,11 @@ var InternalServerException = class _InternalServerException extends BedrockAgen
|
|
|
637
637
|
}
|
|
638
638
|
name = "InternalServerException";
|
|
639
639
|
$fault = "server";
|
|
640
|
+
/**
|
|
641
|
+
* <p>The reason for the exception. If the reason is <code>BEDROCK_MODEL_INVOCATION_SERVICE_UNAVAILABLE</code>, the model invocation service is unavailable. Retry your request.</p>
|
|
642
|
+
* @public
|
|
643
|
+
*/
|
|
644
|
+
reason;
|
|
640
645
|
/**
|
|
641
646
|
* @internal
|
|
642
647
|
*/
|
|
@@ -647,6 +652,7 @@ var InternalServerException = class _InternalServerException extends BedrockAgen
|
|
|
647
652
|
...opts
|
|
648
653
|
});
|
|
649
654
|
Object.setPrototypeOf(this, _InternalServerException.prototype);
|
|
655
|
+
this.reason = opts.reason;
|
|
650
656
|
}
|
|
651
657
|
};
|
|
652
658
|
var FlowInputContent;
|
|
@@ -2091,7 +2097,13 @@ var RetrieveAndGenerateResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj)
|
|
|
2091
2097
|
}), "RetrieveAndGenerateResponseFilterSensitiveLog");
|
|
2092
2098
|
var CitationEventFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
|
|
2093
2099
|
...obj,
|
|
2094
|
-
...obj.citation && { citation: CitationFilterSensitiveLog(obj.citation) }
|
|
2100
|
+
...obj.citation && { citation: CitationFilterSensitiveLog(obj.citation) },
|
|
2101
|
+
...obj.generatedResponsePart && {
|
|
2102
|
+
generatedResponsePart: GeneratedResponsePartFilterSensitiveLog(obj.generatedResponsePart)
|
|
2103
|
+
},
|
|
2104
|
+
...obj.retrievedReferences && {
|
|
2105
|
+
retrievedReferences: obj.retrievedReferences.map((item) => RetrievedReferenceFilterSensitiveLog(item))
|
|
2106
|
+
}
|
|
2095
2107
|
}), "CitationEventFilterSensitiveLog");
|
|
2096
2108
|
var RetrieveAndGenerateOutputEventFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
|
|
2097
2109
|
...obj
|
|
@@ -2748,7 +2760,8 @@ var de_InternalServerExceptionRes = /* @__PURE__ */ __name(async (parsedOutput,
|
|
|
2748
2760
|
const contents = (0, import_smithy_client.map)({});
|
|
2749
2761
|
const data = parsedOutput.body;
|
|
2750
2762
|
const doc = (0, import_smithy_client.take)(data, {
|
|
2751
|
-
message: import_smithy_client.expectString
|
|
2763
|
+
message: import_smithy_client.expectString,
|
|
2764
|
+
reason: import_smithy_client.expectString
|
|
2752
2765
|
});
|
|
2753
2766
|
Object.assign(contents, doc);
|
|
2754
2767
|
const exception = new InternalServerException({
|
|
@@ -3696,7 +3709,9 @@ var de_Citation = /* @__PURE__ */ __name((output, context) => {
|
|
|
3696
3709
|
}, "de_Citation");
|
|
3697
3710
|
var de_CitationEvent = /* @__PURE__ */ __name((output, context) => {
|
|
3698
3711
|
return (0, import_smithy_client.take)(output, {
|
|
3699
|
-
citation: (_) => de_Citation(_, context)
|
|
3712
|
+
citation: (_) => de_Citation(_, context),
|
|
3713
|
+
generatedResponsePart: import_smithy_client._json,
|
|
3714
|
+
retrievedReferences: (_) => de_RetrievedReferences(_, context)
|
|
3700
3715
|
});
|
|
3701
3716
|
}, "de_CitationEvent");
|
|
3702
3717
|
var de_Citations = /* @__PURE__ */ __name((output, context) => {
|
|
@@ -142,6 +142,7 @@ export class DependencyFailedException extends __BaseException {
|
|
|
142
142
|
export class InternalServerException extends __BaseException {
|
|
143
143
|
name = "InternalServerException";
|
|
144
144
|
$fault = "server";
|
|
145
|
+
reason;
|
|
145
146
|
constructor(opts) {
|
|
146
147
|
super({
|
|
147
148
|
name: "InternalServerException",
|
|
@@ -149,6 +150,7 @@ export class InternalServerException extends __BaseException {
|
|
|
149
150
|
...opts,
|
|
150
151
|
});
|
|
151
152
|
Object.setPrototypeOf(this, InternalServerException.prototype);
|
|
153
|
+
this.reason = opts.reason;
|
|
152
154
|
}
|
|
153
155
|
}
|
|
154
156
|
export var FlowInputContent;
|
|
@@ -1552,6 +1554,12 @@ export const RetrieveAndGenerateResponseFilterSensitiveLog = (obj) => ({
|
|
|
1552
1554
|
export const CitationEventFilterSensitiveLog = (obj) => ({
|
|
1553
1555
|
...obj,
|
|
1554
1556
|
...(obj.citation && { citation: CitationFilterSensitiveLog(obj.citation) }),
|
|
1557
|
+
...(obj.generatedResponsePart && {
|
|
1558
|
+
generatedResponsePart: GeneratedResponsePartFilterSensitiveLog(obj.generatedResponsePart),
|
|
1559
|
+
}),
|
|
1560
|
+
...(obj.retrievedReferences && {
|
|
1561
|
+
retrievedReferences: obj.retrievedReferences.map((item) => RetrievedReferenceFilterSensitiveLog(item)),
|
|
1562
|
+
}),
|
|
1555
1563
|
});
|
|
1556
1564
|
export const RetrieveAndGenerateOutputEventFilterSensitiveLog = (obj) => ({
|
|
1557
1565
|
...obj,
|
|
@@ -449,6 +449,7 @@ const de_InternalServerExceptionRes = async (parsedOutput, context) => {
|
|
|
449
449
|
const data = parsedOutput.body;
|
|
450
450
|
const doc = take(data, {
|
|
451
451
|
message: __expectString,
|
|
452
|
+
reason: __expectString,
|
|
452
453
|
});
|
|
453
454
|
Object.assign(contents, doc);
|
|
454
455
|
const exception = new InternalServerException({
|
|
@@ -1371,6 +1372,8 @@ const de_Citation = (output, context) => {
|
|
|
1371
1372
|
const de_CitationEvent = (output, context) => {
|
|
1372
1373
|
return take(output, {
|
|
1373
1374
|
citation: (_) => de_Citation(_, context),
|
|
1375
|
+
generatedResponsePart: _json,
|
|
1376
|
+
retrievedReferences: (_) => de_RetrievedReferences(_, context),
|
|
1374
1377
|
});
|
|
1375
1378
|
};
|
|
1376
1379
|
const de_Citations = (output, context) => {
|
|
@@ -1061,6 +1061,7 @@ declare const InvokeAgentCommand_base: {
|
|
|
1061
1061
|
* // },
|
|
1062
1062
|
* // internalServerException: { // InternalServerException
|
|
1063
1063
|
* // message: "STRING_VALUE",
|
|
1064
|
+
* // reason: "STRING_VALUE",
|
|
1064
1065
|
* // },
|
|
1065
1066
|
* // validationException: { // ValidationException
|
|
1066
1067
|
* // message: "STRING_VALUE",
|
|
@@ -111,6 +111,7 @@ declare const InvokeFlowCommand_base: {
|
|
|
111
111
|
* // },
|
|
112
112
|
* // internalServerException: { // InternalServerException
|
|
113
113
|
* // message: "STRING_VALUE",
|
|
114
|
+
* // reason: "STRING_VALUE",
|
|
114
115
|
* // },
|
|
115
116
|
* // validationException: { // ValidationException
|
|
116
117
|
* // message: "STRING_VALUE",
|
|
@@ -1073,6 +1073,7 @@ declare const InvokeInlineAgentCommand_base: {
|
|
|
1073
1073
|
* // },
|
|
1074
1074
|
* // internalServerException: { // InternalServerException
|
|
1075
1075
|
* // message: "STRING_VALUE",
|
|
1076
|
+
* // reason: "STRING_VALUE",
|
|
1076
1077
|
* // },
|
|
1077
1078
|
* // validationException: { // ValidationException
|
|
1078
1079
|
* // message: "STRING_VALUE",
|
|
@@ -58,6 +58,7 @@ declare const OptimizePromptCommand_base: {
|
|
|
58
58
|
* // },
|
|
59
59
|
* // internalServerException: { // InternalServerException
|
|
60
60
|
* // message: "STRING_VALUE",
|
|
61
|
+
* // reason: "STRING_VALUE",
|
|
61
62
|
* // },
|
|
62
63
|
* // throttlingException: { // ThrottlingException
|
|
63
64
|
* // message: "STRING_VALUE",
|
|
@@ -31,6 +31,7 @@ declare const RetrieveAndGenerateStreamCommand_base: {
|
|
|
31
31
|
* <note>
|
|
32
32
|
* <p>The CLI doesn't support streaming operations in Amazon Bedrock, including <code>InvokeModelWithResponseStream</code>.</p>
|
|
33
33
|
* </note>
|
|
34
|
+
* <p>This operation requires permission for the <code> bedrock:RetrieveAndGenerate</code> action.</p>
|
|
34
35
|
* @example
|
|
35
36
|
* Use a bare-bones client and the command you need to make an API call.
|
|
36
37
|
* ```javascript
|
|
@@ -303,12 +304,68 @@ declare const RetrieveAndGenerateStreamCommand_base: {
|
|
|
303
304
|
* // },
|
|
304
305
|
* // ],
|
|
305
306
|
* // },
|
|
307
|
+
* // generatedResponsePart: {
|
|
308
|
+
* // textResponsePart: {
|
|
309
|
+
* // text: "STRING_VALUE",
|
|
310
|
+
* // span: {
|
|
311
|
+
* // start: Number("int"),
|
|
312
|
+
* // end: Number("int"),
|
|
313
|
+
* // },
|
|
314
|
+
* // },
|
|
315
|
+
* // },
|
|
316
|
+
* // retrievedReferences: [
|
|
317
|
+
* // {
|
|
318
|
+
* // content: {
|
|
319
|
+
* // type: "TEXT" || "IMAGE" || "ROW",
|
|
320
|
+
* // text: "STRING_VALUE",
|
|
321
|
+
* // byteContent: "STRING_VALUE",
|
|
322
|
+
* // row: [
|
|
323
|
+
* // {
|
|
324
|
+
* // columnName: "STRING_VALUE",
|
|
325
|
+
* // columnValue: "STRING_VALUE",
|
|
326
|
+
* // type: "BLOB" || "BOOLEAN" || "DOUBLE" || "NULL" || "LONG" || "STRING",
|
|
327
|
+
* // },
|
|
328
|
+
* // ],
|
|
329
|
+
* // },
|
|
330
|
+
* // location: {
|
|
331
|
+
* // type: "S3" || "WEB" || "CONFLUENCE" || "SALESFORCE" || "SHAREPOINT" || "CUSTOM" || "KENDRA" || "SQL", // required
|
|
332
|
+
* // s3Location: {
|
|
333
|
+
* // uri: "STRING_VALUE",
|
|
334
|
+
* // },
|
|
335
|
+
* // webLocation: {
|
|
336
|
+
* // url: "STRING_VALUE",
|
|
337
|
+
* // },
|
|
338
|
+
* // confluenceLocation: {
|
|
339
|
+
* // url: "STRING_VALUE",
|
|
340
|
+
* // },
|
|
341
|
+
* // salesforceLocation: {
|
|
342
|
+
* // url: "STRING_VALUE",
|
|
343
|
+
* // },
|
|
344
|
+
* // sharePointLocation: {
|
|
345
|
+
* // url: "STRING_VALUE",
|
|
346
|
+
* // },
|
|
347
|
+
* // customDocumentLocation: {
|
|
348
|
+
* // id: "STRING_VALUE",
|
|
349
|
+
* // },
|
|
350
|
+
* // kendraDocumentLocation: {
|
|
351
|
+
* // uri: "STRING_VALUE",
|
|
352
|
+
* // },
|
|
353
|
+
* // sqlLocation: {
|
|
354
|
+
* // query: "STRING_VALUE",
|
|
355
|
+
* // },
|
|
356
|
+
* // },
|
|
357
|
+
* // metadata: {
|
|
358
|
+
* // "<keys>": "DOCUMENT_VALUE",
|
|
359
|
+
* // },
|
|
360
|
+
* // },
|
|
361
|
+
* // ],
|
|
306
362
|
* // },
|
|
307
363
|
* // guardrail: { // GuardrailEvent
|
|
308
364
|
* // action: "INTERVENED" || "NONE",
|
|
309
365
|
* // },
|
|
310
366
|
* // internalServerException: { // InternalServerException
|
|
311
367
|
* // message: "STRING_VALUE",
|
|
368
|
+
* // reason: "STRING_VALUE",
|
|
312
369
|
* // },
|
|
313
370
|
* // validationException: { // ValidationException
|
|
314
371
|
* // message: "STRING_VALUE",
|
|
@@ -1062,6 +1062,11 @@ export declare class DependencyFailedException extends __BaseException {
|
|
|
1062
1062
|
export declare class InternalServerException extends __BaseException {
|
|
1063
1063
|
readonly name: "InternalServerException";
|
|
1064
1064
|
readonly $fault: "server";
|
|
1065
|
+
/**
|
|
1066
|
+
* <p>The reason for the exception. If the reason is <code>BEDROCK_MODEL_INVOCATION_SERVICE_UNAVAILABLE</code>, the model invocation service is unavailable. Retry your request.</p>
|
|
1067
|
+
* @public
|
|
1068
|
+
*/
|
|
1069
|
+
reason?: string | undefined;
|
|
1065
1070
|
/**
|
|
1066
1071
|
* @internal
|
|
1067
1072
|
*/
|
|
@@ -6470,10 +6475,22 @@ export interface RetrieveAndGenerateResponse {
|
|
|
6470
6475
|
*/
|
|
6471
6476
|
export interface CitationEvent {
|
|
6472
6477
|
/**
|
|
6478
|
+
* @deprecated
|
|
6479
|
+
*
|
|
6473
6480
|
* <p>The citation.</p>
|
|
6474
6481
|
* @public
|
|
6475
6482
|
*/
|
|
6476
6483
|
citation?: Citation | undefined;
|
|
6484
|
+
/**
|
|
6485
|
+
* <p>The generated response to the citation event.</p>
|
|
6486
|
+
* @public
|
|
6487
|
+
*/
|
|
6488
|
+
generatedResponsePart?: GeneratedResponsePart | undefined;
|
|
6489
|
+
/**
|
|
6490
|
+
* <p>The retrieved references of the citation event.</p>
|
|
6491
|
+
* @public
|
|
6492
|
+
*/
|
|
6493
|
+
retrievedReferences?: RetrievedReference[] | undefined;
|
|
6477
6494
|
}
|
|
6478
6495
|
/**
|
|
6479
6496
|
* <p>A guardrail event.</p>
|
|
@@ -338,6 +338,7 @@ export declare class DependencyFailedException extends __BaseException {
|
|
|
338
338
|
export declare class InternalServerException extends __BaseException {
|
|
339
339
|
readonly name: "InternalServerException";
|
|
340
340
|
readonly $fault: "server";
|
|
341
|
+
reason?: string | undefined;
|
|
341
342
|
constructor(
|
|
342
343
|
opts: __ExceptionOptionType<InternalServerException, __BaseException>
|
|
343
344
|
);
|
|
@@ -2758,6 +2759,8 @@ export interface RetrieveAndGenerateResponse {
|
|
|
2758
2759
|
}
|
|
2759
2760
|
export interface CitationEvent {
|
|
2760
2761
|
citation?: Citation | undefined;
|
|
2762
|
+
generatedResponsePart?: GeneratedResponsePart | undefined;
|
|
2763
|
+
retrievedReferences?: RetrievedReference[] | undefined;
|
|
2761
2764
|
}
|
|
2762
2765
|
export interface GuardrailEvent {
|
|
2763
2766
|
action?: GuadrailAction | undefined;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-bedrock-agent-runtime",
|
|
3
3
|
"description": "AWS SDK for JavaScript Bedrock Agent Runtime Client for Node.js, Browser and React Native",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.740.0",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
7
7
|
"build:cjs": "node ../../scripts/compilation/inline client-bedrock-agent-runtime",
|