@aws-sdk/client-bedrock-agent-runtime 3.556.0 → 3.560.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 +99 -1
- package/dist-es/models/models_0.js +66 -0
- package/dist-es/protocols/Aws_restJson1.js +12 -0
- package/dist-types/commands/InvokeAgentCommand.d.ts +79 -4
- package/dist-types/commands/RetrieveAndGenerateCommand.d.ts +1 -1
- package/dist-types/commands/RetrieveCommand.d.ts +1 -1
- package/dist-types/models/models_0.d.ts +466 -8
- package/dist-types/ts3.4/models/models_0.d.ts +156 -1
- package/package.json +1 -1
package/dist-cjs/index.js
CHANGED
|
@@ -24,6 +24,8 @@ __export(src_exports, {
|
|
|
24
24
|
AccessDeniedException: () => AccessDeniedException,
|
|
25
25
|
ActionGroupInvocationInputFilterSensitiveLog: () => ActionGroupInvocationInputFilterSensitiveLog,
|
|
26
26
|
ActionGroupInvocationOutputFilterSensitiveLog: () => ActionGroupInvocationOutputFilterSensitiveLog,
|
|
27
|
+
ApiInvocationInputFilterSensitiveLog: () => ApiInvocationInputFilterSensitiveLog,
|
|
28
|
+
ApiResultFilterSensitiveLog: () => ApiResultFilterSensitiveLog,
|
|
27
29
|
AttributionFilterSensitiveLog: () => AttributionFilterSensitiveLog,
|
|
28
30
|
BadGatewayException: () => BadGatewayException,
|
|
29
31
|
BedrockAgentRuntime: () => BedrockAgentRuntime,
|
|
@@ -39,6 +41,10 @@ __export(src_exports, {
|
|
|
39
41
|
GenerationConfigurationFilterSensitiveLog: () => GenerationConfigurationFilterSensitiveLog,
|
|
40
42
|
InternalServerException: () => InternalServerException,
|
|
41
43
|
InvocationInputFilterSensitiveLog: () => InvocationInputFilterSensitiveLog,
|
|
44
|
+
InvocationInputMember: () => InvocationInputMember,
|
|
45
|
+
InvocationInputMemberFilterSensitiveLog: () => InvocationInputMemberFilterSensitiveLog,
|
|
46
|
+
InvocationResultMember: () => InvocationResultMember,
|
|
47
|
+
InvocationResultMemberFilterSensitiveLog: () => InvocationResultMemberFilterSensitiveLog,
|
|
42
48
|
InvocationType: () => InvocationType,
|
|
43
49
|
InvokeAgentCommand: () => InvokeAgentCommand,
|
|
44
50
|
InvokeAgentRequestFilterSensitiveLog: () => InvokeAgentRequestFilterSensitiveLog,
|
|
@@ -68,6 +74,7 @@ __export(src_exports, {
|
|
|
68
74
|
RationaleFilterSensitiveLog: () => RationaleFilterSensitiveLog,
|
|
69
75
|
RepromptResponseFilterSensitiveLog: () => RepromptResponseFilterSensitiveLog,
|
|
70
76
|
ResourceNotFoundException: () => ResourceNotFoundException,
|
|
77
|
+
ResponseState: () => ResponseState,
|
|
71
78
|
ResponseStream: () => ResponseStream,
|
|
72
79
|
ResponseStreamFilterSensitiveLog: () => ResponseStreamFilterSensitiveLog,
|
|
73
80
|
RetrievalFilter: () => RetrievalFilter,
|
|
@@ -86,8 +93,10 @@ __export(src_exports, {
|
|
|
86
93
|
RetrieveRequestFilterSensitiveLog: () => RetrieveRequestFilterSensitiveLog,
|
|
87
94
|
RetrieveResponseFilterSensitiveLog: () => RetrieveResponseFilterSensitiveLog,
|
|
88
95
|
RetrievedReferenceFilterSensitiveLog: () => RetrievedReferenceFilterSensitiveLog,
|
|
96
|
+
ReturnControlPayloadFilterSensitiveLog: () => ReturnControlPayloadFilterSensitiveLog,
|
|
89
97
|
SearchType: () => SearchType,
|
|
90
98
|
ServiceQuotaExceededException: () => ServiceQuotaExceededException,
|
|
99
|
+
SessionStateFilterSensitiveLog: () => SessionStateFilterSensitiveLog,
|
|
91
100
|
Source: () => Source,
|
|
92
101
|
TextResponsePartFilterSensitiveLog: () => TextResponsePartFilterSensitiveLog,
|
|
93
102
|
ThrottlingException: () => ThrottlingException,
|
|
@@ -360,6 +369,20 @@ var _InternalServerException = class _InternalServerException extends BedrockAge
|
|
|
360
369
|
};
|
|
361
370
|
__name(_InternalServerException, "InternalServerException");
|
|
362
371
|
var InternalServerException = _InternalServerException;
|
|
372
|
+
var ResponseState = {
|
|
373
|
+
FAILURE: "FAILURE",
|
|
374
|
+
REPROMPT: "REPROMPT"
|
|
375
|
+
};
|
|
376
|
+
var InvocationResultMember;
|
|
377
|
+
((InvocationResultMember3) => {
|
|
378
|
+
InvocationResultMember3.visit = /* @__PURE__ */ __name((value, visitor) => {
|
|
379
|
+
if (value.apiResult !== void 0)
|
|
380
|
+
return visitor.apiResult(value.apiResult);
|
|
381
|
+
if (value.functionResult !== void 0)
|
|
382
|
+
return visitor.functionResult(value.functionResult);
|
|
383
|
+
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
384
|
+
}, "visit");
|
|
385
|
+
})(InvocationResultMember || (InvocationResultMember = {}));
|
|
363
386
|
var RetrievalResultLocationType = {
|
|
364
387
|
S3: "S3"
|
|
365
388
|
};
|
|
@@ -380,6 +403,16 @@ var _ResourceNotFoundException = class _ResourceNotFoundException extends Bedroc
|
|
|
380
403
|
};
|
|
381
404
|
__name(_ResourceNotFoundException, "ResourceNotFoundException");
|
|
382
405
|
var ResourceNotFoundException = _ResourceNotFoundException;
|
|
406
|
+
var InvocationInputMember;
|
|
407
|
+
((InvocationInputMember2) => {
|
|
408
|
+
InvocationInputMember2.visit = /* @__PURE__ */ __name((value, visitor) => {
|
|
409
|
+
if (value.apiInvocationInput !== void 0)
|
|
410
|
+
return visitor.apiInvocationInput(value.apiInvocationInput);
|
|
411
|
+
if (value.functionInvocationInput !== void 0)
|
|
412
|
+
return visitor.functionInvocationInput(value.functionInvocationInput);
|
|
413
|
+
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
414
|
+
}, "visit");
|
|
415
|
+
})(InvocationInputMember || (InvocationInputMember = {}));
|
|
383
416
|
var _ServiceQuotaExceededException = class _ServiceQuotaExceededException extends BedrockAgentRuntimeServiceException {
|
|
384
417
|
/**
|
|
385
418
|
* @internal
|
|
@@ -513,6 +546,8 @@ var ResponseStream;
|
|
|
513
546
|
return visitor.chunk(value.chunk);
|
|
514
547
|
if (value.trace !== void 0)
|
|
515
548
|
return visitor.trace(value.trace);
|
|
549
|
+
if (value.returnControl !== void 0)
|
|
550
|
+
return visitor.returnControl(value.returnControl);
|
|
516
551
|
if (value.internalServerException !== void 0)
|
|
517
552
|
return visitor.internalServerException(value.internalServerException);
|
|
518
553
|
if (value.validationException !== void 0)
|
|
@@ -573,14 +608,36 @@ var ActionGroupInvocationInputFilterSensitiveLog = /* @__PURE__ */ __name((obj)
|
|
|
573
608
|
...obj,
|
|
574
609
|
...obj.actionGroupName && { actionGroupName: import_smithy_client.SENSITIVE_STRING },
|
|
575
610
|
...obj.verb && { verb: import_smithy_client.SENSITIVE_STRING },
|
|
576
|
-
...obj.apiPath && { apiPath: import_smithy_client.SENSITIVE_STRING }
|
|
611
|
+
...obj.apiPath && { apiPath: import_smithy_client.SENSITIVE_STRING },
|
|
612
|
+
...obj.function && { function: import_smithy_client.SENSITIVE_STRING }
|
|
577
613
|
}), "ActionGroupInvocationInputFilterSensitiveLog");
|
|
578
614
|
var ActionGroupInvocationOutputFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
|
|
579
615
|
...obj,
|
|
580
616
|
...obj.text && { text: import_smithy_client.SENSITIVE_STRING }
|
|
581
617
|
}), "ActionGroupInvocationOutputFilterSensitiveLog");
|
|
618
|
+
var ApiResultFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
|
|
619
|
+
...obj,
|
|
620
|
+
...obj.apiPath && { apiPath: import_smithy_client.SENSITIVE_STRING }
|
|
621
|
+
}), "ApiResultFilterSensitiveLog");
|
|
622
|
+
var InvocationResultMemberFilterSensitiveLog = /* @__PURE__ */ __name((obj) => {
|
|
623
|
+
if (obj.apiResult !== void 0)
|
|
624
|
+
return { apiResult: ApiResultFilterSensitiveLog(obj.apiResult) };
|
|
625
|
+
if (obj.functionResult !== void 0)
|
|
626
|
+
return { functionResult: obj.functionResult };
|
|
627
|
+
if (obj.$unknown !== void 0)
|
|
628
|
+
return { [obj.$unknown[0]]: "UNKNOWN" };
|
|
629
|
+
}, "InvocationResultMemberFilterSensitiveLog");
|
|
630
|
+
var SessionStateFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
|
|
631
|
+
...obj,
|
|
632
|
+
...obj.returnControlInvocationResults && {
|
|
633
|
+
returnControlInvocationResults: obj.returnControlInvocationResults.map(
|
|
634
|
+
(item) => InvocationResultMemberFilterSensitiveLog(item)
|
|
635
|
+
)
|
|
636
|
+
}
|
|
637
|
+
}), "SessionStateFilterSensitiveLog");
|
|
582
638
|
var InvokeAgentRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
|
|
583
639
|
...obj,
|
|
640
|
+
...obj.sessionState && { sessionState: SessionStateFilterSensitiveLog(obj.sessionState) },
|
|
584
641
|
...obj.inputText && { inputText: import_smithy_client.SENSITIVE_STRING }
|
|
585
642
|
}), "InvokeAgentRequestFilterSensitiveLog");
|
|
586
643
|
var TextResponsePartFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
|
|
@@ -620,6 +677,24 @@ var PayloadPartFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
|
|
|
620
677
|
...obj.bytes && { bytes: import_smithy_client.SENSITIVE_STRING },
|
|
621
678
|
...obj.attribution && { attribution: AttributionFilterSensitiveLog(obj.attribution) }
|
|
622
679
|
}), "PayloadPartFilterSensitiveLog");
|
|
680
|
+
var ApiInvocationInputFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
|
|
681
|
+
...obj,
|
|
682
|
+
...obj.apiPath && { apiPath: import_smithy_client.SENSITIVE_STRING }
|
|
683
|
+
}), "ApiInvocationInputFilterSensitiveLog");
|
|
684
|
+
var InvocationInputMemberFilterSensitiveLog = /* @__PURE__ */ __name((obj) => {
|
|
685
|
+
if (obj.apiInvocationInput !== void 0)
|
|
686
|
+
return { apiInvocationInput: ApiInvocationInputFilterSensitiveLog(obj.apiInvocationInput) };
|
|
687
|
+
if (obj.functionInvocationInput !== void 0)
|
|
688
|
+
return { functionInvocationInput: obj.functionInvocationInput };
|
|
689
|
+
if (obj.$unknown !== void 0)
|
|
690
|
+
return { [obj.$unknown[0]]: "UNKNOWN" };
|
|
691
|
+
}, "InvocationInputMemberFilterSensitiveLog");
|
|
692
|
+
var ReturnControlPayloadFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
|
|
693
|
+
...obj,
|
|
694
|
+
...obj.invocationInputs && {
|
|
695
|
+
invocationInputs: obj.invocationInputs.map((item) => InvocationInputMemberFilterSensitiveLog(item))
|
|
696
|
+
}
|
|
697
|
+
}), "ReturnControlPayloadFilterSensitiveLog");
|
|
623
698
|
var FailureTraceFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
|
|
624
699
|
...obj,
|
|
625
700
|
...obj.failureReason && { failureReason: import_smithy_client.SENSITIVE_STRING }
|
|
@@ -736,6 +811,8 @@ var ResponseStreamFilterSensitiveLog = /* @__PURE__ */ __name((obj) => {
|
|
|
736
811
|
return { chunk: import_smithy_client.SENSITIVE_STRING };
|
|
737
812
|
if (obj.trace !== void 0)
|
|
738
813
|
return { trace: import_smithy_client.SENSITIVE_STRING };
|
|
814
|
+
if (obj.returnControl !== void 0)
|
|
815
|
+
return { returnControl: import_smithy_client.SENSITIVE_STRING };
|
|
739
816
|
if (obj.internalServerException !== void 0)
|
|
740
817
|
return { internalServerException: obj.internalServerException };
|
|
741
818
|
if (obj.validationException !== void 0)
|
|
@@ -1143,6 +1220,11 @@ var de_ResponseStream = /* @__PURE__ */ __name((output, context) => {
|
|
|
1143
1220
|
trace: await de_TracePart_event(event["trace"], context)
|
|
1144
1221
|
};
|
|
1145
1222
|
}
|
|
1223
|
+
if (event["returnControl"] != null) {
|
|
1224
|
+
return {
|
|
1225
|
+
returnControl: await de_ReturnControlPayload_event(event["returnControl"], context)
|
|
1226
|
+
};
|
|
1227
|
+
}
|
|
1146
1228
|
if (event["internalServerException"] != null) {
|
|
1147
1229
|
return {
|
|
1148
1230
|
internalServerException: await de_InternalServerException_event(event["internalServerException"], context)
|
|
@@ -1248,6 +1330,12 @@ var de_ResourceNotFoundException_event = /* @__PURE__ */ __name(async (output, c
|
|
|
1248
1330
|
};
|
|
1249
1331
|
return de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1250
1332
|
}, "de_ResourceNotFoundException_event");
|
|
1333
|
+
var de_ReturnControlPayload_event = /* @__PURE__ */ __name(async (output, context) => {
|
|
1334
|
+
const contents = {};
|
|
1335
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
1336
|
+
Object.assign(contents, (0, import_smithy_client._json)(data));
|
|
1337
|
+
return contents;
|
|
1338
|
+
}, "de_ReturnControlPayload_event");
|
|
1251
1339
|
var de_ServiceQuotaExceededException_event = /* @__PURE__ */ __name(async (output, context) => {
|
|
1252
1340
|
const parsedOutput = {
|
|
1253
1341
|
...output,
|
|
@@ -1504,6 +1592,7 @@ var de_TracePart = /* @__PURE__ */ __name((output, context) => {
|
|
|
1504
1592
|
return (0, import_smithy_client.take)(output, {
|
|
1505
1593
|
agentAliasId: import_smithy_client.expectString,
|
|
1506
1594
|
agentId: import_smithy_client.expectString,
|
|
1595
|
+
agentVersion: import_smithy_client.expectString,
|
|
1507
1596
|
sessionId: import_smithy_client.expectString,
|
|
1508
1597
|
trace: (_) => de_Trace((0, import_core2.awsExpectUnion)(_), context)
|
|
1509
1598
|
});
|
|
@@ -1605,8 +1694,11 @@ var paginateRetrieve = (0, import_core.createPaginator)(BedrockAgentRuntimeClien
|
|
|
1605
1694
|
ConflictException,
|
|
1606
1695
|
DependencyFailedException,
|
|
1607
1696
|
InternalServerException,
|
|
1697
|
+
ResponseState,
|
|
1698
|
+
InvocationResultMember,
|
|
1608
1699
|
RetrievalResultLocationType,
|
|
1609
1700
|
ResourceNotFoundException,
|
|
1701
|
+
InvocationInputMember,
|
|
1610
1702
|
ServiceQuotaExceededException,
|
|
1611
1703
|
ThrottlingException,
|
|
1612
1704
|
InvocationType,
|
|
@@ -1625,6 +1717,9 @@ var paginateRetrieve = (0, import_core.createPaginator)(BedrockAgentRuntimeClien
|
|
|
1625
1717
|
RetrievalFilter,
|
|
1626
1718
|
ActionGroupInvocationInputFilterSensitiveLog,
|
|
1627
1719
|
ActionGroupInvocationOutputFilterSensitiveLog,
|
|
1720
|
+
ApiResultFilterSensitiveLog,
|
|
1721
|
+
InvocationResultMemberFilterSensitiveLog,
|
|
1722
|
+
SessionStateFilterSensitiveLog,
|
|
1628
1723
|
InvokeAgentRequestFilterSensitiveLog,
|
|
1629
1724
|
TextResponsePartFilterSensitiveLog,
|
|
1630
1725
|
GeneratedResponsePartFilterSensitiveLog,
|
|
@@ -1634,6 +1729,9 @@ var paginateRetrieve = (0, import_core.createPaginator)(BedrockAgentRuntimeClien
|
|
|
1634
1729
|
CitationFilterSensitiveLog,
|
|
1635
1730
|
AttributionFilterSensitiveLog,
|
|
1636
1731
|
PayloadPartFilterSensitiveLog,
|
|
1732
|
+
ApiInvocationInputFilterSensitiveLog,
|
|
1733
|
+
InvocationInputMemberFilterSensitiveLog,
|
|
1734
|
+
ReturnControlPayloadFilterSensitiveLog,
|
|
1637
1735
|
FailureTraceFilterSensitiveLog,
|
|
1638
1736
|
KnowledgeBaseLookupInputFilterSensitiveLog,
|
|
1639
1737
|
InvocationInputFilterSensitiveLog,
|
|
@@ -62,6 +62,20 @@ export class InternalServerException extends __BaseException {
|
|
|
62
62
|
Object.setPrototypeOf(this, InternalServerException.prototype);
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
|
+
export const ResponseState = {
|
|
66
|
+
FAILURE: "FAILURE",
|
|
67
|
+
REPROMPT: "REPROMPT",
|
|
68
|
+
};
|
|
69
|
+
export var InvocationResultMember;
|
|
70
|
+
(function (InvocationResultMember) {
|
|
71
|
+
InvocationResultMember.visit = (value, visitor) => {
|
|
72
|
+
if (value.apiResult !== undefined)
|
|
73
|
+
return visitor.apiResult(value.apiResult);
|
|
74
|
+
if (value.functionResult !== undefined)
|
|
75
|
+
return visitor.functionResult(value.functionResult);
|
|
76
|
+
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
77
|
+
};
|
|
78
|
+
})(InvocationResultMember || (InvocationResultMember = {}));
|
|
65
79
|
export const RetrievalResultLocationType = {
|
|
66
80
|
S3: "S3",
|
|
67
81
|
};
|
|
@@ -77,6 +91,16 @@ export class ResourceNotFoundException extends __BaseException {
|
|
|
77
91
|
Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
|
|
78
92
|
}
|
|
79
93
|
}
|
|
94
|
+
export var InvocationInputMember;
|
|
95
|
+
(function (InvocationInputMember) {
|
|
96
|
+
InvocationInputMember.visit = (value, visitor) => {
|
|
97
|
+
if (value.apiInvocationInput !== undefined)
|
|
98
|
+
return visitor.apiInvocationInput(value.apiInvocationInput);
|
|
99
|
+
if (value.functionInvocationInput !== undefined)
|
|
100
|
+
return visitor.functionInvocationInput(value.functionInvocationInput);
|
|
101
|
+
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
102
|
+
};
|
|
103
|
+
})(InvocationInputMember || (InvocationInputMember = {}));
|
|
80
104
|
export class ServiceQuotaExceededException extends __BaseException {
|
|
81
105
|
constructor(opts) {
|
|
82
106
|
super({
|
|
@@ -195,6 +219,8 @@ export var ResponseStream;
|
|
|
195
219
|
return visitor.chunk(value.chunk);
|
|
196
220
|
if (value.trace !== undefined)
|
|
197
221
|
return visitor.trace(value.trace);
|
|
222
|
+
if (value.returnControl !== undefined)
|
|
223
|
+
return visitor.returnControl(value.returnControl);
|
|
198
224
|
if (value.internalServerException !== undefined)
|
|
199
225
|
return visitor.internalServerException(value.internalServerException);
|
|
200
226
|
if (value.validationException !== undefined)
|
|
@@ -256,13 +282,33 @@ export const ActionGroupInvocationInputFilterSensitiveLog = (obj) => ({
|
|
|
256
282
|
...(obj.actionGroupName && { actionGroupName: SENSITIVE_STRING }),
|
|
257
283
|
...(obj.verb && { verb: SENSITIVE_STRING }),
|
|
258
284
|
...(obj.apiPath && { apiPath: SENSITIVE_STRING }),
|
|
285
|
+
...(obj.function && { function: SENSITIVE_STRING }),
|
|
259
286
|
});
|
|
260
287
|
export const ActionGroupInvocationOutputFilterSensitiveLog = (obj) => ({
|
|
261
288
|
...obj,
|
|
262
289
|
...(obj.text && { text: SENSITIVE_STRING }),
|
|
263
290
|
});
|
|
291
|
+
export const ApiResultFilterSensitiveLog = (obj) => ({
|
|
292
|
+
...obj,
|
|
293
|
+
...(obj.apiPath && { apiPath: SENSITIVE_STRING }),
|
|
294
|
+
});
|
|
295
|
+
export const InvocationResultMemberFilterSensitiveLog = (obj) => {
|
|
296
|
+
if (obj.apiResult !== undefined)
|
|
297
|
+
return { apiResult: ApiResultFilterSensitiveLog(obj.apiResult) };
|
|
298
|
+
if (obj.functionResult !== undefined)
|
|
299
|
+
return { functionResult: obj.functionResult };
|
|
300
|
+
if (obj.$unknown !== undefined)
|
|
301
|
+
return { [obj.$unknown[0]]: "UNKNOWN" };
|
|
302
|
+
};
|
|
303
|
+
export const SessionStateFilterSensitiveLog = (obj) => ({
|
|
304
|
+
...obj,
|
|
305
|
+
...(obj.returnControlInvocationResults && {
|
|
306
|
+
returnControlInvocationResults: obj.returnControlInvocationResults.map((item) => InvocationResultMemberFilterSensitiveLog(item)),
|
|
307
|
+
}),
|
|
308
|
+
});
|
|
264
309
|
export const InvokeAgentRequestFilterSensitiveLog = (obj) => ({
|
|
265
310
|
...obj,
|
|
311
|
+
...(obj.sessionState && { sessionState: SessionStateFilterSensitiveLog(obj.sessionState) }),
|
|
266
312
|
...(obj.inputText && { inputText: SENSITIVE_STRING }),
|
|
267
313
|
});
|
|
268
314
|
export const TextResponsePartFilterSensitiveLog = (obj) => ({
|
|
@@ -302,6 +348,24 @@ export const PayloadPartFilterSensitiveLog = (obj) => ({
|
|
|
302
348
|
...(obj.bytes && { bytes: SENSITIVE_STRING }),
|
|
303
349
|
...(obj.attribution && { attribution: AttributionFilterSensitiveLog(obj.attribution) }),
|
|
304
350
|
});
|
|
351
|
+
export const ApiInvocationInputFilterSensitiveLog = (obj) => ({
|
|
352
|
+
...obj,
|
|
353
|
+
...(obj.apiPath && { apiPath: SENSITIVE_STRING }),
|
|
354
|
+
});
|
|
355
|
+
export const InvocationInputMemberFilterSensitiveLog = (obj) => {
|
|
356
|
+
if (obj.apiInvocationInput !== undefined)
|
|
357
|
+
return { apiInvocationInput: ApiInvocationInputFilterSensitiveLog(obj.apiInvocationInput) };
|
|
358
|
+
if (obj.functionInvocationInput !== undefined)
|
|
359
|
+
return { functionInvocationInput: obj.functionInvocationInput };
|
|
360
|
+
if (obj.$unknown !== undefined)
|
|
361
|
+
return { [obj.$unknown[0]]: "UNKNOWN" };
|
|
362
|
+
};
|
|
363
|
+
export const ReturnControlPayloadFilterSensitiveLog = (obj) => ({
|
|
364
|
+
...obj,
|
|
365
|
+
...(obj.invocationInputs && {
|
|
366
|
+
invocationInputs: obj.invocationInputs.map((item) => InvocationInputMemberFilterSensitiveLog(item)),
|
|
367
|
+
}),
|
|
368
|
+
});
|
|
305
369
|
export const FailureTraceFilterSensitiveLog = (obj) => ({
|
|
306
370
|
...obj,
|
|
307
371
|
...(obj.failureReason && { failureReason: SENSITIVE_STRING }),
|
|
@@ -418,6 +482,8 @@ export const ResponseStreamFilterSensitiveLog = (obj) => {
|
|
|
418
482
|
return { chunk: SENSITIVE_STRING };
|
|
419
483
|
if (obj.trace !== undefined)
|
|
420
484
|
return { trace: SENSITIVE_STRING };
|
|
485
|
+
if (obj.returnControl !== undefined)
|
|
486
|
+
return { returnControl: SENSITIVE_STRING };
|
|
421
487
|
if (obj.internalServerException !== undefined)
|
|
422
488
|
return { internalServerException: obj.internalServerException };
|
|
423
489
|
if (obj.validationException !== undefined)
|
|
@@ -273,6 +273,11 @@ const de_ResponseStream = (output, context) => {
|
|
|
273
273
|
trace: await de_TracePart_event(event["trace"], context),
|
|
274
274
|
};
|
|
275
275
|
}
|
|
276
|
+
if (event["returnControl"] != null) {
|
|
277
|
+
return {
|
|
278
|
+
returnControl: await de_ReturnControlPayload_event(event["returnControl"], context),
|
|
279
|
+
};
|
|
280
|
+
}
|
|
276
281
|
if (event["internalServerException"] != null) {
|
|
277
282
|
return {
|
|
278
283
|
internalServerException: await de_InternalServerException_event(event["internalServerException"], context),
|
|
@@ -369,6 +374,12 @@ const de_ResourceNotFoundException_event = async (output, context) => {
|
|
|
369
374
|
};
|
|
370
375
|
return de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
371
376
|
};
|
|
377
|
+
const de_ReturnControlPayload_event = async (output, context) => {
|
|
378
|
+
const contents = {};
|
|
379
|
+
const data = await parseBody(output.body, context);
|
|
380
|
+
Object.assign(contents, _json(data));
|
|
381
|
+
return contents;
|
|
382
|
+
};
|
|
372
383
|
const de_ServiceQuotaExceededException_event = async (output, context) => {
|
|
373
384
|
const parsedOutput = {
|
|
374
385
|
...output,
|
|
@@ -633,6 +644,7 @@ const de_TracePart = (output, context) => {
|
|
|
633
644
|
return take(output, {
|
|
634
645
|
agentAliasId: __expectString,
|
|
635
646
|
agentId: __expectString,
|
|
647
|
+
agentVersion: __expectString,
|
|
636
648
|
sessionId: __expectString,
|
|
637
649
|
trace: (_) => de_Trace(__expectUnion(_), context),
|
|
638
650
|
});
|
|
@@ -26,7 +26,7 @@ declare const InvokeAgentCommand_base: {
|
|
|
26
26
|
getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
|
|
27
27
|
};
|
|
28
28
|
/**
|
|
29
|
-
* <p>Sends a prompt for the agent to process and respond to.</p>
|
|
29
|
+
* <p>Sends a prompt for the agent to process and respond to. Use return control event type for function calling.</p>
|
|
30
30
|
* <note>
|
|
31
31
|
* <p>The CLI doesn't support <code>InvokeAgent</code>.</p>
|
|
32
32
|
* </note>
|
|
@@ -41,7 +41,10 @@ declare const InvokeAgentCommand_base: {
|
|
|
41
41
|
* <p>End a conversation by setting <code>endSession</code> to <code>true</code>.</p>
|
|
42
42
|
* </li>
|
|
43
43
|
* <li>
|
|
44
|
-
* <p>
|
|
44
|
+
* <p>In the <code>sessionState</code> object, you can include attributes for the session or prompt or parameters returned from the action group.</p>
|
|
45
|
+
* </li>
|
|
46
|
+
* <li>
|
|
47
|
+
* <p>Use return control event type for function calling.</p>
|
|
45
48
|
* </li>
|
|
46
49
|
* </ul>
|
|
47
50
|
* <p>The response is returned in the <code>bytes</code> field of the <code>chunk</code> object.</p>
|
|
@@ -70,13 +73,40 @@ declare const InvokeAgentCommand_base: {
|
|
|
70
73
|
* promptSessionAttributes: { // PromptSessionAttributesMap
|
|
71
74
|
* "<keys>": "STRING_VALUE",
|
|
72
75
|
* },
|
|
76
|
+
* returnControlInvocationResults: [ // ReturnControlInvocationResults
|
|
77
|
+
* { // InvocationResultMember Union: only one key present
|
|
78
|
+
* apiResult: { // ApiResult
|
|
79
|
+
* actionGroup: "STRING_VALUE", // required
|
|
80
|
+
* httpMethod: "STRING_VALUE",
|
|
81
|
+
* apiPath: "STRING_VALUE",
|
|
82
|
+
* responseBody: { // ResponseBody
|
|
83
|
+
* "<keys>": { // ContentBody
|
|
84
|
+
* body: "STRING_VALUE",
|
|
85
|
+
* },
|
|
86
|
+
* },
|
|
87
|
+
* httpStatusCode: Number("int"),
|
|
88
|
+
* responseState: "FAILURE" || "REPROMPT",
|
|
89
|
+
* },
|
|
90
|
+
* functionResult: { // FunctionResult
|
|
91
|
+
* actionGroup: "STRING_VALUE", // required
|
|
92
|
+
* function: "STRING_VALUE",
|
|
93
|
+
* responseBody: {
|
|
94
|
+
* "<keys>": {
|
|
95
|
+
* body: "STRING_VALUE",
|
|
96
|
+
* },
|
|
97
|
+
* },
|
|
98
|
+
* responseState: "FAILURE" || "REPROMPT",
|
|
99
|
+
* },
|
|
100
|
+
* },
|
|
101
|
+
* ],
|
|
102
|
+
* invocationId: "STRING_VALUE",
|
|
73
103
|
* },
|
|
74
104
|
* agentId: "STRING_VALUE", // required
|
|
75
105
|
* agentAliasId: "STRING_VALUE", // required
|
|
76
106
|
* sessionId: "STRING_VALUE", // required
|
|
77
107
|
* endSession: true || false,
|
|
78
108
|
* enableTrace: true || false,
|
|
79
|
-
* inputText: "STRING_VALUE",
|
|
109
|
+
* inputText: "STRING_VALUE",
|
|
80
110
|
* };
|
|
81
111
|
* const command = new InvokeAgentCommand(input);
|
|
82
112
|
* const response = await client.send(command);
|
|
@@ -120,6 +150,7 @@ declare const InvokeAgentCommand_base: {
|
|
|
120
150
|
* // agentId: "STRING_VALUE",
|
|
121
151
|
* // agentAliasId: "STRING_VALUE",
|
|
122
152
|
* // sessionId: "STRING_VALUE",
|
|
153
|
+
* // agentVersion: "STRING_VALUE",
|
|
123
154
|
* // trace: { // Trace Union: only one key present
|
|
124
155
|
* // preProcessingTrace: { // PreProcessingTrace Union: only one key present
|
|
125
156
|
* // modelInvocationInput: { // ModelInvocationInput
|
|
@@ -177,6 +208,7 @@ declare const InvokeAgentCommand_base: {
|
|
|
177
208
|
* // ],
|
|
178
209
|
* // },
|
|
179
210
|
* // },
|
|
211
|
+
* // function: "STRING_VALUE",
|
|
180
212
|
* // },
|
|
181
213
|
* // knowledgeBaseLookupInput: { // KnowledgeBaseLookupInput
|
|
182
214
|
* // text: "STRING_VALUE",
|
|
@@ -264,6 +296,49 @@ declare const InvokeAgentCommand_base: {
|
|
|
264
296
|
* // },
|
|
265
297
|
* // },
|
|
266
298
|
* // },
|
|
299
|
+
* // returnControl: { // ReturnControlPayload
|
|
300
|
+
* // invocationInputs: [ // InvocationInputs
|
|
301
|
+
* // { // InvocationInputMember Union: only one key present
|
|
302
|
+
* // apiInvocationInput: { // ApiInvocationInput
|
|
303
|
+
* // actionGroup: "STRING_VALUE", // required
|
|
304
|
+
* // httpMethod: "STRING_VALUE",
|
|
305
|
+
* // apiPath: "STRING_VALUE",
|
|
306
|
+
* // parameters: [ // ApiParameters
|
|
307
|
+
* // { // ApiParameter
|
|
308
|
+
* // name: "STRING_VALUE",
|
|
309
|
+
* // type: "STRING_VALUE",
|
|
310
|
+
* // value: "STRING_VALUE",
|
|
311
|
+
* // },
|
|
312
|
+
* // ],
|
|
313
|
+
* // requestBody: { // ApiRequestBody
|
|
314
|
+
* // content: { // ApiContentMap
|
|
315
|
+
* // "<keys>": { // PropertyParameters
|
|
316
|
+
* // properties: [ // ParameterList
|
|
317
|
+
* // {
|
|
318
|
+
* // name: "STRING_VALUE",
|
|
319
|
+
* // type: "STRING_VALUE",
|
|
320
|
+
* // value: "STRING_VALUE",
|
|
321
|
+
* // },
|
|
322
|
+
* // ],
|
|
323
|
+
* // },
|
|
324
|
+
* // },
|
|
325
|
+
* // },
|
|
326
|
+
* // },
|
|
327
|
+
* // functionInvocationInput: { // FunctionInvocationInput
|
|
328
|
+
* // actionGroup: "STRING_VALUE", // required
|
|
329
|
+
* // parameters: [ // FunctionParameters
|
|
330
|
+
* // { // FunctionParameter
|
|
331
|
+
* // name: "STRING_VALUE",
|
|
332
|
+
* // type: "STRING_VALUE",
|
|
333
|
+
* // value: "STRING_VALUE",
|
|
334
|
+
* // },
|
|
335
|
+
* // ],
|
|
336
|
+
* // function: "STRING_VALUE",
|
|
337
|
+
* // },
|
|
338
|
+
* // },
|
|
339
|
+
* // ],
|
|
340
|
+
* // invocationId: "STRING_VALUE",
|
|
341
|
+
* // },
|
|
267
342
|
* // internalServerException: { // InternalServerException
|
|
268
343
|
* // message: "STRING_VALUE",
|
|
269
344
|
* // },
|
|
@@ -322,7 +397,7 @@ declare const InvokeAgentCommand_base: {
|
|
|
322
397
|
* <p>An internal server error occurred. Retry your request.</p>
|
|
323
398
|
*
|
|
324
399
|
* @throws {@link ResourceNotFoundException} (client fault)
|
|
325
|
-
* <p>The specified resource ARN was not found. Check the ARN and try your request again.</p>
|
|
400
|
+
* <p>The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.</p>
|
|
326
401
|
*
|
|
327
402
|
* @throws {@link ServiceQuotaExceededException} (client fault)
|
|
328
403
|
* <p>The number of requests exceeds the service quota. Resubmit your request later.</p>
|
|
@@ -170,7 +170,7 @@ declare const RetrieveAndGenerateCommand_base: {
|
|
|
170
170
|
* <p>An internal server error occurred. Retry your request.</p>
|
|
171
171
|
*
|
|
172
172
|
* @throws {@link ResourceNotFoundException} (client fault)
|
|
173
|
-
* <p>The specified resource ARN was not found. Check the ARN and try your request again.</p>
|
|
173
|
+
* <p>The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.</p>
|
|
174
174
|
*
|
|
175
175
|
* @throws {@link ServiceQuotaExceededException} (client fault)
|
|
176
176
|
* <p>The number of requests exceeds the service quota. Resubmit your request later.</p>
|
|
@@ -141,7 +141,7 @@ declare const RetrieveCommand_base: {
|
|
|
141
141
|
* <p>An internal server error occurred. Retry your request.</p>
|
|
142
142
|
*
|
|
143
143
|
* @throws {@link ResourceNotFoundException} (client fault)
|
|
144
|
-
* <p>The specified resource ARN was not found. Check the ARN and try your request again.</p>
|
|
144
|
+
* <p>The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.</p>
|
|
145
145
|
*
|
|
146
146
|
* @throws {@link ServiceQuotaExceededException} (client fault)
|
|
147
147
|
* <p>The number of requests exceeds the service quota. Resubmit your request later.</p>
|