@aws-sdk/client-bedrock-agent-runtime 3.542.0 → 3.543.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 +229 -35
- package/dist-es/models/models_0.js +95 -23
- package/dist-es/protocols/Aws_restJson1.js +126 -6
- package/dist-types/commands/InvokeAgentCommand.d.ts +6 -0
- package/dist-types/commands/RetrieveAndGenerateCommand.d.ts +52 -1
- package/dist-types/commands/RetrieveCommand.d.ts +51 -0
- package/dist-types/models/models_0.d.ts +427 -125
- package/dist-types/ts3.4/models/models_0.d.ts +256 -41
- package/package.json +1 -1
package/dist-cjs/index.js
CHANGED
|
@@ -46,8 +46,10 @@ __export(src_exports, {
|
|
|
46
46
|
KnowledgeBaseLookupInputFilterSensitiveLog: () => KnowledgeBaseLookupInputFilterSensitiveLog,
|
|
47
47
|
KnowledgeBaseLookupOutputFilterSensitiveLog: () => KnowledgeBaseLookupOutputFilterSensitiveLog,
|
|
48
48
|
KnowledgeBaseQueryFilterSensitiveLog: () => KnowledgeBaseQueryFilterSensitiveLog,
|
|
49
|
+
KnowledgeBaseRetrievalConfigurationFilterSensitiveLog: () => KnowledgeBaseRetrievalConfigurationFilterSensitiveLog,
|
|
49
50
|
KnowledgeBaseRetrievalResultFilterSensitiveLog: () => KnowledgeBaseRetrievalResultFilterSensitiveLog,
|
|
50
51
|
KnowledgeBaseRetrieveAndGenerateConfigurationFilterSensitiveLog: () => KnowledgeBaseRetrieveAndGenerateConfigurationFilterSensitiveLog,
|
|
52
|
+
KnowledgeBaseVectorSearchConfigurationFilterSensitiveLog: () => KnowledgeBaseVectorSearchConfigurationFilterSensitiveLog,
|
|
51
53
|
ModelInvocationInputFilterSensitiveLog: () => ModelInvocationInputFilterSensitiveLog,
|
|
52
54
|
ObservationFilterSensitiveLog: () => ObservationFilterSensitiveLog,
|
|
53
55
|
OrchestrationTrace: () => OrchestrationTrace,
|
|
@@ -68,6 +70,8 @@ __export(src_exports, {
|
|
|
68
70
|
ResourceNotFoundException: () => ResourceNotFoundException,
|
|
69
71
|
ResponseStream: () => ResponseStream,
|
|
70
72
|
ResponseStreamFilterSensitiveLog: () => ResponseStreamFilterSensitiveLog,
|
|
73
|
+
RetrievalFilter: () => RetrievalFilter,
|
|
74
|
+
RetrievalFilterFilterSensitiveLog: () => RetrievalFilterFilterSensitiveLog,
|
|
71
75
|
RetrievalResultContentFilterSensitiveLog: () => RetrievalResultContentFilterSensitiveLog,
|
|
72
76
|
RetrievalResultLocationFilterSensitiveLog: () => RetrievalResultLocationFilterSensitiveLog,
|
|
73
77
|
RetrievalResultLocationType: () => RetrievalResultLocationType,
|
|
@@ -537,6 +541,34 @@ var SearchType = {
|
|
|
537
541
|
var RetrieveAndGenerateType = {
|
|
538
542
|
KNOWLEDGE_BASE: "KNOWLEDGE_BASE"
|
|
539
543
|
};
|
|
544
|
+
var RetrievalFilter;
|
|
545
|
+
((RetrievalFilter2) => {
|
|
546
|
+
RetrievalFilter2.visit = /* @__PURE__ */ __name((value, visitor) => {
|
|
547
|
+
if (value.equals !== void 0)
|
|
548
|
+
return visitor.equals(value.equals);
|
|
549
|
+
if (value.notEquals !== void 0)
|
|
550
|
+
return visitor.notEquals(value.notEquals);
|
|
551
|
+
if (value.greaterThan !== void 0)
|
|
552
|
+
return visitor.greaterThan(value.greaterThan);
|
|
553
|
+
if (value.greaterThanOrEquals !== void 0)
|
|
554
|
+
return visitor.greaterThanOrEquals(value.greaterThanOrEquals);
|
|
555
|
+
if (value.lessThan !== void 0)
|
|
556
|
+
return visitor.lessThan(value.lessThan);
|
|
557
|
+
if (value.lessThanOrEquals !== void 0)
|
|
558
|
+
return visitor.lessThanOrEquals(value.lessThanOrEquals);
|
|
559
|
+
if (value.in !== void 0)
|
|
560
|
+
return visitor.in(value.in);
|
|
561
|
+
if (value.notIn !== void 0)
|
|
562
|
+
return visitor.notIn(value.notIn);
|
|
563
|
+
if (value.startsWith !== void 0)
|
|
564
|
+
return visitor.startsWith(value.startsWith);
|
|
565
|
+
if (value.andAll !== void 0)
|
|
566
|
+
return visitor.andAll(value.andAll);
|
|
567
|
+
if (value.orAll !== void 0)
|
|
568
|
+
return visitor.orAll(value.orAll);
|
|
569
|
+
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
570
|
+
}, "visit");
|
|
571
|
+
})(RetrievalFilter || (RetrievalFilter = {}));
|
|
540
572
|
var ActionGroupInvocationInputFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
|
|
541
573
|
...obj,
|
|
542
574
|
...obj.actionGroupName && { actionGroupName: import_smithy_client.SENSITIVE_STRING },
|
|
@@ -567,7 +599,8 @@ var RetrievalResultLocationFilterSensitiveLog = /* @__PURE__ */ __name((obj) =>
|
|
|
567
599
|
var RetrievedReferenceFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
|
|
568
600
|
...obj,
|
|
569
601
|
...obj.content && { content: import_smithy_client.SENSITIVE_STRING },
|
|
570
|
-
...obj.location && { location: import_smithy_client.SENSITIVE_STRING }
|
|
602
|
+
...obj.location && { location: import_smithy_client.SENSITIVE_STRING },
|
|
603
|
+
...obj.metadata && { metadata: import_smithy_client.SENSITIVE_STRING }
|
|
571
604
|
}), "RetrievedReferenceFilterSensitiveLog");
|
|
572
605
|
var CitationFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
|
|
573
606
|
...obj,
|
|
@@ -739,12 +772,79 @@ var GenerationConfigurationFilterSensitiveLog = /* @__PURE__ */ __name((obj) =>
|
|
|
739
772
|
...obj,
|
|
740
773
|
...obj.promptTemplate && { promptTemplate: PromptTemplateFilterSensitiveLog(obj.promptTemplate) }
|
|
741
774
|
}), "GenerationConfigurationFilterSensitiveLog");
|
|
775
|
+
var RetrieveAndGenerateOutputFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
|
|
776
|
+
...obj
|
|
777
|
+
}), "RetrieveAndGenerateOutputFilterSensitiveLog");
|
|
778
|
+
var RetrieveAndGenerateResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
|
|
779
|
+
...obj,
|
|
780
|
+
...obj.output && { output: import_smithy_client.SENSITIVE_STRING },
|
|
781
|
+
...obj.citations && { citations: obj.citations.map((item) => CitationFilterSensitiveLog(item)) }
|
|
782
|
+
}), "RetrieveAndGenerateResponseFilterSensitiveLog");
|
|
783
|
+
var KnowledgeBaseQueryFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
|
|
784
|
+
...obj
|
|
785
|
+
}), "KnowledgeBaseQueryFilterSensitiveLog");
|
|
786
|
+
var KnowledgeBaseRetrievalResultFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
|
|
787
|
+
...obj,
|
|
788
|
+
...obj.content && { content: import_smithy_client.SENSITIVE_STRING },
|
|
789
|
+
...obj.location && { location: import_smithy_client.SENSITIVE_STRING },
|
|
790
|
+
...obj.metadata && { metadata: import_smithy_client.SENSITIVE_STRING }
|
|
791
|
+
}), "KnowledgeBaseRetrievalResultFilterSensitiveLog");
|
|
792
|
+
var RetrieveResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
|
|
793
|
+
...obj,
|
|
794
|
+
...obj.retrievalResults && { retrievalResults: import_smithy_client.SENSITIVE_STRING }
|
|
795
|
+
}), "RetrieveResponseFilterSensitiveLog");
|
|
796
|
+
var RetrievalFilterFilterSensitiveLog = /* @__PURE__ */ __name((obj) => {
|
|
797
|
+
if (obj.equals !== void 0)
|
|
798
|
+
return { equals: obj.equals };
|
|
799
|
+
if (obj.notEquals !== void 0)
|
|
800
|
+
return { notEquals: obj.notEquals };
|
|
801
|
+
if (obj.greaterThan !== void 0)
|
|
802
|
+
return { greaterThan: obj.greaterThan };
|
|
803
|
+
if (obj.greaterThanOrEquals !== void 0)
|
|
804
|
+
return { greaterThanOrEquals: obj.greaterThanOrEquals };
|
|
805
|
+
if (obj.lessThan !== void 0)
|
|
806
|
+
return { lessThan: obj.lessThan };
|
|
807
|
+
if (obj.lessThanOrEquals !== void 0)
|
|
808
|
+
return { lessThanOrEquals: obj.lessThanOrEquals };
|
|
809
|
+
if (obj.in !== void 0)
|
|
810
|
+
return { in: obj.in };
|
|
811
|
+
if (obj.notIn !== void 0)
|
|
812
|
+
return { notIn: obj.notIn };
|
|
813
|
+
if (obj.startsWith !== void 0)
|
|
814
|
+
return { startsWith: obj.startsWith };
|
|
815
|
+
if (obj.andAll !== void 0)
|
|
816
|
+
return { andAll: import_smithy_client.SENSITIVE_STRING };
|
|
817
|
+
if (obj.orAll !== void 0)
|
|
818
|
+
return { orAll: import_smithy_client.SENSITIVE_STRING };
|
|
819
|
+
if (obj.$unknown !== void 0)
|
|
820
|
+
return { [obj.$unknown[0]]: "UNKNOWN" };
|
|
821
|
+
}, "RetrievalFilterFilterSensitiveLog");
|
|
822
|
+
var KnowledgeBaseVectorSearchConfigurationFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
|
|
823
|
+
...obj,
|
|
824
|
+
...obj.filter && { filter: import_smithy_client.SENSITIVE_STRING }
|
|
825
|
+
}), "KnowledgeBaseVectorSearchConfigurationFilterSensitiveLog");
|
|
826
|
+
var KnowledgeBaseRetrievalConfigurationFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
|
|
827
|
+
...obj,
|
|
828
|
+
...obj.vectorSearchConfiguration && {
|
|
829
|
+
vectorSearchConfiguration: KnowledgeBaseVectorSearchConfigurationFilterSensitiveLog(obj.vectorSearchConfiguration)
|
|
830
|
+
}
|
|
831
|
+
}), "KnowledgeBaseRetrievalConfigurationFilterSensitiveLog");
|
|
742
832
|
var KnowledgeBaseRetrieveAndGenerateConfigurationFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
|
|
743
833
|
...obj,
|
|
834
|
+
...obj.retrievalConfiguration && {
|
|
835
|
+
retrievalConfiguration: KnowledgeBaseRetrievalConfigurationFilterSensitiveLog(obj.retrievalConfiguration)
|
|
836
|
+
},
|
|
744
837
|
...obj.generationConfiguration && {
|
|
745
838
|
generationConfiguration: GenerationConfigurationFilterSensitiveLog(obj.generationConfiguration)
|
|
746
839
|
}
|
|
747
840
|
}), "KnowledgeBaseRetrieveAndGenerateConfigurationFilterSensitiveLog");
|
|
841
|
+
var RetrieveRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
|
|
842
|
+
...obj,
|
|
843
|
+
...obj.retrievalQuery && { retrievalQuery: import_smithy_client.SENSITIVE_STRING },
|
|
844
|
+
...obj.retrievalConfiguration && {
|
|
845
|
+
retrievalConfiguration: KnowledgeBaseRetrievalConfigurationFilterSensitiveLog(obj.retrievalConfiguration)
|
|
846
|
+
}
|
|
847
|
+
}), "RetrieveRequestFilterSensitiveLog");
|
|
748
848
|
var RetrieveAndGenerateConfigurationFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
|
|
749
849
|
...obj,
|
|
750
850
|
...obj.knowledgeBaseConfiguration && {
|
|
@@ -762,30 +862,6 @@ var RetrieveAndGenerateRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj)
|
|
|
762
862
|
)
|
|
763
863
|
}
|
|
764
864
|
}), "RetrieveAndGenerateRequestFilterSensitiveLog");
|
|
765
|
-
var RetrieveAndGenerateOutputFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
|
|
766
|
-
...obj
|
|
767
|
-
}), "RetrieveAndGenerateOutputFilterSensitiveLog");
|
|
768
|
-
var RetrieveAndGenerateResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
|
|
769
|
-
...obj,
|
|
770
|
-
...obj.output && { output: import_smithy_client.SENSITIVE_STRING },
|
|
771
|
-
...obj.citations && { citations: obj.citations.map((item) => CitationFilterSensitiveLog(item)) }
|
|
772
|
-
}), "RetrieveAndGenerateResponseFilterSensitiveLog");
|
|
773
|
-
var KnowledgeBaseQueryFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
|
|
774
|
-
...obj
|
|
775
|
-
}), "KnowledgeBaseQueryFilterSensitiveLog");
|
|
776
|
-
var RetrieveRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
|
|
777
|
-
...obj,
|
|
778
|
-
...obj.retrievalQuery && { retrievalQuery: import_smithy_client.SENSITIVE_STRING }
|
|
779
|
-
}), "RetrieveRequestFilterSensitiveLog");
|
|
780
|
-
var KnowledgeBaseRetrievalResultFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
|
|
781
|
-
...obj,
|
|
782
|
-
...obj.content && { content: import_smithy_client.SENSITIVE_STRING },
|
|
783
|
-
...obj.location && { location: import_smithy_client.SENSITIVE_STRING }
|
|
784
|
-
}), "KnowledgeBaseRetrievalResultFilterSensitiveLog");
|
|
785
|
-
var RetrieveResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
|
|
786
|
-
...obj,
|
|
787
|
-
...obj.retrievalResults && { retrievalResults: import_smithy_client.SENSITIVE_STRING }
|
|
788
|
-
}), "RetrieveResponseFilterSensitiveLog");
|
|
789
865
|
|
|
790
866
|
// src/protocols/Aws_restJson1.ts
|
|
791
867
|
var import_core2 = require("@aws-sdk/core");
|
|
@@ -823,7 +899,7 @@ var se_RetrieveCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
|
823
899
|
body = JSON.stringify(
|
|
824
900
|
(0, import_smithy_client.take)(input, {
|
|
825
901
|
nextToken: [],
|
|
826
|
-
retrievalConfiguration: (_) => (
|
|
902
|
+
retrievalConfiguration: (_) => se_KnowledgeBaseRetrievalConfiguration(_, context),
|
|
827
903
|
retrievalQuery: (_) => (0, import_smithy_client._json)(_)
|
|
828
904
|
})
|
|
829
905
|
);
|
|
@@ -840,7 +916,7 @@ var se_RetrieveAndGenerateCommand = /* @__PURE__ */ __name(async (input, context
|
|
|
840
916
|
body = JSON.stringify(
|
|
841
917
|
(0, import_smithy_client.take)(input, {
|
|
842
918
|
input: (_) => (0, import_smithy_client._json)(_),
|
|
843
|
-
retrieveAndGenerateConfiguration: (_) => (
|
|
919
|
+
retrieveAndGenerateConfiguration: (_) => se_RetrieveAndGenerateConfiguration(_, context),
|
|
844
920
|
sessionConfiguration: (_) => (0, import_smithy_client._json)(_),
|
|
845
921
|
sessionId: []
|
|
846
922
|
})
|
|
@@ -885,7 +961,7 @@ var de_RetrieveAndGenerateCommand = /* @__PURE__ */ __name(async (output, contex
|
|
|
885
961
|
});
|
|
886
962
|
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
887
963
|
const doc = (0, import_smithy_client.take)(data, {
|
|
888
|
-
citations:
|
|
964
|
+
citations: (_) => de_Citations(_, context),
|
|
889
965
|
output: import_smithy_client._json,
|
|
890
966
|
sessionId: import_smithy_client.expectString
|
|
891
967
|
});
|
|
@@ -1199,6 +1275,79 @@ var de_ValidationException_event = /* @__PURE__ */ __name(async (output, context
|
|
|
1199
1275
|
};
|
|
1200
1276
|
return de_ValidationExceptionRes(parsedOutput, context);
|
|
1201
1277
|
}, "de_ValidationException_event");
|
|
1278
|
+
var se_FilterAttribute = /* @__PURE__ */ __name((input, context) => {
|
|
1279
|
+
return (0, import_smithy_client.take)(input, {
|
|
1280
|
+
key: [],
|
|
1281
|
+
value: (_) => se_FilterValue(_, context)
|
|
1282
|
+
});
|
|
1283
|
+
}, "se_FilterAttribute");
|
|
1284
|
+
var se_FilterValue = /* @__PURE__ */ __name((input, context) => {
|
|
1285
|
+
return input;
|
|
1286
|
+
}, "se_FilterValue");
|
|
1287
|
+
var se_KnowledgeBaseRetrievalConfiguration = /* @__PURE__ */ __name((input, context) => {
|
|
1288
|
+
return (0, import_smithy_client.take)(input, {
|
|
1289
|
+
vectorSearchConfiguration: (_) => se_KnowledgeBaseVectorSearchConfiguration(_, context)
|
|
1290
|
+
});
|
|
1291
|
+
}, "se_KnowledgeBaseRetrievalConfiguration");
|
|
1292
|
+
var se_KnowledgeBaseRetrieveAndGenerateConfiguration = /* @__PURE__ */ __name((input, context) => {
|
|
1293
|
+
return (0, import_smithy_client.take)(input, {
|
|
1294
|
+
generationConfiguration: import_smithy_client._json,
|
|
1295
|
+
knowledgeBaseId: [],
|
|
1296
|
+
modelArn: [],
|
|
1297
|
+
retrievalConfiguration: (_) => se_KnowledgeBaseRetrievalConfiguration(_, context)
|
|
1298
|
+
});
|
|
1299
|
+
}, "se_KnowledgeBaseRetrieveAndGenerateConfiguration");
|
|
1300
|
+
var se_KnowledgeBaseVectorSearchConfiguration = /* @__PURE__ */ __name((input, context) => {
|
|
1301
|
+
return (0, import_smithy_client.take)(input, {
|
|
1302
|
+
filter: (_) => se_RetrievalFilter(_, context),
|
|
1303
|
+
numberOfResults: [],
|
|
1304
|
+
overrideSearchType: []
|
|
1305
|
+
});
|
|
1306
|
+
}, "se_KnowledgeBaseVectorSearchConfiguration");
|
|
1307
|
+
var se_RetrievalFilter = /* @__PURE__ */ __name((input, context) => {
|
|
1308
|
+
return RetrievalFilter.visit(input, {
|
|
1309
|
+
andAll: (value) => ({ andAll: se_RetrievalFilterList(value, context) }),
|
|
1310
|
+
equals: (value) => ({ equals: se_FilterAttribute(value, context) }),
|
|
1311
|
+
greaterThan: (value) => ({ greaterThan: se_FilterAttribute(value, context) }),
|
|
1312
|
+
greaterThanOrEquals: (value) => ({ greaterThanOrEquals: se_FilterAttribute(value, context) }),
|
|
1313
|
+
in: (value) => ({ in: se_FilterAttribute(value, context) }),
|
|
1314
|
+
lessThan: (value) => ({ lessThan: se_FilterAttribute(value, context) }),
|
|
1315
|
+
lessThanOrEquals: (value) => ({ lessThanOrEquals: se_FilterAttribute(value, context) }),
|
|
1316
|
+
notEquals: (value) => ({ notEquals: se_FilterAttribute(value, context) }),
|
|
1317
|
+
notIn: (value) => ({ notIn: se_FilterAttribute(value, context) }),
|
|
1318
|
+
orAll: (value) => ({ orAll: se_RetrievalFilterList(value, context) }),
|
|
1319
|
+
startsWith: (value) => ({ startsWith: se_FilterAttribute(value, context) }),
|
|
1320
|
+
_: (name, value) => ({ name: value })
|
|
1321
|
+
});
|
|
1322
|
+
}, "se_RetrievalFilter");
|
|
1323
|
+
var se_RetrievalFilterList = /* @__PURE__ */ __name((input, context) => {
|
|
1324
|
+
return input.filter((e) => e != null).map((entry) => {
|
|
1325
|
+
return se_RetrievalFilter(entry, context);
|
|
1326
|
+
});
|
|
1327
|
+
}, "se_RetrievalFilterList");
|
|
1328
|
+
var se_RetrieveAndGenerateConfiguration = /* @__PURE__ */ __name((input, context) => {
|
|
1329
|
+
return (0, import_smithy_client.take)(input, {
|
|
1330
|
+
knowledgeBaseConfiguration: (_) => se_KnowledgeBaseRetrieveAndGenerateConfiguration(_, context),
|
|
1331
|
+
type: []
|
|
1332
|
+
});
|
|
1333
|
+
}, "se_RetrieveAndGenerateConfiguration");
|
|
1334
|
+
var de_Attribution = /* @__PURE__ */ __name((output, context) => {
|
|
1335
|
+
return (0, import_smithy_client.take)(output, {
|
|
1336
|
+
citations: (_) => de_Citations(_, context)
|
|
1337
|
+
});
|
|
1338
|
+
}, "de_Attribution");
|
|
1339
|
+
var de_Citation = /* @__PURE__ */ __name((output, context) => {
|
|
1340
|
+
return (0, import_smithy_client.take)(output, {
|
|
1341
|
+
generatedResponsePart: import_smithy_client._json,
|
|
1342
|
+
retrievedReferences: (_) => de_RetrievedReferences(_, context)
|
|
1343
|
+
});
|
|
1344
|
+
}, "de_Citation");
|
|
1345
|
+
var de_Citations = /* @__PURE__ */ __name((output, context) => {
|
|
1346
|
+
const retVal = (output || []).filter((e) => e != null).map((entry) => {
|
|
1347
|
+
return de_Citation(entry, context);
|
|
1348
|
+
});
|
|
1349
|
+
return retVal;
|
|
1350
|
+
}, "de_Citations");
|
|
1202
1351
|
var de_InferenceConfiguration = /* @__PURE__ */ __name((output, context) => {
|
|
1203
1352
|
return (0, import_smithy_client.take)(output, {
|
|
1204
1353
|
maximumLength: import_smithy_client.expectInt32,
|
|
@@ -1208,10 +1357,16 @@ var de_InferenceConfiguration = /* @__PURE__ */ __name((output, context) => {
|
|
|
1208
1357
|
topP: import_smithy_client.limitedParseFloat32
|
|
1209
1358
|
});
|
|
1210
1359
|
}, "de_InferenceConfiguration");
|
|
1360
|
+
var de_KnowledgeBaseLookupOutput = /* @__PURE__ */ __name((output, context) => {
|
|
1361
|
+
return (0, import_smithy_client.take)(output, {
|
|
1362
|
+
retrievedReferences: (_) => de_RetrievedReferences(_, context)
|
|
1363
|
+
});
|
|
1364
|
+
}, "de_KnowledgeBaseLookupOutput");
|
|
1211
1365
|
var de_KnowledgeBaseRetrievalResult = /* @__PURE__ */ __name((output, context) => {
|
|
1212
1366
|
return (0, import_smithy_client.take)(output, {
|
|
1213
1367
|
content: import_smithy_client._json,
|
|
1214
1368
|
location: import_smithy_client._json,
|
|
1369
|
+
metadata: (_) => de_RetrievalResultMetadata(_, context),
|
|
1215
1370
|
score: import_smithy_client.limitedParseDouble
|
|
1216
1371
|
});
|
|
1217
1372
|
}, "de_KnowledgeBaseRetrievalResult");
|
|
@@ -1232,6 +1387,16 @@ var de_ModelInvocationInput = /* @__PURE__ */ __name((output, context) => {
|
|
|
1232
1387
|
type: import_smithy_client.expectString
|
|
1233
1388
|
});
|
|
1234
1389
|
}, "de_ModelInvocationInput");
|
|
1390
|
+
var de_Observation = /* @__PURE__ */ __name((output, context) => {
|
|
1391
|
+
return (0, import_smithy_client.take)(output, {
|
|
1392
|
+
actionGroupInvocationOutput: import_smithy_client._json,
|
|
1393
|
+
finalResponse: import_smithy_client._json,
|
|
1394
|
+
knowledgeBaseLookupOutput: (_) => de_KnowledgeBaseLookupOutput(_, context),
|
|
1395
|
+
repromptResponse: import_smithy_client._json,
|
|
1396
|
+
traceId: import_smithy_client.expectString,
|
|
1397
|
+
type: import_smithy_client.expectString
|
|
1398
|
+
});
|
|
1399
|
+
}, "de_Observation");
|
|
1235
1400
|
var de_OrchestrationTrace = /* @__PURE__ */ __name((output, context) => {
|
|
1236
1401
|
if (output.invocationInput != null) {
|
|
1237
1402
|
return {
|
|
@@ -1245,7 +1410,7 @@ var de_OrchestrationTrace = /* @__PURE__ */ __name((output, context) => {
|
|
|
1245
1410
|
}
|
|
1246
1411
|
if (output.observation != null) {
|
|
1247
1412
|
return {
|
|
1248
|
-
observation: (
|
|
1413
|
+
observation: de_Observation(output.observation, context)
|
|
1249
1414
|
};
|
|
1250
1415
|
}
|
|
1251
1416
|
if (output.rationale != null) {
|
|
@@ -1257,7 +1422,7 @@ var de_OrchestrationTrace = /* @__PURE__ */ __name((output, context) => {
|
|
|
1257
1422
|
}, "de_OrchestrationTrace");
|
|
1258
1423
|
var de_PayloadPart = /* @__PURE__ */ __name((output, context) => {
|
|
1259
1424
|
return (0, import_smithy_client.take)(output, {
|
|
1260
|
-
attribution:
|
|
1425
|
+
attribution: (_) => de_Attribution(_, context),
|
|
1261
1426
|
bytes: context.base64Decoder
|
|
1262
1427
|
});
|
|
1263
1428
|
}, "de_PayloadPart");
|
|
@@ -1287,6 +1452,31 @@ var de_PreProcessingTrace = /* @__PURE__ */ __name((output, context) => {
|
|
|
1287
1452
|
}
|
|
1288
1453
|
return { $unknown: Object.entries(output)[0] };
|
|
1289
1454
|
}, "de_PreProcessingTrace");
|
|
1455
|
+
var de_RetrievalResultMetadata = /* @__PURE__ */ __name((output, context) => {
|
|
1456
|
+
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
1457
|
+
if (value === null) {
|
|
1458
|
+
return acc;
|
|
1459
|
+
}
|
|
1460
|
+
acc[key] = de_RetrievalResultMetadataValue(value, context);
|
|
1461
|
+
return acc;
|
|
1462
|
+
}, {});
|
|
1463
|
+
}, "de_RetrievalResultMetadata");
|
|
1464
|
+
var de_RetrievalResultMetadataValue = /* @__PURE__ */ __name((output, context) => {
|
|
1465
|
+
return output;
|
|
1466
|
+
}, "de_RetrievalResultMetadataValue");
|
|
1467
|
+
var de_RetrievedReference = /* @__PURE__ */ __name((output, context) => {
|
|
1468
|
+
return (0, import_smithy_client.take)(output, {
|
|
1469
|
+
content: import_smithy_client._json,
|
|
1470
|
+
location: import_smithy_client._json,
|
|
1471
|
+
metadata: (_) => de_RetrievalResultMetadata(_, context)
|
|
1472
|
+
});
|
|
1473
|
+
}, "de_RetrievedReference");
|
|
1474
|
+
var de_RetrievedReferences = /* @__PURE__ */ __name((output, context) => {
|
|
1475
|
+
const retVal = (output || []).filter((e) => e != null).map((entry) => {
|
|
1476
|
+
return de_RetrievedReference(entry, context);
|
|
1477
|
+
});
|
|
1478
|
+
return retVal;
|
|
1479
|
+
}, "de_RetrievedReferences");
|
|
1290
1480
|
var de_Trace = /* @__PURE__ */ __name((output, context) => {
|
|
1291
1481
|
if (output.failureTrace != null) {
|
|
1292
1482
|
return {
|
|
@@ -1432,6 +1622,7 @@ var paginateRetrieve = (0, import_core.createPaginator)(BedrockAgentRuntimeClien
|
|
|
1432
1622
|
ResponseStream,
|
|
1433
1623
|
SearchType,
|
|
1434
1624
|
RetrieveAndGenerateType,
|
|
1625
|
+
RetrievalFilter,
|
|
1435
1626
|
ActionGroupInvocationInputFilterSensitiveLog,
|
|
1436
1627
|
ActionGroupInvocationOutputFilterSensitiveLog,
|
|
1437
1628
|
InvokeAgentRequestFilterSensitiveLog,
|
|
@@ -1466,14 +1657,17 @@ var paginateRetrieve = (0, import_core.createPaginator)(BedrockAgentRuntimeClien
|
|
|
1466
1657
|
RetrieveAndGenerateInputFilterSensitiveLog,
|
|
1467
1658
|
PromptTemplateFilterSensitiveLog,
|
|
1468
1659
|
GenerationConfigurationFilterSensitiveLog,
|
|
1469
|
-
KnowledgeBaseRetrieveAndGenerateConfigurationFilterSensitiveLog,
|
|
1470
|
-
RetrieveAndGenerateConfigurationFilterSensitiveLog,
|
|
1471
|
-
RetrieveAndGenerateRequestFilterSensitiveLog,
|
|
1472
1660
|
RetrieveAndGenerateOutputFilterSensitiveLog,
|
|
1473
1661
|
RetrieveAndGenerateResponseFilterSensitiveLog,
|
|
1474
1662
|
KnowledgeBaseQueryFilterSensitiveLog,
|
|
1475
|
-
RetrieveRequestFilterSensitiveLog,
|
|
1476
1663
|
KnowledgeBaseRetrievalResultFilterSensitiveLog,
|
|
1477
|
-
RetrieveResponseFilterSensitiveLog
|
|
1664
|
+
RetrieveResponseFilterSensitiveLog,
|
|
1665
|
+
RetrievalFilterFilterSensitiveLog,
|
|
1666
|
+
KnowledgeBaseVectorSearchConfigurationFilterSensitiveLog,
|
|
1667
|
+
KnowledgeBaseRetrievalConfigurationFilterSensitiveLog,
|
|
1668
|
+
KnowledgeBaseRetrieveAndGenerateConfigurationFilterSensitiveLog,
|
|
1669
|
+
RetrieveRequestFilterSensitiveLog,
|
|
1670
|
+
RetrieveAndGenerateConfigurationFilterSensitiveLog,
|
|
1671
|
+
RetrieveAndGenerateRequestFilterSensitiveLog
|
|
1478
1672
|
});
|
|
1479
1673
|
|
|
@@ -223,6 +223,34 @@ export const SearchType = {
|
|
|
223
223
|
export const RetrieveAndGenerateType = {
|
|
224
224
|
KNOWLEDGE_BASE: "KNOWLEDGE_BASE",
|
|
225
225
|
};
|
|
226
|
+
export var RetrievalFilter;
|
|
227
|
+
(function (RetrievalFilter) {
|
|
228
|
+
RetrievalFilter.visit = (value, visitor) => {
|
|
229
|
+
if (value.equals !== undefined)
|
|
230
|
+
return visitor.equals(value.equals);
|
|
231
|
+
if (value.notEquals !== undefined)
|
|
232
|
+
return visitor.notEquals(value.notEquals);
|
|
233
|
+
if (value.greaterThan !== undefined)
|
|
234
|
+
return visitor.greaterThan(value.greaterThan);
|
|
235
|
+
if (value.greaterThanOrEquals !== undefined)
|
|
236
|
+
return visitor.greaterThanOrEquals(value.greaterThanOrEquals);
|
|
237
|
+
if (value.lessThan !== undefined)
|
|
238
|
+
return visitor.lessThan(value.lessThan);
|
|
239
|
+
if (value.lessThanOrEquals !== undefined)
|
|
240
|
+
return visitor.lessThanOrEquals(value.lessThanOrEquals);
|
|
241
|
+
if (value.in !== undefined)
|
|
242
|
+
return visitor.in(value.in);
|
|
243
|
+
if (value.notIn !== undefined)
|
|
244
|
+
return visitor.notIn(value.notIn);
|
|
245
|
+
if (value.startsWith !== undefined)
|
|
246
|
+
return visitor.startsWith(value.startsWith);
|
|
247
|
+
if (value.andAll !== undefined)
|
|
248
|
+
return visitor.andAll(value.andAll);
|
|
249
|
+
if (value.orAll !== undefined)
|
|
250
|
+
return visitor.orAll(value.orAll);
|
|
251
|
+
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
252
|
+
};
|
|
253
|
+
})(RetrievalFilter || (RetrievalFilter = {}));
|
|
226
254
|
export const ActionGroupInvocationInputFilterSensitiveLog = (obj) => ({
|
|
227
255
|
...obj,
|
|
228
256
|
...(obj.actionGroupName && { actionGroupName: SENSITIVE_STRING }),
|
|
@@ -254,6 +282,7 @@ export const RetrievedReferenceFilterSensitiveLog = (obj) => ({
|
|
|
254
282
|
...obj,
|
|
255
283
|
...(obj.content && { content: SENSITIVE_STRING }),
|
|
256
284
|
...(obj.location && { location: SENSITIVE_STRING }),
|
|
285
|
+
...(obj.metadata && { metadata: SENSITIVE_STRING }),
|
|
257
286
|
});
|
|
258
287
|
export const CitationFilterSensitiveLog = (obj) => ({
|
|
259
288
|
...obj,
|
|
@@ -425,25 +454,6 @@ export const GenerationConfigurationFilterSensitiveLog = (obj) => ({
|
|
|
425
454
|
...obj,
|
|
426
455
|
...(obj.promptTemplate && { promptTemplate: PromptTemplateFilterSensitiveLog(obj.promptTemplate) }),
|
|
427
456
|
});
|
|
428
|
-
export const KnowledgeBaseRetrieveAndGenerateConfigurationFilterSensitiveLog = (obj) => ({
|
|
429
|
-
...obj,
|
|
430
|
-
...(obj.generationConfiguration && {
|
|
431
|
-
generationConfiguration: GenerationConfigurationFilterSensitiveLog(obj.generationConfiguration),
|
|
432
|
-
}),
|
|
433
|
-
});
|
|
434
|
-
export const RetrieveAndGenerateConfigurationFilterSensitiveLog = (obj) => ({
|
|
435
|
-
...obj,
|
|
436
|
-
...(obj.knowledgeBaseConfiguration && {
|
|
437
|
-
knowledgeBaseConfiguration: KnowledgeBaseRetrieveAndGenerateConfigurationFilterSensitiveLog(obj.knowledgeBaseConfiguration),
|
|
438
|
-
}),
|
|
439
|
-
});
|
|
440
|
-
export const RetrieveAndGenerateRequestFilterSensitiveLog = (obj) => ({
|
|
441
|
-
...obj,
|
|
442
|
-
...(obj.input && { input: SENSITIVE_STRING }),
|
|
443
|
-
...(obj.retrieveAndGenerateConfiguration && {
|
|
444
|
-
retrieveAndGenerateConfiguration: RetrieveAndGenerateConfigurationFilterSensitiveLog(obj.retrieveAndGenerateConfiguration),
|
|
445
|
-
}),
|
|
446
|
-
});
|
|
447
457
|
export const RetrieveAndGenerateOutputFilterSensitiveLog = (obj) => ({
|
|
448
458
|
...obj,
|
|
449
459
|
});
|
|
@@ -455,16 +465,78 @@ export const RetrieveAndGenerateResponseFilterSensitiveLog = (obj) => ({
|
|
|
455
465
|
export const KnowledgeBaseQueryFilterSensitiveLog = (obj) => ({
|
|
456
466
|
...obj,
|
|
457
467
|
});
|
|
458
|
-
export const RetrieveRequestFilterSensitiveLog = (obj) => ({
|
|
459
|
-
...obj,
|
|
460
|
-
...(obj.retrievalQuery && { retrievalQuery: SENSITIVE_STRING }),
|
|
461
|
-
});
|
|
462
468
|
export const KnowledgeBaseRetrievalResultFilterSensitiveLog = (obj) => ({
|
|
463
469
|
...obj,
|
|
464
470
|
...(obj.content && { content: SENSITIVE_STRING }),
|
|
465
471
|
...(obj.location && { location: SENSITIVE_STRING }),
|
|
472
|
+
...(obj.metadata && { metadata: SENSITIVE_STRING }),
|
|
466
473
|
});
|
|
467
474
|
export const RetrieveResponseFilterSensitiveLog = (obj) => ({
|
|
468
475
|
...obj,
|
|
469
476
|
...(obj.retrievalResults && { retrievalResults: SENSITIVE_STRING }),
|
|
470
477
|
});
|
|
478
|
+
export const RetrievalFilterFilterSensitiveLog = (obj) => {
|
|
479
|
+
if (obj.equals !== undefined)
|
|
480
|
+
return { equals: obj.equals };
|
|
481
|
+
if (obj.notEquals !== undefined)
|
|
482
|
+
return { notEquals: obj.notEquals };
|
|
483
|
+
if (obj.greaterThan !== undefined)
|
|
484
|
+
return { greaterThan: obj.greaterThan };
|
|
485
|
+
if (obj.greaterThanOrEquals !== undefined)
|
|
486
|
+
return { greaterThanOrEquals: obj.greaterThanOrEquals };
|
|
487
|
+
if (obj.lessThan !== undefined)
|
|
488
|
+
return { lessThan: obj.lessThan };
|
|
489
|
+
if (obj.lessThanOrEquals !== undefined)
|
|
490
|
+
return { lessThanOrEquals: obj.lessThanOrEquals };
|
|
491
|
+
if (obj.in !== undefined)
|
|
492
|
+
return { in: obj.in };
|
|
493
|
+
if (obj.notIn !== undefined)
|
|
494
|
+
return { notIn: obj.notIn };
|
|
495
|
+
if (obj.startsWith !== undefined)
|
|
496
|
+
return { startsWith: obj.startsWith };
|
|
497
|
+
if (obj.andAll !== undefined)
|
|
498
|
+
return { andAll: SENSITIVE_STRING };
|
|
499
|
+
if (obj.orAll !== undefined)
|
|
500
|
+
return { orAll: SENSITIVE_STRING };
|
|
501
|
+
if (obj.$unknown !== undefined)
|
|
502
|
+
return { [obj.$unknown[0]]: "UNKNOWN" };
|
|
503
|
+
};
|
|
504
|
+
export const KnowledgeBaseVectorSearchConfigurationFilterSensitiveLog = (obj) => ({
|
|
505
|
+
...obj,
|
|
506
|
+
...(obj.filter && { filter: SENSITIVE_STRING }),
|
|
507
|
+
});
|
|
508
|
+
export const KnowledgeBaseRetrievalConfigurationFilterSensitiveLog = (obj) => ({
|
|
509
|
+
...obj,
|
|
510
|
+
...(obj.vectorSearchConfiguration && {
|
|
511
|
+
vectorSearchConfiguration: KnowledgeBaseVectorSearchConfigurationFilterSensitiveLog(obj.vectorSearchConfiguration),
|
|
512
|
+
}),
|
|
513
|
+
});
|
|
514
|
+
export const KnowledgeBaseRetrieveAndGenerateConfigurationFilterSensitiveLog = (obj) => ({
|
|
515
|
+
...obj,
|
|
516
|
+
...(obj.retrievalConfiguration && {
|
|
517
|
+
retrievalConfiguration: KnowledgeBaseRetrievalConfigurationFilterSensitiveLog(obj.retrievalConfiguration),
|
|
518
|
+
}),
|
|
519
|
+
...(obj.generationConfiguration && {
|
|
520
|
+
generationConfiguration: GenerationConfigurationFilterSensitiveLog(obj.generationConfiguration),
|
|
521
|
+
}),
|
|
522
|
+
});
|
|
523
|
+
export const RetrieveRequestFilterSensitiveLog = (obj) => ({
|
|
524
|
+
...obj,
|
|
525
|
+
...(obj.retrievalQuery && { retrievalQuery: SENSITIVE_STRING }),
|
|
526
|
+
...(obj.retrievalConfiguration && {
|
|
527
|
+
retrievalConfiguration: KnowledgeBaseRetrievalConfigurationFilterSensitiveLog(obj.retrievalConfiguration),
|
|
528
|
+
}),
|
|
529
|
+
});
|
|
530
|
+
export const RetrieveAndGenerateConfigurationFilterSensitiveLog = (obj) => ({
|
|
531
|
+
...obj,
|
|
532
|
+
...(obj.knowledgeBaseConfiguration && {
|
|
533
|
+
knowledgeBaseConfiguration: KnowledgeBaseRetrieveAndGenerateConfigurationFilterSensitiveLog(obj.knowledgeBaseConfiguration),
|
|
534
|
+
}),
|
|
535
|
+
});
|
|
536
|
+
export const RetrieveAndGenerateRequestFilterSensitiveLog = (obj) => ({
|
|
537
|
+
...obj,
|
|
538
|
+
...(obj.input && { input: SENSITIVE_STRING }),
|
|
539
|
+
...(obj.retrieveAndGenerateConfiguration && {
|
|
540
|
+
retrieveAndGenerateConfiguration: RetrieveAndGenerateConfigurationFilterSensitiveLog(obj.retrieveAndGenerateConfiguration),
|
|
541
|
+
}),
|
|
542
|
+
});
|