@aws-sdk/client-bedrock-agent-runtime 3.556.0 → 3.561.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 +166 -1
- package/dist-es/models/models_0.js +94 -0
- package/dist-es/protocols/Aws_restJson1.js +41 -0
- package/dist-types/commands/InvokeAgentCommand.d.ts +79 -4
- package/dist-types/commands/RetrieveAndGenerateCommand.d.ts +23 -2
- package/dist-types/commands/RetrieveCommand.d.ts +1 -1
- package/dist-types/models/models_0.d.ts +585 -8
- package/dist-types/ts3.4/models/models_0.d.ts +197 -1
- package/package.json +1 -1
package/dist-cjs/index.js
CHANGED
|
@@ -24,21 +24,32 @@ __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,
|
|
30
32
|
BedrockAgentRuntimeClient: () => BedrockAgentRuntimeClient,
|
|
31
33
|
BedrockAgentRuntimeServiceException: () => BedrockAgentRuntimeServiceException,
|
|
34
|
+
ByteContentDocFilterSensitiveLog: () => ByteContentDocFilterSensitiveLog,
|
|
32
35
|
CitationFilterSensitiveLog: () => CitationFilterSensitiveLog,
|
|
33
36
|
ConflictException: () => ConflictException,
|
|
34
37
|
CreationMode: () => CreationMode,
|
|
35
38
|
DependencyFailedException: () => DependencyFailedException,
|
|
39
|
+
ExternalSourceFilterSensitiveLog: () => ExternalSourceFilterSensitiveLog,
|
|
40
|
+
ExternalSourceType: () => ExternalSourceType,
|
|
41
|
+
ExternalSourcesGenerationConfigurationFilterSensitiveLog: () => ExternalSourcesGenerationConfigurationFilterSensitiveLog,
|
|
42
|
+
ExternalSourcesRetrieveAndGenerateConfigurationFilterSensitiveLog: () => ExternalSourcesRetrieveAndGenerateConfigurationFilterSensitiveLog,
|
|
36
43
|
FailureTraceFilterSensitiveLog: () => FailureTraceFilterSensitiveLog,
|
|
37
44
|
FinalResponseFilterSensitiveLog: () => FinalResponseFilterSensitiveLog,
|
|
38
45
|
GeneratedResponsePartFilterSensitiveLog: () => GeneratedResponsePartFilterSensitiveLog,
|
|
39
46
|
GenerationConfigurationFilterSensitiveLog: () => GenerationConfigurationFilterSensitiveLog,
|
|
40
47
|
InternalServerException: () => InternalServerException,
|
|
41
48
|
InvocationInputFilterSensitiveLog: () => InvocationInputFilterSensitiveLog,
|
|
49
|
+
InvocationInputMember: () => InvocationInputMember,
|
|
50
|
+
InvocationInputMemberFilterSensitiveLog: () => InvocationInputMemberFilterSensitiveLog,
|
|
51
|
+
InvocationResultMember: () => InvocationResultMember,
|
|
52
|
+
InvocationResultMemberFilterSensitiveLog: () => InvocationResultMemberFilterSensitiveLog,
|
|
42
53
|
InvocationType: () => InvocationType,
|
|
43
54
|
InvokeAgentCommand: () => InvokeAgentCommand,
|
|
44
55
|
InvokeAgentRequestFilterSensitiveLog: () => InvokeAgentRequestFilterSensitiveLog,
|
|
@@ -68,6 +79,7 @@ __export(src_exports, {
|
|
|
68
79
|
RationaleFilterSensitiveLog: () => RationaleFilterSensitiveLog,
|
|
69
80
|
RepromptResponseFilterSensitiveLog: () => RepromptResponseFilterSensitiveLog,
|
|
70
81
|
ResourceNotFoundException: () => ResourceNotFoundException,
|
|
82
|
+
ResponseState: () => ResponseState,
|
|
71
83
|
ResponseStream: () => ResponseStream,
|
|
72
84
|
ResponseStreamFilterSensitiveLog: () => ResponseStreamFilterSensitiveLog,
|
|
73
85
|
RetrievalFilter: () => RetrievalFilter,
|
|
@@ -86,8 +98,10 @@ __export(src_exports, {
|
|
|
86
98
|
RetrieveRequestFilterSensitiveLog: () => RetrieveRequestFilterSensitiveLog,
|
|
87
99
|
RetrieveResponseFilterSensitiveLog: () => RetrieveResponseFilterSensitiveLog,
|
|
88
100
|
RetrievedReferenceFilterSensitiveLog: () => RetrievedReferenceFilterSensitiveLog,
|
|
101
|
+
ReturnControlPayloadFilterSensitiveLog: () => ReturnControlPayloadFilterSensitiveLog,
|
|
89
102
|
SearchType: () => SearchType,
|
|
90
103
|
ServiceQuotaExceededException: () => ServiceQuotaExceededException,
|
|
104
|
+
SessionStateFilterSensitiveLog: () => SessionStateFilterSensitiveLog,
|
|
91
105
|
Source: () => Source,
|
|
92
106
|
TextResponsePartFilterSensitiveLog: () => TextResponsePartFilterSensitiveLog,
|
|
93
107
|
ThrottlingException: () => ThrottlingException,
|
|
@@ -360,6 +374,20 @@ var _InternalServerException = class _InternalServerException extends BedrockAge
|
|
|
360
374
|
};
|
|
361
375
|
__name(_InternalServerException, "InternalServerException");
|
|
362
376
|
var InternalServerException = _InternalServerException;
|
|
377
|
+
var ResponseState = {
|
|
378
|
+
FAILURE: "FAILURE",
|
|
379
|
+
REPROMPT: "REPROMPT"
|
|
380
|
+
};
|
|
381
|
+
var InvocationResultMember;
|
|
382
|
+
((InvocationResultMember3) => {
|
|
383
|
+
InvocationResultMember3.visit = /* @__PURE__ */ __name((value, visitor) => {
|
|
384
|
+
if (value.apiResult !== void 0)
|
|
385
|
+
return visitor.apiResult(value.apiResult);
|
|
386
|
+
if (value.functionResult !== void 0)
|
|
387
|
+
return visitor.functionResult(value.functionResult);
|
|
388
|
+
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
389
|
+
}, "visit");
|
|
390
|
+
})(InvocationResultMember || (InvocationResultMember = {}));
|
|
363
391
|
var RetrievalResultLocationType = {
|
|
364
392
|
S3: "S3"
|
|
365
393
|
};
|
|
@@ -380,6 +408,16 @@ var _ResourceNotFoundException = class _ResourceNotFoundException extends Bedroc
|
|
|
380
408
|
};
|
|
381
409
|
__name(_ResourceNotFoundException, "ResourceNotFoundException");
|
|
382
410
|
var ResourceNotFoundException = _ResourceNotFoundException;
|
|
411
|
+
var InvocationInputMember;
|
|
412
|
+
((InvocationInputMember2) => {
|
|
413
|
+
InvocationInputMember2.visit = /* @__PURE__ */ __name((value, visitor) => {
|
|
414
|
+
if (value.apiInvocationInput !== void 0)
|
|
415
|
+
return visitor.apiInvocationInput(value.apiInvocationInput);
|
|
416
|
+
if (value.functionInvocationInput !== void 0)
|
|
417
|
+
return visitor.functionInvocationInput(value.functionInvocationInput);
|
|
418
|
+
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
419
|
+
}, "visit");
|
|
420
|
+
})(InvocationInputMember || (InvocationInputMember = {}));
|
|
383
421
|
var _ServiceQuotaExceededException = class _ServiceQuotaExceededException extends BedrockAgentRuntimeServiceException {
|
|
384
422
|
/**
|
|
385
423
|
* @internal
|
|
@@ -513,6 +551,8 @@ var ResponseStream;
|
|
|
513
551
|
return visitor.chunk(value.chunk);
|
|
514
552
|
if (value.trace !== void 0)
|
|
515
553
|
return visitor.trace(value.trace);
|
|
554
|
+
if (value.returnControl !== void 0)
|
|
555
|
+
return visitor.returnControl(value.returnControl);
|
|
516
556
|
if (value.internalServerException !== void 0)
|
|
517
557
|
return visitor.internalServerException(value.internalServerException);
|
|
518
558
|
if (value.validationException !== void 0)
|
|
@@ -534,11 +574,16 @@ var ResponseStream;
|
|
|
534
574
|
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
535
575
|
}, "visit");
|
|
536
576
|
})(ResponseStream || (ResponseStream = {}));
|
|
577
|
+
var ExternalSourceType = {
|
|
578
|
+
BYTE_CONTENT: "BYTE_CONTENT",
|
|
579
|
+
S3: "S3"
|
|
580
|
+
};
|
|
537
581
|
var SearchType = {
|
|
538
582
|
HYBRID: "HYBRID",
|
|
539
583
|
SEMANTIC: "SEMANTIC"
|
|
540
584
|
};
|
|
541
585
|
var RetrieveAndGenerateType = {
|
|
586
|
+
EXTERNAL_SOURCES: "EXTERNAL_SOURCES",
|
|
542
587
|
KNOWLEDGE_BASE: "KNOWLEDGE_BASE"
|
|
543
588
|
};
|
|
544
589
|
var RetrievalFilter;
|
|
@@ -573,14 +618,36 @@ var ActionGroupInvocationInputFilterSensitiveLog = /* @__PURE__ */ __name((obj)
|
|
|
573
618
|
...obj,
|
|
574
619
|
...obj.actionGroupName && { actionGroupName: import_smithy_client.SENSITIVE_STRING },
|
|
575
620
|
...obj.verb && { verb: import_smithy_client.SENSITIVE_STRING },
|
|
576
|
-
...obj.apiPath && { apiPath: import_smithy_client.SENSITIVE_STRING }
|
|
621
|
+
...obj.apiPath && { apiPath: import_smithy_client.SENSITIVE_STRING },
|
|
622
|
+
...obj.function && { function: import_smithy_client.SENSITIVE_STRING }
|
|
577
623
|
}), "ActionGroupInvocationInputFilterSensitiveLog");
|
|
578
624
|
var ActionGroupInvocationOutputFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
|
|
579
625
|
...obj,
|
|
580
626
|
...obj.text && { text: import_smithy_client.SENSITIVE_STRING }
|
|
581
627
|
}), "ActionGroupInvocationOutputFilterSensitiveLog");
|
|
628
|
+
var ApiResultFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
|
|
629
|
+
...obj,
|
|
630
|
+
...obj.apiPath && { apiPath: import_smithy_client.SENSITIVE_STRING }
|
|
631
|
+
}), "ApiResultFilterSensitiveLog");
|
|
632
|
+
var InvocationResultMemberFilterSensitiveLog = /* @__PURE__ */ __name((obj) => {
|
|
633
|
+
if (obj.apiResult !== void 0)
|
|
634
|
+
return { apiResult: ApiResultFilterSensitiveLog(obj.apiResult) };
|
|
635
|
+
if (obj.functionResult !== void 0)
|
|
636
|
+
return { functionResult: obj.functionResult };
|
|
637
|
+
if (obj.$unknown !== void 0)
|
|
638
|
+
return { [obj.$unknown[0]]: "UNKNOWN" };
|
|
639
|
+
}, "InvocationResultMemberFilterSensitiveLog");
|
|
640
|
+
var SessionStateFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
|
|
641
|
+
...obj,
|
|
642
|
+
...obj.returnControlInvocationResults && {
|
|
643
|
+
returnControlInvocationResults: obj.returnControlInvocationResults.map(
|
|
644
|
+
(item) => InvocationResultMemberFilterSensitiveLog(item)
|
|
645
|
+
)
|
|
646
|
+
}
|
|
647
|
+
}), "SessionStateFilterSensitiveLog");
|
|
582
648
|
var InvokeAgentRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
|
|
583
649
|
...obj,
|
|
650
|
+
...obj.sessionState && { sessionState: SessionStateFilterSensitiveLog(obj.sessionState) },
|
|
584
651
|
...obj.inputText && { inputText: import_smithy_client.SENSITIVE_STRING }
|
|
585
652
|
}), "InvokeAgentRequestFilterSensitiveLog");
|
|
586
653
|
var TextResponsePartFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
|
|
@@ -620,6 +687,24 @@ var PayloadPartFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
|
|
|
620
687
|
...obj.bytes && { bytes: import_smithy_client.SENSITIVE_STRING },
|
|
621
688
|
...obj.attribution && { attribution: AttributionFilterSensitiveLog(obj.attribution) }
|
|
622
689
|
}), "PayloadPartFilterSensitiveLog");
|
|
690
|
+
var ApiInvocationInputFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
|
|
691
|
+
...obj,
|
|
692
|
+
...obj.apiPath && { apiPath: import_smithy_client.SENSITIVE_STRING }
|
|
693
|
+
}), "ApiInvocationInputFilterSensitiveLog");
|
|
694
|
+
var InvocationInputMemberFilterSensitiveLog = /* @__PURE__ */ __name((obj) => {
|
|
695
|
+
if (obj.apiInvocationInput !== void 0)
|
|
696
|
+
return { apiInvocationInput: ApiInvocationInputFilterSensitiveLog(obj.apiInvocationInput) };
|
|
697
|
+
if (obj.functionInvocationInput !== void 0)
|
|
698
|
+
return { functionInvocationInput: obj.functionInvocationInput };
|
|
699
|
+
if (obj.$unknown !== void 0)
|
|
700
|
+
return { [obj.$unknown[0]]: "UNKNOWN" };
|
|
701
|
+
}, "InvocationInputMemberFilterSensitiveLog");
|
|
702
|
+
var ReturnControlPayloadFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
|
|
703
|
+
...obj,
|
|
704
|
+
...obj.invocationInputs && {
|
|
705
|
+
invocationInputs: obj.invocationInputs.map((item) => InvocationInputMemberFilterSensitiveLog(item))
|
|
706
|
+
}
|
|
707
|
+
}), "ReturnControlPayloadFilterSensitiveLog");
|
|
623
708
|
var FailureTraceFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
|
|
624
709
|
...obj,
|
|
625
710
|
...obj.failureReason && { failureReason: import_smithy_client.SENSITIVE_STRING }
|
|
@@ -736,6 +821,8 @@ var ResponseStreamFilterSensitiveLog = /* @__PURE__ */ __name((obj) => {
|
|
|
736
821
|
return { chunk: import_smithy_client.SENSITIVE_STRING };
|
|
737
822
|
if (obj.trace !== void 0)
|
|
738
823
|
return { trace: import_smithy_client.SENSITIVE_STRING };
|
|
824
|
+
if (obj.returnControl !== void 0)
|
|
825
|
+
return { returnControl: import_smithy_client.SENSITIVE_STRING };
|
|
739
826
|
if (obj.internalServerException !== void 0)
|
|
740
827
|
return { internalServerException: obj.internalServerException };
|
|
741
828
|
if (obj.validationException !== void 0)
|
|
@@ -768,6 +855,26 @@ var PromptTemplateFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
|
|
|
768
855
|
...obj,
|
|
769
856
|
...obj.textPromptTemplate && { textPromptTemplate: import_smithy_client.SENSITIVE_STRING }
|
|
770
857
|
}), "PromptTemplateFilterSensitiveLog");
|
|
858
|
+
var ExternalSourcesGenerationConfigurationFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
|
|
859
|
+
...obj,
|
|
860
|
+
...obj.promptTemplate && { promptTemplate: PromptTemplateFilterSensitiveLog(obj.promptTemplate) }
|
|
861
|
+
}), "ExternalSourcesGenerationConfigurationFilterSensitiveLog");
|
|
862
|
+
var ByteContentDocFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
|
|
863
|
+
...obj,
|
|
864
|
+
...obj.identifier && { identifier: import_smithy_client.SENSITIVE_STRING },
|
|
865
|
+
...obj.data && { data: import_smithy_client.SENSITIVE_STRING }
|
|
866
|
+
}), "ByteContentDocFilterSensitiveLog");
|
|
867
|
+
var ExternalSourceFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
|
|
868
|
+
...obj,
|
|
869
|
+
...obj.byteContent && { byteContent: ByteContentDocFilterSensitiveLog(obj.byteContent) }
|
|
870
|
+
}), "ExternalSourceFilterSensitiveLog");
|
|
871
|
+
var ExternalSourcesRetrieveAndGenerateConfigurationFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
|
|
872
|
+
...obj,
|
|
873
|
+
...obj.sources && { sources: obj.sources.map((item) => ExternalSourceFilterSensitiveLog(item)) },
|
|
874
|
+
...obj.generationConfiguration && {
|
|
875
|
+
generationConfiguration: ExternalSourcesGenerationConfigurationFilterSensitiveLog(obj.generationConfiguration)
|
|
876
|
+
}
|
|
877
|
+
}), "ExternalSourcesRetrieveAndGenerateConfigurationFilterSensitiveLog");
|
|
771
878
|
var GenerationConfigurationFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
|
|
772
879
|
...obj,
|
|
773
880
|
...obj.promptTemplate && { promptTemplate: PromptTemplateFilterSensitiveLog(obj.promptTemplate) }
|
|
@@ -851,6 +958,11 @@ var RetrieveAndGenerateConfigurationFilterSensitiveLog = /* @__PURE__ */ __name(
|
|
|
851
958
|
knowledgeBaseConfiguration: KnowledgeBaseRetrieveAndGenerateConfigurationFilterSensitiveLog(
|
|
852
959
|
obj.knowledgeBaseConfiguration
|
|
853
960
|
)
|
|
961
|
+
},
|
|
962
|
+
...obj.externalSourcesConfiguration && {
|
|
963
|
+
externalSourcesConfiguration: ExternalSourcesRetrieveAndGenerateConfigurationFilterSensitiveLog(
|
|
964
|
+
obj.externalSourcesConfiguration
|
|
965
|
+
)
|
|
854
966
|
}
|
|
855
967
|
}), "RetrieveAndGenerateConfigurationFilterSensitiveLog");
|
|
856
968
|
var RetrieveAndGenerateRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
|
|
@@ -1143,6 +1255,11 @@ var de_ResponseStream = /* @__PURE__ */ __name((output, context) => {
|
|
|
1143
1255
|
trace: await de_TracePart_event(event["trace"], context)
|
|
1144
1256
|
};
|
|
1145
1257
|
}
|
|
1258
|
+
if (event["returnControl"] != null) {
|
|
1259
|
+
return {
|
|
1260
|
+
returnControl: await de_ReturnControlPayload_event(event["returnControl"], context)
|
|
1261
|
+
};
|
|
1262
|
+
}
|
|
1146
1263
|
if (event["internalServerException"] != null) {
|
|
1147
1264
|
return {
|
|
1148
1265
|
internalServerException: await de_InternalServerException_event(event["internalServerException"], context)
|
|
@@ -1248,6 +1365,12 @@ var de_ResourceNotFoundException_event = /* @__PURE__ */ __name(async (output, c
|
|
|
1248
1365
|
};
|
|
1249
1366
|
return de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1250
1367
|
}, "de_ResourceNotFoundException_event");
|
|
1368
|
+
var de_ReturnControlPayload_event = /* @__PURE__ */ __name(async (output, context) => {
|
|
1369
|
+
const contents = {};
|
|
1370
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
1371
|
+
Object.assign(contents, (0, import_smithy_client._json)(data));
|
|
1372
|
+
return contents;
|
|
1373
|
+
}, "de_ReturnControlPayload_event");
|
|
1251
1374
|
var de_ServiceQuotaExceededException_event = /* @__PURE__ */ __name(async (output, context) => {
|
|
1252
1375
|
const parsedOutput = {
|
|
1253
1376
|
...output,
|
|
@@ -1275,6 +1398,32 @@ var de_ValidationException_event = /* @__PURE__ */ __name(async (output, context
|
|
|
1275
1398
|
};
|
|
1276
1399
|
return de_ValidationExceptionRes(parsedOutput, context);
|
|
1277
1400
|
}, "de_ValidationException_event");
|
|
1401
|
+
var se_ByteContentDoc = /* @__PURE__ */ __name((input, context) => {
|
|
1402
|
+
return (0, import_smithy_client.take)(input, {
|
|
1403
|
+
contentType: [],
|
|
1404
|
+
data: context.base64Encoder,
|
|
1405
|
+
identifier: []
|
|
1406
|
+
});
|
|
1407
|
+
}, "se_ByteContentDoc");
|
|
1408
|
+
var se_ExternalSource = /* @__PURE__ */ __name((input, context) => {
|
|
1409
|
+
return (0, import_smithy_client.take)(input, {
|
|
1410
|
+
byteContent: (_) => se_ByteContentDoc(_, context),
|
|
1411
|
+
s3Location: import_smithy_client._json,
|
|
1412
|
+
sourceType: []
|
|
1413
|
+
});
|
|
1414
|
+
}, "se_ExternalSource");
|
|
1415
|
+
var se_ExternalSources = /* @__PURE__ */ __name((input, context) => {
|
|
1416
|
+
return input.filter((e) => e != null).map((entry) => {
|
|
1417
|
+
return se_ExternalSource(entry, context);
|
|
1418
|
+
});
|
|
1419
|
+
}, "se_ExternalSources");
|
|
1420
|
+
var se_ExternalSourcesRetrieveAndGenerateConfiguration = /* @__PURE__ */ __name((input, context) => {
|
|
1421
|
+
return (0, import_smithy_client.take)(input, {
|
|
1422
|
+
generationConfiguration: import_smithy_client._json,
|
|
1423
|
+
modelArn: [],
|
|
1424
|
+
sources: (_) => se_ExternalSources(_, context)
|
|
1425
|
+
});
|
|
1426
|
+
}, "se_ExternalSourcesRetrieveAndGenerateConfiguration");
|
|
1278
1427
|
var se_FilterAttribute = /* @__PURE__ */ __name((input, context) => {
|
|
1279
1428
|
return (0, import_smithy_client.take)(input, {
|
|
1280
1429
|
key: [],
|
|
@@ -1327,6 +1476,7 @@ var se_RetrievalFilterList = /* @__PURE__ */ __name((input, context) => {
|
|
|
1327
1476
|
}, "se_RetrievalFilterList");
|
|
1328
1477
|
var se_RetrieveAndGenerateConfiguration = /* @__PURE__ */ __name((input, context) => {
|
|
1329
1478
|
return (0, import_smithy_client.take)(input, {
|
|
1479
|
+
externalSourcesConfiguration: (_) => se_ExternalSourcesRetrieveAndGenerateConfiguration(_, context),
|
|
1330
1480
|
knowledgeBaseConfiguration: (_) => se_KnowledgeBaseRetrieveAndGenerateConfiguration(_, context),
|
|
1331
1481
|
type: []
|
|
1332
1482
|
});
|
|
@@ -1504,6 +1654,7 @@ var de_TracePart = /* @__PURE__ */ __name((output, context) => {
|
|
|
1504
1654
|
return (0, import_smithy_client.take)(output, {
|
|
1505
1655
|
agentAliasId: import_smithy_client.expectString,
|
|
1506
1656
|
agentId: import_smithy_client.expectString,
|
|
1657
|
+
agentVersion: import_smithy_client.expectString,
|
|
1507
1658
|
sessionId: import_smithy_client.expectString,
|
|
1508
1659
|
trace: (_) => de_Trace((0, import_core2.awsExpectUnion)(_), context)
|
|
1509
1660
|
});
|
|
@@ -1605,8 +1756,11 @@ var paginateRetrieve = (0, import_core.createPaginator)(BedrockAgentRuntimeClien
|
|
|
1605
1756
|
ConflictException,
|
|
1606
1757
|
DependencyFailedException,
|
|
1607
1758
|
InternalServerException,
|
|
1759
|
+
ResponseState,
|
|
1760
|
+
InvocationResultMember,
|
|
1608
1761
|
RetrievalResultLocationType,
|
|
1609
1762
|
ResourceNotFoundException,
|
|
1763
|
+
InvocationInputMember,
|
|
1610
1764
|
ServiceQuotaExceededException,
|
|
1611
1765
|
ThrottlingException,
|
|
1612
1766
|
InvocationType,
|
|
@@ -1620,11 +1774,15 @@ var paginateRetrieve = (0, import_core.createPaginator)(BedrockAgentRuntimeClien
|
|
|
1620
1774
|
Trace,
|
|
1621
1775
|
ValidationException,
|
|
1622
1776
|
ResponseStream,
|
|
1777
|
+
ExternalSourceType,
|
|
1623
1778
|
SearchType,
|
|
1624
1779
|
RetrieveAndGenerateType,
|
|
1625
1780
|
RetrievalFilter,
|
|
1626
1781
|
ActionGroupInvocationInputFilterSensitiveLog,
|
|
1627
1782
|
ActionGroupInvocationOutputFilterSensitiveLog,
|
|
1783
|
+
ApiResultFilterSensitiveLog,
|
|
1784
|
+
InvocationResultMemberFilterSensitiveLog,
|
|
1785
|
+
SessionStateFilterSensitiveLog,
|
|
1628
1786
|
InvokeAgentRequestFilterSensitiveLog,
|
|
1629
1787
|
TextResponsePartFilterSensitiveLog,
|
|
1630
1788
|
GeneratedResponsePartFilterSensitiveLog,
|
|
@@ -1634,6 +1792,9 @@ var paginateRetrieve = (0, import_core.createPaginator)(BedrockAgentRuntimeClien
|
|
|
1634
1792
|
CitationFilterSensitiveLog,
|
|
1635
1793
|
AttributionFilterSensitiveLog,
|
|
1636
1794
|
PayloadPartFilterSensitiveLog,
|
|
1795
|
+
ApiInvocationInputFilterSensitiveLog,
|
|
1796
|
+
InvocationInputMemberFilterSensitiveLog,
|
|
1797
|
+
ReturnControlPayloadFilterSensitiveLog,
|
|
1637
1798
|
FailureTraceFilterSensitiveLog,
|
|
1638
1799
|
KnowledgeBaseLookupInputFilterSensitiveLog,
|
|
1639
1800
|
InvocationInputFilterSensitiveLog,
|
|
@@ -1656,6 +1817,10 @@ var paginateRetrieve = (0, import_core.createPaginator)(BedrockAgentRuntimeClien
|
|
|
1656
1817
|
InvokeAgentResponseFilterSensitiveLog,
|
|
1657
1818
|
RetrieveAndGenerateInputFilterSensitiveLog,
|
|
1658
1819
|
PromptTemplateFilterSensitiveLog,
|
|
1820
|
+
ExternalSourcesGenerationConfigurationFilterSensitiveLog,
|
|
1821
|
+
ByteContentDocFilterSensitiveLog,
|
|
1822
|
+
ExternalSourceFilterSensitiveLog,
|
|
1823
|
+
ExternalSourcesRetrieveAndGenerateConfigurationFilterSensitiveLog,
|
|
1659
1824
|
GenerationConfigurationFilterSensitiveLog,
|
|
1660
1825
|
RetrieveAndGenerateOutputFilterSensitiveLog,
|
|
1661
1826
|
RetrieveAndGenerateResponseFilterSensitiveLog,
|
|
@@ -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)
|
|
@@ -216,11 +242,16 @@ export var ResponseStream;
|
|
|
216
242
|
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
217
243
|
};
|
|
218
244
|
})(ResponseStream || (ResponseStream = {}));
|
|
245
|
+
export const ExternalSourceType = {
|
|
246
|
+
BYTE_CONTENT: "BYTE_CONTENT",
|
|
247
|
+
S3: "S3",
|
|
248
|
+
};
|
|
219
249
|
export const SearchType = {
|
|
220
250
|
HYBRID: "HYBRID",
|
|
221
251
|
SEMANTIC: "SEMANTIC",
|
|
222
252
|
};
|
|
223
253
|
export const RetrieveAndGenerateType = {
|
|
254
|
+
EXTERNAL_SOURCES: "EXTERNAL_SOURCES",
|
|
224
255
|
KNOWLEDGE_BASE: "KNOWLEDGE_BASE",
|
|
225
256
|
};
|
|
226
257
|
export var RetrievalFilter;
|
|
@@ -256,13 +287,33 @@ export const ActionGroupInvocationInputFilterSensitiveLog = (obj) => ({
|
|
|
256
287
|
...(obj.actionGroupName && { actionGroupName: SENSITIVE_STRING }),
|
|
257
288
|
...(obj.verb && { verb: SENSITIVE_STRING }),
|
|
258
289
|
...(obj.apiPath && { apiPath: SENSITIVE_STRING }),
|
|
290
|
+
...(obj.function && { function: SENSITIVE_STRING }),
|
|
259
291
|
});
|
|
260
292
|
export const ActionGroupInvocationOutputFilterSensitiveLog = (obj) => ({
|
|
261
293
|
...obj,
|
|
262
294
|
...(obj.text && { text: SENSITIVE_STRING }),
|
|
263
295
|
});
|
|
296
|
+
export const ApiResultFilterSensitiveLog = (obj) => ({
|
|
297
|
+
...obj,
|
|
298
|
+
...(obj.apiPath && { apiPath: SENSITIVE_STRING }),
|
|
299
|
+
});
|
|
300
|
+
export const InvocationResultMemberFilterSensitiveLog = (obj) => {
|
|
301
|
+
if (obj.apiResult !== undefined)
|
|
302
|
+
return { apiResult: ApiResultFilterSensitiveLog(obj.apiResult) };
|
|
303
|
+
if (obj.functionResult !== undefined)
|
|
304
|
+
return { functionResult: obj.functionResult };
|
|
305
|
+
if (obj.$unknown !== undefined)
|
|
306
|
+
return { [obj.$unknown[0]]: "UNKNOWN" };
|
|
307
|
+
};
|
|
308
|
+
export const SessionStateFilterSensitiveLog = (obj) => ({
|
|
309
|
+
...obj,
|
|
310
|
+
...(obj.returnControlInvocationResults && {
|
|
311
|
+
returnControlInvocationResults: obj.returnControlInvocationResults.map((item) => InvocationResultMemberFilterSensitiveLog(item)),
|
|
312
|
+
}),
|
|
313
|
+
});
|
|
264
314
|
export const InvokeAgentRequestFilterSensitiveLog = (obj) => ({
|
|
265
315
|
...obj,
|
|
316
|
+
...(obj.sessionState && { sessionState: SessionStateFilterSensitiveLog(obj.sessionState) }),
|
|
266
317
|
...(obj.inputText && { inputText: SENSITIVE_STRING }),
|
|
267
318
|
});
|
|
268
319
|
export const TextResponsePartFilterSensitiveLog = (obj) => ({
|
|
@@ -302,6 +353,24 @@ export const PayloadPartFilterSensitiveLog = (obj) => ({
|
|
|
302
353
|
...(obj.bytes && { bytes: SENSITIVE_STRING }),
|
|
303
354
|
...(obj.attribution && { attribution: AttributionFilterSensitiveLog(obj.attribution) }),
|
|
304
355
|
});
|
|
356
|
+
export const ApiInvocationInputFilterSensitiveLog = (obj) => ({
|
|
357
|
+
...obj,
|
|
358
|
+
...(obj.apiPath && { apiPath: SENSITIVE_STRING }),
|
|
359
|
+
});
|
|
360
|
+
export const InvocationInputMemberFilterSensitiveLog = (obj) => {
|
|
361
|
+
if (obj.apiInvocationInput !== undefined)
|
|
362
|
+
return { apiInvocationInput: ApiInvocationInputFilterSensitiveLog(obj.apiInvocationInput) };
|
|
363
|
+
if (obj.functionInvocationInput !== undefined)
|
|
364
|
+
return { functionInvocationInput: obj.functionInvocationInput };
|
|
365
|
+
if (obj.$unknown !== undefined)
|
|
366
|
+
return { [obj.$unknown[0]]: "UNKNOWN" };
|
|
367
|
+
};
|
|
368
|
+
export const ReturnControlPayloadFilterSensitiveLog = (obj) => ({
|
|
369
|
+
...obj,
|
|
370
|
+
...(obj.invocationInputs && {
|
|
371
|
+
invocationInputs: obj.invocationInputs.map((item) => InvocationInputMemberFilterSensitiveLog(item)),
|
|
372
|
+
}),
|
|
373
|
+
});
|
|
305
374
|
export const FailureTraceFilterSensitiveLog = (obj) => ({
|
|
306
375
|
...obj,
|
|
307
376
|
...(obj.failureReason && { failureReason: SENSITIVE_STRING }),
|
|
@@ -418,6 +487,8 @@ export const ResponseStreamFilterSensitiveLog = (obj) => {
|
|
|
418
487
|
return { chunk: SENSITIVE_STRING };
|
|
419
488
|
if (obj.trace !== undefined)
|
|
420
489
|
return { trace: SENSITIVE_STRING };
|
|
490
|
+
if (obj.returnControl !== undefined)
|
|
491
|
+
return { returnControl: SENSITIVE_STRING };
|
|
421
492
|
if (obj.internalServerException !== undefined)
|
|
422
493
|
return { internalServerException: obj.internalServerException };
|
|
423
494
|
if (obj.validationException !== undefined)
|
|
@@ -450,6 +521,26 @@ export const PromptTemplateFilterSensitiveLog = (obj) => ({
|
|
|
450
521
|
...obj,
|
|
451
522
|
...(obj.textPromptTemplate && { textPromptTemplate: SENSITIVE_STRING }),
|
|
452
523
|
});
|
|
524
|
+
export const ExternalSourcesGenerationConfigurationFilterSensitiveLog = (obj) => ({
|
|
525
|
+
...obj,
|
|
526
|
+
...(obj.promptTemplate && { promptTemplate: PromptTemplateFilterSensitiveLog(obj.promptTemplate) }),
|
|
527
|
+
});
|
|
528
|
+
export const ByteContentDocFilterSensitiveLog = (obj) => ({
|
|
529
|
+
...obj,
|
|
530
|
+
...(obj.identifier && { identifier: SENSITIVE_STRING }),
|
|
531
|
+
...(obj.data && { data: SENSITIVE_STRING }),
|
|
532
|
+
});
|
|
533
|
+
export const ExternalSourceFilterSensitiveLog = (obj) => ({
|
|
534
|
+
...obj,
|
|
535
|
+
...(obj.byteContent && { byteContent: ByteContentDocFilterSensitiveLog(obj.byteContent) }),
|
|
536
|
+
});
|
|
537
|
+
export const ExternalSourcesRetrieveAndGenerateConfigurationFilterSensitiveLog = (obj) => ({
|
|
538
|
+
...obj,
|
|
539
|
+
...(obj.sources && { sources: obj.sources.map((item) => ExternalSourceFilterSensitiveLog(item)) }),
|
|
540
|
+
...(obj.generationConfiguration && {
|
|
541
|
+
generationConfiguration: ExternalSourcesGenerationConfigurationFilterSensitiveLog(obj.generationConfiguration),
|
|
542
|
+
}),
|
|
543
|
+
});
|
|
453
544
|
export const GenerationConfigurationFilterSensitiveLog = (obj) => ({
|
|
454
545
|
...obj,
|
|
455
546
|
...(obj.promptTemplate && { promptTemplate: PromptTemplateFilterSensitiveLog(obj.promptTemplate) }),
|
|
@@ -532,6 +623,9 @@ export const RetrieveAndGenerateConfigurationFilterSensitiveLog = (obj) => ({
|
|
|
532
623
|
...(obj.knowledgeBaseConfiguration && {
|
|
533
624
|
knowledgeBaseConfiguration: KnowledgeBaseRetrieveAndGenerateConfigurationFilterSensitiveLog(obj.knowledgeBaseConfiguration),
|
|
534
625
|
}),
|
|
626
|
+
...(obj.externalSourcesConfiguration && {
|
|
627
|
+
externalSourcesConfiguration: ExternalSourcesRetrieveAndGenerateConfigurationFilterSensitiveLog(obj.externalSourcesConfiguration),
|
|
628
|
+
}),
|
|
535
629
|
});
|
|
536
630
|
export const RetrieveAndGenerateRequestFilterSensitiveLog = (obj) => ({
|
|
537
631
|
...obj,
|
|
@@ -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,
|
|
@@ -396,6 +407,34 @@ const de_ValidationException_event = async (output, context) => {
|
|
|
396
407
|
};
|
|
397
408
|
return de_ValidationExceptionRes(parsedOutput, context);
|
|
398
409
|
};
|
|
410
|
+
const se_ByteContentDoc = (input, context) => {
|
|
411
|
+
return take(input, {
|
|
412
|
+
contentType: [],
|
|
413
|
+
data: context.base64Encoder,
|
|
414
|
+
identifier: [],
|
|
415
|
+
});
|
|
416
|
+
};
|
|
417
|
+
const se_ExternalSource = (input, context) => {
|
|
418
|
+
return take(input, {
|
|
419
|
+
byteContent: (_) => se_ByteContentDoc(_, context),
|
|
420
|
+
s3Location: _json,
|
|
421
|
+
sourceType: [],
|
|
422
|
+
});
|
|
423
|
+
};
|
|
424
|
+
const se_ExternalSources = (input, context) => {
|
|
425
|
+
return input
|
|
426
|
+
.filter((e) => e != null)
|
|
427
|
+
.map((entry) => {
|
|
428
|
+
return se_ExternalSource(entry, context);
|
|
429
|
+
});
|
|
430
|
+
};
|
|
431
|
+
const se_ExternalSourcesRetrieveAndGenerateConfiguration = (input, context) => {
|
|
432
|
+
return take(input, {
|
|
433
|
+
generationConfiguration: _json,
|
|
434
|
+
modelArn: [],
|
|
435
|
+
sources: (_) => se_ExternalSources(_, context),
|
|
436
|
+
});
|
|
437
|
+
};
|
|
399
438
|
const se_FilterAttribute = (input, context) => {
|
|
400
439
|
return take(input, {
|
|
401
440
|
key: [],
|
|
@@ -450,6 +489,7 @@ const se_RetrievalFilterList = (input, context) => {
|
|
|
450
489
|
};
|
|
451
490
|
const se_RetrieveAndGenerateConfiguration = (input, context) => {
|
|
452
491
|
return take(input, {
|
|
492
|
+
externalSourcesConfiguration: (_) => se_ExternalSourcesRetrieveAndGenerateConfiguration(_, context),
|
|
453
493
|
knowledgeBaseConfiguration: (_) => se_KnowledgeBaseRetrieveAndGenerateConfiguration(_, context),
|
|
454
494
|
type: [],
|
|
455
495
|
});
|
|
@@ -633,6 +673,7 @@ const de_TracePart = (output, context) => {
|
|
|
633
673
|
return take(output, {
|
|
634
674
|
agentAliasId: __expectString,
|
|
635
675
|
agentId: __expectString,
|
|
676
|
+
agentVersion: __expectString,
|
|
636
677
|
sessionId: __expectString,
|
|
637
678
|
trace: (_) => de_Trace(__expectUnion(_), context),
|
|
638
679
|
});
|