@aws-sdk/client-bedrock-agent-runtime 3.699.0 → 3.703.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.
Files changed (33) hide show
  1. package/README.md +16 -0
  2. package/dist-cjs/index.js +552 -4
  3. package/dist-es/BedrockAgentRuntime.js +4 -0
  4. package/dist-es/commands/RerankCommand.js +23 -0
  5. package/dist-es/commands/RetrieveAndGenerateStreamCommand.js +27 -0
  6. package/dist-es/commands/index.js +2 -0
  7. package/dist-es/models/models_0.js +191 -0
  8. package/dist-es/pagination/RerankPaginator.js +4 -0
  9. package/dist-es/pagination/index.js +1 -0
  10. package/dist-es/protocols/Aws_restJson1.js +237 -0
  11. package/dist-types/BedrockAgentRuntime.d.ts +14 -0
  12. package/dist-types/BedrockAgentRuntimeClient.d.ts +4 -2
  13. package/dist-types/commands/InvokeAgentCommand.d.ts +55 -2
  14. package/dist-types/commands/InvokeInlineAgentCommand.d.ts +51 -2
  15. package/dist-types/commands/RerankCommand.d.ts +143 -0
  16. package/dist-types/commands/RetrieveAndGenerateCommand.d.ts +42 -2
  17. package/dist-types/commands/RetrieveAndGenerateStreamCommand.d.ts +371 -0
  18. package/dist-types/commands/RetrieveCommand.d.ts +46 -1
  19. package/dist-types/commands/index.d.ts +2 -0
  20. package/dist-types/models/models_0.d.ts +1093 -125
  21. package/dist-types/pagination/RerankPaginator.d.ts +7 -0
  22. package/dist-types/pagination/index.d.ts +1 -0
  23. package/dist-types/protocols/Aws_restJson1.d.ts +18 -0
  24. package/dist-types/ts3.4/BedrockAgentRuntime.d.ts +34 -0
  25. package/dist-types/ts3.4/BedrockAgentRuntimeClient.d.ts +12 -0
  26. package/dist-types/ts3.4/commands/RerankCommand.d.ts +41 -0
  27. package/dist-types/ts3.4/commands/RetrieveAndGenerateStreamCommand.d.ts +51 -0
  28. package/dist-types/ts3.4/commands/index.d.ts +2 -0
  29. package/dist-types/ts3.4/models/models_0.d.ts +490 -0
  30. package/dist-types/ts3.4/pagination/RerankPaginator.d.ts +11 -0
  31. package/dist-types/ts3.4/pagination/index.d.ts +1 -0
  32. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +24 -0
  33. package/package.json +1 -1
package/dist-cjs/index.js CHANGED
@@ -33,6 +33,7 @@ __export(src_exports, {
33
33
  AnalyzePromptEventFilterSensitiveLog: () => AnalyzePromptEventFilterSensitiveLog,
34
34
  ApiInvocationInputFilterSensitiveLog: () => ApiInvocationInputFilterSensitiveLog,
35
35
  ApiResultFilterSensitiveLog: () => ApiResultFilterSensitiveLog,
36
+ AttributeType: () => AttributeType,
36
37
  AttributionFilterSensitiveLog: () => AttributionFilterSensitiveLog,
37
38
  BadGatewayException: () => BadGatewayException,
38
39
  BedrockAgentRuntime: () => BedrockAgentRuntime,
@@ -40,11 +41,14 @@ __export(src_exports, {
40
41
  BedrockAgentRuntimeServiceException: () => BedrockAgentRuntimeServiceException,
41
42
  ByteContentDocFilterSensitiveLog: () => ByteContentDocFilterSensitiveLog,
42
43
  ByteContentFileFilterSensitiveLog: () => ByteContentFileFilterSensitiveLog,
44
+ CitationEventFilterSensitiveLog: () => CitationEventFilterSensitiveLog,
43
45
  CitationFilterSensitiveLog: () => CitationFilterSensitiveLog,
44
46
  ConfirmationState: () => ConfirmationState,
45
47
  ConflictException: () => ConflictException,
46
48
  CreationMode: () => CreationMode,
47
49
  CustomControlMethod: () => CustomControlMethod,
50
+ CustomOrchestrationTraceEventFilterSensitiveLog: () => CustomOrchestrationTraceEventFilterSensitiveLog,
51
+ CustomOrchestrationTraceFilterSensitiveLog: () => CustomOrchestrationTraceFilterSensitiveLog,
48
52
  DeleteAgentMemoryCommand: () => DeleteAgentMemoryCommand,
49
53
  DependencyFailedException: () => DependencyFailedException,
50
54
  ExecutionType: () => ExecutionType,
@@ -108,6 +112,7 @@ __export(src_exports, {
108
112
  GuardrailTraceFilterSensitiveLog: () => GuardrailTraceFilterSensitiveLog,
109
113
  GuardrailWordPolicyAction: () => GuardrailWordPolicyAction,
110
114
  GuardrailWordPolicyAssessmentFilterSensitiveLog: () => GuardrailWordPolicyAssessmentFilterSensitiveLog,
115
+ ImplicitFilterConfigurationFilterSensitiveLog: () => ImplicitFilterConfigurationFilterSensitiveLog,
111
116
  InlineAgentFilePartFilterSensitiveLog: () => InlineAgentFilePartFilterSensitiveLog,
112
117
  InlineAgentPayloadPartFilterSensitiveLog: () => InlineAgentPayloadPartFilterSensitiveLog,
113
118
  InlineAgentResponseStream: () => InlineAgentResponseStream,
@@ -145,6 +150,8 @@ __export(src_exports, {
145
150
  KnowledgeBaseVectorSearchConfigurationFilterSensitiveLog: () => KnowledgeBaseVectorSearchConfigurationFilterSensitiveLog,
146
151
  Memory: () => Memory,
147
152
  MemoryType: () => MemoryType,
153
+ MetadataAttributeSchemaFilterSensitiveLog: () => MetadataAttributeSchemaFilterSensitiveLog,
154
+ MetadataConfigurationForRerankingFilterSensitiveLog: () => MetadataConfigurationForRerankingFilterSensitiveLog,
148
155
  MetadataFilterSensitiveLog: () => MetadataFilterSensitiveLog,
149
156
  ModelInvocationInputFilterSensitiveLog: () => ModelInvocationInputFilterSensitiveLog,
150
157
  NodeType: () => NodeType,
@@ -182,6 +189,21 @@ __export(src_exports, {
182
189
  RawResponseFilterSensitiveLog: () => RawResponseFilterSensitiveLog,
183
190
  RepromptResponseFilterSensitiveLog: () => RepromptResponseFilterSensitiveLog,
184
191
  RequireConfirmation: () => RequireConfirmation,
192
+ RerankCommand: () => RerankCommand,
193
+ RerankDocumentFilterSensitiveLog: () => RerankDocumentFilterSensitiveLog,
194
+ RerankDocumentType: () => RerankDocumentType,
195
+ RerankQueryContentType: () => RerankQueryContentType,
196
+ RerankQueryFilterSensitiveLog: () => RerankQueryFilterSensitiveLog,
197
+ RerankRequestFilterSensitiveLog: () => RerankRequestFilterSensitiveLog,
198
+ RerankResponseFilterSensitiveLog: () => RerankResponseFilterSensitiveLog,
199
+ RerankResultFilterSensitiveLog: () => RerankResultFilterSensitiveLog,
200
+ RerankSourceFilterSensitiveLog: () => RerankSourceFilterSensitiveLog,
201
+ RerankSourceType: () => RerankSourceType,
202
+ RerankTextDocumentFilterSensitiveLog: () => RerankTextDocumentFilterSensitiveLog,
203
+ RerankingConfigurationType: () => RerankingConfigurationType,
204
+ RerankingMetadataSelectionMode: () => RerankingMetadataSelectionMode,
205
+ RerankingMetadataSelectiveModeConfiguration: () => RerankingMetadataSelectiveModeConfiguration,
206
+ RerankingMetadataSelectiveModeConfigurationFilterSensitiveLog: () => RerankingMetadataSelectiveModeConfigurationFilterSensitiveLog,
185
207
  ResourceNotFoundException: () => ResourceNotFoundException,
186
208
  ResponseState: () => ResponseState,
187
209
  ResponseStream: () => ResponseStream,
@@ -194,9 +216,15 @@ __export(src_exports, {
194
216
  RetrieveAndGenerateCommand: () => RetrieveAndGenerateCommand,
195
217
  RetrieveAndGenerateConfigurationFilterSensitiveLog: () => RetrieveAndGenerateConfigurationFilterSensitiveLog,
196
218
  RetrieveAndGenerateInputFilterSensitiveLog: () => RetrieveAndGenerateInputFilterSensitiveLog,
219
+ RetrieveAndGenerateOutputEventFilterSensitiveLog: () => RetrieveAndGenerateOutputEventFilterSensitiveLog,
197
220
  RetrieveAndGenerateOutputFilterSensitiveLog: () => RetrieveAndGenerateOutputFilterSensitiveLog,
198
221
  RetrieveAndGenerateRequestFilterSensitiveLog: () => RetrieveAndGenerateRequestFilterSensitiveLog,
199
222
  RetrieveAndGenerateResponseFilterSensitiveLog: () => RetrieveAndGenerateResponseFilterSensitiveLog,
223
+ RetrieveAndGenerateStreamCommand: () => RetrieveAndGenerateStreamCommand,
224
+ RetrieveAndGenerateStreamRequestFilterSensitiveLog: () => RetrieveAndGenerateStreamRequestFilterSensitiveLog,
225
+ RetrieveAndGenerateStreamResponseFilterSensitiveLog: () => RetrieveAndGenerateStreamResponseFilterSensitiveLog,
226
+ RetrieveAndGenerateStreamResponseOutput: () => RetrieveAndGenerateStreamResponseOutput,
227
+ RetrieveAndGenerateStreamResponseOutputFilterSensitiveLog: () => RetrieveAndGenerateStreamResponseOutputFilterSensitiveLog,
200
228
  RetrieveAndGenerateType: () => RetrieveAndGenerateType,
201
229
  RetrieveCommand: () => RetrieveCommand,
202
230
  RetrieveRequestFilterSensitiveLog: () => RetrieveRequestFilterSensitiveLog,
@@ -216,8 +244,12 @@ __export(src_exports, {
216
244
  Type: () => Type,
217
245
  UsageFilterSensitiveLog: () => UsageFilterSensitiveLog,
218
246
  ValidationException: () => ValidationException,
247
+ VectorSearchBedrockRerankingConfigurationFilterSensitiveLog: () => VectorSearchBedrockRerankingConfigurationFilterSensitiveLog,
248
+ VectorSearchRerankingConfigurationFilterSensitiveLog: () => VectorSearchRerankingConfigurationFilterSensitiveLog,
249
+ VectorSearchRerankingConfigurationType: () => VectorSearchRerankingConfigurationType,
219
250
  __Client: () => import_smithy_client.Client,
220
251
  paginateGetAgentMemory: () => paginateGetAgentMemory,
252
+ paginateRerank: () => paginateRerank,
221
253
  paginateRetrieve: () => paginateRetrieve
222
254
  });
223
255
  module.exports = __toCommonJS(src_exports);
@@ -694,10 +726,33 @@ var FileUseCase = {
694
726
  CHAT: "CHAT",
695
727
  CODE_INTERPRETER: "CODE_INTERPRETER"
696
728
  };
729
+ var AttributeType = {
730
+ BOOLEAN: "BOOLEAN",
731
+ NUMBER: "NUMBER",
732
+ STRING: "STRING",
733
+ STRING_LIST: "STRING_LIST"
734
+ };
697
735
  var SearchType = {
698
736
  HYBRID: "HYBRID",
699
737
  SEMANTIC: "SEMANTIC"
700
738
  };
739
+ var RerankingMetadataSelectionMode = {
740
+ ALL: "ALL",
741
+ SELECTIVE: "SELECTIVE"
742
+ };
743
+ var RerankingMetadataSelectiveModeConfiguration;
744
+ ((RerankingMetadataSelectiveModeConfiguration3) => {
745
+ RerankingMetadataSelectiveModeConfiguration3.visit = /* @__PURE__ */ __name((value, visitor) => {
746
+ if (value.fieldsToInclude !== void 0)
747
+ return visitor.fieldsToInclude(value.fieldsToInclude);
748
+ if (value.fieldsToExclude !== void 0)
749
+ return visitor.fieldsToExclude(value.fieldsToExclude);
750
+ return visitor._(value.$unknown[0], value.$unknown[1]);
751
+ }, "visit");
752
+ })(RerankingMetadataSelectiveModeConfiguration || (RerankingMetadataSelectiveModeConfiguration = {}));
753
+ var VectorSearchRerankingConfigurationType = {
754
+ BEDROCK_RERANKING_MODEL: "BEDROCK_RERANKING_MODEL"
755
+ };
701
756
  var ConfirmationState = {
702
757
  CONFIRM: "CONFIRM",
703
758
  DENY: "DENY"
@@ -718,6 +773,7 @@ var InvocationResultMember;
718
773
  })(InvocationResultMember || (InvocationResultMember = {}));
719
774
  var RetrievalResultLocationType = {
720
775
  CONFLUENCE: "CONFLUENCE",
776
+ CUSTOM: "CUSTOM",
721
777
  S3: "S3",
722
778
  SALESFORCE: "SALESFORCE",
723
779
  SHAREPOINT: "SHAREPOINT",
@@ -881,6 +937,8 @@ var Trace;
881
937
  return visitor.postProcessingTrace(value.postProcessingTrace);
882
938
  if (value.failureTrace !== void 0)
883
939
  return visitor.failureTrace(value.failureTrace);
940
+ if (value.customOrchestrationTrace !== void 0)
941
+ return visitor.customOrchestrationTrace(value.customOrchestrationTrace);
884
942
  return visitor._(value.$unknown[0], value.$unknown[1]);
885
943
  }, "visit");
886
944
  })(Trace || (Trace = {}));
@@ -1001,6 +1059,19 @@ var OptimizedPromptStream;
1001
1059
  return visitor._(value.$unknown[0], value.$unknown[1]);
1002
1060
  }, "visit");
1003
1061
  })(OptimizedPromptStream || (OptimizedPromptStream = {}));
1062
+ var RerankQueryContentType = {
1063
+ TEXT: "TEXT"
1064
+ };
1065
+ var RerankingConfigurationType = {
1066
+ BEDROCK_RERANKING_MODEL: "BEDROCK_RERANKING_MODEL"
1067
+ };
1068
+ var RerankDocumentType = {
1069
+ JSON: "JSON",
1070
+ TEXT: "TEXT"
1071
+ };
1072
+ var RerankSourceType = {
1073
+ INLINE: "INLINE"
1074
+ };
1004
1075
  var ExternalSourceType = {
1005
1076
  BYTE_CONTENT: "BYTE_CONTENT",
1006
1077
  S3: "S3"
@@ -1016,6 +1087,36 @@ var GuadrailAction = {
1016
1087
  INTERVENED: "INTERVENED",
1017
1088
  NONE: "NONE"
1018
1089
  };
1090
+ var RetrieveAndGenerateStreamResponseOutput;
1091
+ ((RetrieveAndGenerateStreamResponseOutput3) => {
1092
+ RetrieveAndGenerateStreamResponseOutput3.visit = /* @__PURE__ */ __name((value, visitor) => {
1093
+ if (value.output !== void 0)
1094
+ return visitor.output(value.output);
1095
+ if (value.citation !== void 0)
1096
+ return visitor.citation(value.citation);
1097
+ if (value.guardrail !== void 0)
1098
+ return visitor.guardrail(value.guardrail);
1099
+ if (value.internalServerException !== void 0)
1100
+ return visitor.internalServerException(value.internalServerException);
1101
+ if (value.validationException !== void 0)
1102
+ return visitor.validationException(value.validationException);
1103
+ if (value.resourceNotFoundException !== void 0)
1104
+ return visitor.resourceNotFoundException(value.resourceNotFoundException);
1105
+ if (value.serviceQuotaExceededException !== void 0)
1106
+ return visitor.serviceQuotaExceededException(value.serviceQuotaExceededException);
1107
+ if (value.throttlingException !== void 0)
1108
+ return visitor.throttlingException(value.throttlingException);
1109
+ if (value.accessDeniedException !== void 0)
1110
+ return visitor.accessDeniedException(value.accessDeniedException);
1111
+ if (value.conflictException !== void 0)
1112
+ return visitor.conflictException(value.conflictException);
1113
+ if (value.dependencyFailedException !== void 0)
1114
+ return visitor.dependencyFailedException(value.dependencyFailedException);
1115
+ if (value.badGatewayException !== void 0)
1116
+ return visitor.badGatewayException(value.badGatewayException);
1117
+ return visitor._(value.$unknown[0], value.$unknown[1]);
1118
+ }, "visit");
1119
+ })(RetrieveAndGenerateStreamResponseOutput || (RetrieveAndGenerateStreamResponseOutput = {}));
1019
1120
  var RetrievalFilter;
1020
1121
  ((RetrievalFilter2) => {
1021
1122
  RetrievalFilter2.visit = /* @__PURE__ */ __name((value, visitor) => {
@@ -1193,6 +1294,43 @@ var InputFileFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
1193
1294
  ...obj,
1194
1295
  ...obj.source && { source: FileSourceFilterSensitiveLog(obj.source) }
1195
1296
  }), "InputFileFilterSensitiveLog");
1297
+ var MetadataAttributeSchemaFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
1298
+ ...obj
1299
+ }), "MetadataAttributeSchemaFilterSensitiveLog");
1300
+ var ImplicitFilterConfigurationFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
1301
+ ...obj,
1302
+ ...obj.metadataAttributes && { metadataAttributes: import_smithy_client.SENSITIVE_STRING }
1303
+ }), "ImplicitFilterConfigurationFilterSensitiveLog");
1304
+ var RerankingMetadataSelectiveModeConfigurationFilterSensitiveLog = /* @__PURE__ */ __name((obj) => {
1305
+ if (obj.fieldsToInclude !== void 0)
1306
+ return { fieldsToInclude: import_smithy_client.SENSITIVE_STRING };
1307
+ if (obj.fieldsToExclude !== void 0)
1308
+ return { fieldsToExclude: import_smithy_client.SENSITIVE_STRING };
1309
+ if (obj.$unknown !== void 0)
1310
+ return { [obj.$unknown[0]]: "UNKNOWN" };
1311
+ }, "RerankingMetadataSelectiveModeConfigurationFilterSensitiveLog");
1312
+ var MetadataConfigurationForRerankingFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
1313
+ ...obj,
1314
+ ...obj.selectiveModeConfiguration && {
1315
+ selectiveModeConfiguration: RerankingMetadataSelectiveModeConfigurationFilterSensitiveLog(
1316
+ obj.selectiveModeConfiguration
1317
+ )
1318
+ }
1319
+ }), "MetadataConfigurationForRerankingFilterSensitiveLog");
1320
+ var VectorSearchBedrockRerankingConfigurationFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
1321
+ ...obj,
1322
+ ...obj.metadataConfiguration && {
1323
+ metadataConfiguration: MetadataConfigurationForRerankingFilterSensitiveLog(obj.metadataConfiguration)
1324
+ }
1325
+ }), "VectorSearchBedrockRerankingConfigurationFilterSensitiveLog");
1326
+ var VectorSearchRerankingConfigurationFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
1327
+ ...obj,
1328
+ ...obj.bedrockRerankingConfiguration && {
1329
+ bedrockRerankingConfiguration: VectorSearchBedrockRerankingConfigurationFilterSensitiveLog(
1330
+ obj.bedrockRerankingConfiguration
1331
+ )
1332
+ }
1333
+ }), "VectorSearchRerankingConfigurationFilterSensitiveLog");
1196
1334
  var ApiResultFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
1197
1335
  ...obj,
1198
1336
  ...obj.apiPath && { apiPath: import_smithy_client.SENSITIVE_STRING }
@@ -1268,6 +1406,13 @@ var ReturnControlPayloadFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
1268
1406
  invocationInputs: obj.invocationInputs.map((item) => InvocationInputMemberFilterSensitiveLog(item))
1269
1407
  }
1270
1408
  }), "ReturnControlPayloadFilterSensitiveLog");
1409
+ var CustomOrchestrationTraceEventFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
1410
+ ...obj
1411
+ }), "CustomOrchestrationTraceEventFilterSensitiveLog");
1412
+ var CustomOrchestrationTraceFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
1413
+ ...obj,
1414
+ ...obj.event && { event: import_smithy_client.SENSITIVE_STRING }
1415
+ }), "CustomOrchestrationTraceFilterSensitiveLog");
1271
1416
  var FailureTraceFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
1272
1417
  ...obj,
1273
1418
  ...obj.failureReason && { failureReason: import_smithy_client.SENSITIVE_STRING }
@@ -1443,6 +1588,8 @@ var TraceFilterSensitiveLog = /* @__PURE__ */ __name((obj) => {
1443
1588
  return { postProcessingTrace: import_smithy_client.SENSITIVE_STRING };
1444
1589
  if (obj.failureTrace !== void 0)
1445
1590
  return { failureTrace: import_smithy_client.SENSITIVE_STRING };
1591
+ if (obj.customOrchestrationTrace !== void 0)
1592
+ return { customOrchestrationTrace: import_smithy_client.SENSITIVE_STRING };
1446
1593
  if (obj.$unknown !== void 0)
1447
1594
  return { [obj.$unknown[0]]: "UNKNOWN" };
1448
1595
  }, "TraceFilterSensitiveLog");
@@ -1606,6 +1753,34 @@ var OptimizePromptResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => (
1606
1753
  ...obj,
1607
1754
  ...obj.optimizedPrompt && { optimizedPrompt: "STREAMING_CONTENT" }
1608
1755
  }), "OptimizePromptResponseFilterSensitiveLog");
1756
+ var RerankTextDocumentFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
1757
+ ...obj
1758
+ }), "RerankTextDocumentFilterSensitiveLog");
1759
+ var RerankQueryFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
1760
+ ...obj,
1761
+ ...obj.textQuery && { textQuery: import_smithy_client.SENSITIVE_STRING }
1762
+ }), "RerankQueryFilterSensitiveLog");
1763
+ var RerankDocumentFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
1764
+ ...obj,
1765
+ ...obj.textDocument && { textDocument: import_smithy_client.SENSITIVE_STRING }
1766
+ }), "RerankDocumentFilterSensitiveLog");
1767
+ var RerankSourceFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
1768
+ ...obj,
1769
+ ...obj.inlineDocumentSource && { inlineDocumentSource: import_smithy_client.SENSITIVE_STRING }
1770
+ }), "RerankSourceFilterSensitiveLog");
1771
+ var RerankRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
1772
+ ...obj,
1773
+ ...obj.queries && { queries: import_smithy_client.SENSITIVE_STRING },
1774
+ ...obj.sources && { sources: import_smithy_client.SENSITIVE_STRING }
1775
+ }), "RerankRequestFilterSensitiveLog");
1776
+ var RerankResultFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
1777
+ ...obj,
1778
+ ...obj.document && { document: import_smithy_client.SENSITIVE_STRING }
1779
+ }), "RerankResultFilterSensitiveLog");
1780
+ var RerankResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
1781
+ ...obj,
1782
+ ...obj.results && { results: obj.results.map((item) => RerankResultFilterSensitiveLog(item)) }
1783
+ }), "RerankResponseFilterSensitiveLog");
1609
1784
  var RetrieveAndGenerateInputFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
1610
1785
  ...obj
1611
1786
  }), "RetrieveAndGenerateInputFilterSensitiveLog");
@@ -1649,6 +1824,45 @@ var RetrieveAndGenerateResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj)
1649
1824
  ...obj.output && { output: import_smithy_client.SENSITIVE_STRING },
1650
1825
  ...obj.citations && { citations: obj.citations.map((item) => CitationFilterSensitiveLog(item)) }
1651
1826
  }), "RetrieveAndGenerateResponseFilterSensitiveLog");
1827
+ var CitationEventFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
1828
+ ...obj,
1829
+ ...obj.citation && { citation: CitationFilterSensitiveLog(obj.citation) }
1830
+ }), "CitationEventFilterSensitiveLog");
1831
+ var RetrieveAndGenerateOutputEventFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
1832
+ ...obj
1833
+ }), "RetrieveAndGenerateOutputEventFilterSensitiveLog");
1834
+ var RetrieveAndGenerateStreamResponseOutputFilterSensitiveLog = /* @__PURE__ */ __name((obj) => {
1835
+ if (obj.output !== void 0)
1836
+ return { output: import_smithy_client.SENSITIVE_STRING };
1837
+ if (obj.citation !== void 0)
1838
+ return { citation: CitationEventFilterSensitiveLog(obj.citation) };
1839
+ if (obj.guardrail !== void 0)
1840
+ return { guardrail: obj.guardrail };
1841
+ if (obj.internalServerException !== void 0)
1842
+ return { internalServerException: obj.internalServerException };
1843
+ if (obj.validationException !== void 0)
1844
+ return { validationException: obj.validationException };
1845
+ if (obj.resourceNotFoundException !== void 0)
1846
+ return { resourceNotFoundException: obj.resourceNotFoundException };
1847
+ if (obj.serviceQuotaExceededException !== void 0)
1848
+ return { serviceQuotaExceededException: obj.serviceQuotaExceededException };
1849
+ if (obj.throttlingException !== void 0)
1850
+ return { throttlingException: obj.throttlingException };
1851
+ if (obj.accessDeniedException !== void 0)
1852
+ return { accessDeniedException: obj.accessDeniedException };
1853
+ if (obj.conflictException !== void 0)
1854
+ return { conflictException: obj.conflictException };
1855
+ if (obj.dependencyFailedException !== void 0)
1856
+ return { dependencyFailedException: obj.dependencyFailedException };
1857
+ if (obj.badGatewayException !== void 0)
1858
+ return { badGatewayException: obj.badGatewayException };
1859
+ if (obj.$unknown !== void 0)
1860
+ return { [obj.$unknown[0]]: "UNKNOWN" };
1861
+ }, "RetrieveAndGenerateStreamResponseOutputFilterSensitiveLog");
1862
+ var RetrieveAndGenerateStreamResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
1863
+ ...obj,
1864
+ ...obj.stream && { stream: "STREAMING_CONTENT" }
1865
+ }), "RetrieveAndGenerateStreamResponseFilterSensitiveLog");
1652
1866
  var KnowledgeBaseQueryFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
1653
1867
  ...obj
1654
1868
  }), "KnowledgeBaseQueryFilterSensitiveLog");
@@ -1694,7 +1908,13 @@ var RetrievalFilterFilterSensitiveLog = /* @__PURE__ */ __name((obj) => {
1694
1908
  }, "RetrievalFilterFilterSensitiveLog");
1695
1909
  var KnowledgeBaseVectorSearchConfigurationFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
1696
1910
  ...obj,
1697
- ...obj.filter && { filter: import_smithy_client.SENSITIVE_STRING }
1911
+ ...obj.filter && { filter: import_smithy_client.SENSITIVE_STRING },
1912
+ ...obj.rerankingConfiguration && {
1913
+ rerankingConfiguration: VectorSearchRerankingConfigurationFilterSensitiveLog(obj.rerankingConfiguration)
1914
+ },
1915
+ ...obj.implicitFilterConfiguration && {
1916
+ implicitFilterConfiguration: ImplicitFilterConfigurationFilterSensitiveLog(obj.implicitFilterConfiguration)
1917
+ }
1698
1918
  }), "KnowledgeBaseVectorSearchConfigurationFilterSensitiveLog");
1699
1919
  var KnowledgeBaseRetrievalConfigurationFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
1700
1920
  ...obj,
@@ -1767,6 +1987,15 @@ var RetrieveAndGenerateRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj)
1767
1987
  )
1768
1988
  }
1769
1989
  }), "RetrieveAndGenerateRequestFilterSensitiveLog");
1990
+ var RetrieveAndGenerateStreamRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
1991
+ ...obj,
1992
+ ...obj.input && { input: import_smithy_client.SENSITIVE_STRING },
1993
+ ...obj.retrieveAndGenerateConfiguration && {
1994
+ retrieveAndGenerateConfiguration: RetrieveAndGenerateConfigurationFilterSensitiveLog(
1995
+ obj.retrieveAndGenerateConfiguration
1996
+ )
1997
+ }
1998
+ }), "RetrieveAndGenerateStreamRequestFilterSensitiveLog");
1770
1999
  var SessionStateFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
1771
2000
  ...obj,
1772
2001
  ...obj.returnControlInvocationResults && {
@@ -1833,7 +2062,8 @@ var se_InvokeAgentCommand = /* @__PURE__ */ __name(async (input, context) => {
1833
2062
  endSession: [],
1834
2063
  inputText: [],
1835
2064
  memoryId: [],
1836
- sessionState: (_) => se_SessionState(_, context)
2065
+ sessionState: (_) => se_SessionState(_, context),
2066
+ streamingConfigurations: (_) => (0, import_smithy_client._json)(_)
1837
2067
  })
1838
2068
  );
1839
2069
  b.m("POST").h(headers).b(body);
@@ -1900,6 +2130,24 @@ var se_OptimizePromptCommand = /* @__PURE__ */ __name(async (input, context) =>
1900
2130
  b.m("POST").h(headers).b(body);
1901
2131
  return b.build();
1902
2132
  }, "se_OptimizePromptCommand");
2133
+ var se_RerankCommand = /* @__PURE__ */ __name(async (input, context) => {
2134
+ const b = (0, import_core.requestBuilder)(input, context);
2135
+ const headers = {
2136
+ "content-type": "application/json"
2137
+ };
2138
+ b.bp("/rerank");
2139
+ let body;
2140
+ body = JSON.stringify(
2141
+ (0, import_smithy_client.take)(input, {
2142
+ nextToken: [],
2143
+ queries: (_) => (0, import_smithy_client._json)(_),
2144
+ rerankingConfiguration: (_) => se_RerankingConfiguration(_, context),
2145
+ sources: (_) => se_RerankSourcesList(_, context)
2146
+ })
2147
+ );
2148
+ b.m("POST").h(headers).b(body);
2149
+ return b.build();
2150
+ }, "se_RerankCommand");
1903
2151
  var se_RetrieveCommand = /* @__PURE__ */ __name(async (input, context) => {
1904
2152
  const b = (0, import_core.requestBuilder)(input, context);
1905
2153
  const headers = {
@@ -1910,6 +2158,7 @@ var se_RetrieveCommand = /* @__PURE__ */ __name(async (input, context) => {
1910
2158
  let body;
1911
2159
  body = JSON.stringify(
1912
2160
  (0, import_smithy_client.take)(input, {
2161
+ guardrailConfiguration: (_) => (0, import_smithy_client._json)(_),
1913
2162
  nextToken: [],
1914
2163
  retrievalConfiguration: (_) => se_KnowledgeBaseRetrievalConfiguration(_, context),
1915
2164
  retrievalQuery: (_) => (0, import_smithy_client._json)(_)
@@ -1936,6 +2185,24 @@ var se_RetrieveAndGenerateCommand = /* @__PURE__ */ __name(async (input, context
1936
2185
  b.m("POST").h(headers).b(body);
1937
2186
  return b.build();
1938
2187
  }, "se_RetrieveAndGenerateCommand");
2188
+ var se_RetrieveAndGenerateStreamCommand = /* @__PURE__ */ __name(async (input, context) => {
2189
+ const b = (0, import_core.requestBuilder)(input, context);
2190
+ const headers = {
2191
+ "content-type": "application/json"
2192
+ };
2193
+ b.bp("/retrieveAndGenerateStream");
2194
+ let body;
2195
+ body = JSON.stringify(
2196
+ (0, import_smithy_client.take)(input, {
2197
+ input: (_) => (0, import_smithy_client._json)(_),
2198
+ retrieveAndGenerateConfiguration: (_) => se_RetrieveAndGenerateConfiguration(_, context),
2199
+ sessionConfiguration: (_) => (0, import_smithy_client._json)(_),
2200
+ sessionId: []
2201
+ })
2202
+ );
2203
+ b.m("POST").h(headers).b(body);
2204
+ return b.build();
2205
+ }, "se_RetrieveAndGenerateStreamCommand");
1939
2206
  var de_DeleteAgentMemoryCommand = /* @__PURE__ */ __name(async (output, context) => {
1940
2207
  if (output.statusCode !== 202 && output.statusCode >= 300) {
1941
2208
  return de_CommandError(output, context);
@@ -2010,6 +2277,21 @@ var de_OptimizePromptCommand = /* @__PURE__ */ __name(async (output, context) =>
2010
2277
  contents.optimizedPrompt = de_OptimizedPromptStream(data, context);
2011
2278
  return contents;
2012
2279
  }, "de_OptimizePromptCommand");
2280
+ var de_RerankCommand = /* @__PURE__ */ __name(async (output, context) => {
2281
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
2282
+ return de_CommandError(output, context);
2283
+ }
2284
+ const contents = (0, import_smithy_client.map)({
2285
+ $metadata: deserializeMetadata(output)
2286
+ });
2287
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
2288
+ const doc = (0, import_smithy_client.take)(data, {
2289
+ nextToken: import_smithy_client.expectString,
2290
+ results: (_) => de_RerankResultsList(_, context)
2291
+ });
2292
+ Object.assign(contents, doc);
2293
+ return contents;
2294
+ }, "de_RerankCommand");
2013
2295
  var de_RetrieveCommand = /* @__PURE__ */ __name(async (output, context) => {
2014
2296
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2015
2297
  return de_CommandError(output, context);
@@ -2019,6 +2301,7 @@ var de_RetrieveCommand = /* @__PURE__ */ __name(async (output, context) => {
2019
2301
  });
2020
2302
  const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
2021
2303
  const doc = (0, import_smithy_client.take)(data, {
2304
+ guardrailAction: import_smithy_client.expectString,
2022
2305
  nextToken: import_smithy_client.expectString,
2023
2306
  retrievalResults: (_) => de_KnowledgeBaseRetrievalResults(_, context)
2024
2307
  });
@@ -2042,6 +2325,18 @@ var de_RetrieveAndGenerateCommand = /* @__PURE__ */ __name(async (output, contex
2042
2325
  Object.assign(contents, doc);
2043
2326
  return contents;
2044
2327
  }, "de_RetrieveAndGenerateCommand");
2328
+ var de_RetrieveAndGenerateStreamCommand = /* @__PURE__ */ __name(async (output, context) => {
2329
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
2330
+ return de_CommandError(output, context);
2331
+ }
2332
+ const contents = (0, import_smithy_client.map)({
2333
+ $metadata: deserializeMetadata(output),
2334
+ [_sI]: [, output.headers[_xabkbsi]]
2335
+ });
2336
+ const data = output.body;
2337
+ contents.stream = de_RetrieveAndGenerateStreamResponseOutput(data, context);
2338
+ return contents;
2339
+ }, "de_RetrieveAndGenerateStreamCommand");
2045
2340
  var de_CommandError = /* @__PURE__ */ __name(async (output, context) => {
2046
2341
  const parsedOutput = {
2047
2342
  ...output,
@@ -2485,6 +2780,80 @@ var de_ResponseStream = /* @__PURE__ */ __name((output, context) => {
2485
2780
  return { $unknown: output };
2486
2781
  });
2487
2782
  }, "de_ResponseStream");
2783
+ var de_RetrieveAndGenerateStreamResponseOutput = /* @__PURE__ */ __name((output, context) => {
2784
+ return context.eventStreamMarshaller.deserialize(output, async (event) => {
2785
+ if (event["output"] != null) {
2786
+ return {
2787
+ output: await de_RetrieveAndGenerateOutputEvent_event(event["output"], context)
2788
+ };
2789
+ }
2790
+ if (event["citation"] != null) {
2791
+ return {
2792
+ citation: await de_CitationEvent_event(event["citation"], context)
2793
+ };
2794
+ }
2795
+ if (event["guardrail"] != null) {
2796
+ return {
2797
+ guardrail: await de_GuardrailEvent_event(event["guardrail"], context)
2798
+ };
2799
+ }
2800
+ if (event["internalServerException"] != null) {
2801
+ return {
2802
+ internalServerException: await de_InternalServerException_event(event["internalServerException"], context)
2803
+ };
2804
+ }
2805
+ if (event["validationException"] != null) {
2806
+ return {
2807
+ validationException: await de_ValidationException_event(event["validationException"], context)
2808
+ };
2809
+ }
2810
+ if (event["resourceNotFoundException"] != null) {
2811
+ return {
2812
+ resourceNotFoundException: await de_ResourceNotFoundException_event(
2813
+ event["resourceNotFoundException"],
2814
+ context
2815
+ )
2816
+ };
2817
+ }
2818
+ if (event["serviceQuotaExceededException"] != null) {
2819
+ return {
2820
+ serviceQuotaExceededException: await de_ServiceQuotaExceededException_event(
2821
+ event["serviceQuotaExceededException"],
2822
+ context
2823
+ )
2824
+ };
2825
+ }
2826
+ if (event["throttlingException"] != null) {
2827
+ return {
2828
+ throttlingException: await de_ThrottlingException_event(event["throttlingException"], context)
2829
+ };
2830
+ }
2831
+ if (event["accessDeniedException"] != null) {
2832
+ return {
2833
+ accessDeniedException: await de_AccessDeniedException_event(event["accessDeniedException"], context)
2834
+ };
2835
+ }
2836
+ if (event["conflictException"] != null) {
2837
+ return {
2838
+ conflictException: await de_ConflictException_event(event["conflictException"], context)
2839
+ };
2840
+ }
2841
+ if (event["dependencyFailedException"] != null) {
2842
+ return {
2843
+ dependencyFailedException: await de_DependencyFailedException_event(
2844
+ event["dependencyFailedException"],
2845
+ context
2846
+ )
2847
+ };
2848
+ }
2849
+ if (event["badGatewayException"] != null) {
2850
+ return {
2851
+ badGatewayException: await de_BadGatewayException_event(event["badGatewayException"], context)
2852
+ };
2853
+ }
2854
+ return { $unknown: output };
2855
+ });
2856
+ }, "de_RetrieveAndGenerateStreamResponseOutput");
2488
2857
  var de_AccessDeniedException_event = /* @__PURE__ */ __name(async (output, context) => {
2489
2858
  const parsedOutput = {
2490
2859
  ...output,
@@ -2505,6 +2874,12 @@ var de_BadGatewayException_event = /* @__PURE__ */ __name(async (output, context
2505
2874
  };
2506
2875
  return de_BadGatewayExceptionRes(parsedOutput, context);
2507
2876
  }, "de_BadGatewayException_event");
2877
+ var de_CitationEvent_event = /* @__PURE__ */ __name(async (output, context) => {
2878
+ const contents = {};
2879
+ const data = await (0, import_core2.parseJsonBody)(output.body, context);
2880
+ Object.assign(contents, de_CitationEvent(data, context));
2881
+ return contents;
2882
+ }, "de_CitationEvent_event");
2508
2883
  var de_ConflictException_event = /* @__PURE__ */ __name(async (output, context) => {
2509
2884
  const parsedOutput = {
2510
2885
  ...output,
@@ -2543,6 +2918,12 @@ var de_FlowTraceEvent_event = /* @__PURE__ */ __name(async (output, context) =>
2543
2918
  Object.assign(contents, de_FlowTraceEvent(data, context));
2544
2919
  return contents;
2545
2920
  }, "de_FlowTraceEvent_event");
2921
+ var de_GuardrailEvent_event = /* @__PURE__ */ __name(async (output, context) => {
2922
+ const contents = {};
2923
+ const data = await (0, import_core2.parseJsonBody)(output.body, context);
2924
+ Object.assign(contents, (0, import_smithy_client._json)(data));
2925
+ return contents;
2926
+ }, "de_GuardrailEvent_event");
2546
2927
  var de_InlineAgentFilePart_event = /* @__PURE__ */ __name(async (output, context) => {
2547
2928
  const contents = {};
2548
2929
  const data = await (0, import_core2.parseJsonBody)(output.body, context);
@@ -2593,6 +2974,12 @@ var de_ResourceNotFoundException_event = /* @__PURE__ */ __name(async (output, c
2593
2974
  };
2594
2975
  return de_ResourceNotFoundExceptionRes(parsedOutput, context);
2595
2976
  }, "de_ResourceNotFoundException_event");
2977
+ var de_RetrieveAndGenerateOutputEvent_event = /* @__PURE__ */ __name(async (output, context) => {
2978
+ const contents = {};
2979
+ const data = await (0, import_core2.parseJsonBody)(output.body, context);
2980
+ Object.assign(contents, (0, import_smithy_client._json)(data));
2981
+ return contents;
2982
+ }, "de_RetrieveAndGenerateOutputEvent_event");
2596
2983
  var de_ReturnControlPayload_event = /* @__PURE__ */ __name(async (output, context) => {
2597
2984
  const contents = {};
2598
2985
  const data = await (0, import_core2.parseJsonBody)(output.body, context);
@@ -2638,6 +3025,18 @@ var se_AdditionalModelRequestFields = /* @__PURE__ */ __name((input, context) =>
2638
3025
  var se_AdditionalModelRequestFieldsValue = /* @__PURE__ */ __name((input, context) => {
2639
3026
  return input;
2640
3027
  }, "se_AdditionalModelRequestFieldsValue");
3028
+ var se_BedrockRerankingConfiguration = /* @__PURE__ */ __name((input, context) => {
3029
+ return (0, import_smithy_client.take)(input, {
3030
+ modelConfiguration: (_) => se_BedrockRerankingModelConfiguration(_, context),
3031
+ numberOfResults: []
3032
+ });
3033
+ }, "se_BedrockRerankingConfiguration");
3034
+ var se_BedrockRerankingModelConfiguration = /* @__PURE__ */ __name((input, context) => {
3035
+ return (0, import_smithy_client.take)(input, {
3036
+ additionalModelRequestFields: (_) => se_AdditionalModelRequestFields(_, context),
3037
+ modelArn: []
3038
+ });
3039
+ }, "se_BedrockRerankingModelConfiguration");
2641
3040
  var se_ByteContentDoc = /* @__PURE__ */ __name((input, context) => {
2642
3041
  return (0, import_smithy_client.take)(input, {
2643
3042
  contentType: [],
@@ -2795,8 +3194,10 @@ var se_KnowledgeBases = /* @__PURE__ */ __name((input, context) => {
2795
3194
  var se_KnowledgeBaseVectorSearchConfiguration = /* @__PURE__ */ __name((input, context) => {
2796
3195
  return (0, import_smithy_client.take)(input, {
2797
3196
  filter: (_) => se_RetrievalFilter(_, context),
3197
+ implicitFilterConfiguration: import_smithy_client._json,
2798
3198
  numberOfResults: [],
2799
- overrideSearchType: []
3199
+ overrideSearchType: [],
3200
+ rerankingConfiguration: (_) => se_VectorSearchRerankingConfiguration(_, context)
2800
3201
  });
2801
3202
  }, "se_KnowledgeBaseVectorSearchConfiguration");
2802
3203
  var se_OrchestrationConfiguration = /* @__PURE__ */ __name((input, context) => {
@@ -2828,6 +3229,30 @@ var se_PromptOverrideConfiguration = /* @__PURE__ */ __name((input, context) =>
2828
3229
  promptConfigurations: (_) => se_PromptConfigurations(_, context)
2829
3230
  });
2830
3231
  }, "se_PromptOverrideConfiguration");
3232
+ var se_RerankDocument = /* @__PURE__ */ __name((input, context) => {
3233
+ return (0, import_smithy_client.take)(input, {
3234
+ jsonDocument: (_) => se_Document(_, context),
3235
+ textDocument: import_smithy_client._json,
3236
+ type: []
3237
+ });
3238
+ }, "se_RerankDocument");
3239
+ var se_RerankingConfiguration = /* @__PURE__ */ __name((input, context) => {
3240
+ return (0, import_smithy_client.take)(input, {
3241
+ bedrockRerankingConfiguration: (_) => se_BedrockRerankingConfiguration(_, context),
3242
+ type: []
3243
+ });
3244
+ }, "se_RerankingConfiguration");
3245
+ var se_RerankSource = /* @__PURE__ */ __name((input, context) => {
3246
+ return (0, import_smithy_client.take)(input, {
3247
+ inlineDocumentSource: (_) => se_RerankDocument(_, context),
3248
+ type: []
3249
+ });
3250
+ }, "se_RerankSource");
3251
+ var se_RerankSourcesList = /* @__PURE__ */ __name((input, context) => {
3252
+ return input.filter((e) => e != null).map((entry) => {
3253
+ return se_RerankSource(entry, context);
3254
+ });
3255
+ }, "se_RerankSourcesList");
2831
3256
  var se_RetrievalFilter = /* @__PURE__ */ __name((input, context) => {
2832
3257
  return RetrievalFilter.visit(input, {
2833
3258
  andAll: (value) => ({ andAll: se_RetrievalFilterList(value, context) }),
@@ -2876,6 +3301,25 @@ var se_TextInferenceConfig = /* @__PURE__ */ __name((input, context) => {
2876
3301
  topP: import_smithy_client.serializeFloat
2877
3302
  });
2878
3303
  }, "se_TextInferenceConfig");
3304
+ var se_VectorSearchBedrockRerankingConfiguration = /* @__PURE__ */ __name((input, context) => {
3305
+ return (0, import_smithy_client.take)(input, {
3306
+ metadataConfiguration: import_smithy_client._json,
3307
+ modelConfiguration: (_) => se_VectorSearchBedrockRerankingModelConfiguration(_, context),
3308
+ numberOfRerankedResults: []
3309
+ });
3310
+ }, "se_VectorSearchBedrockRerankingConfiguration");
3311
+ var se_VectorSearchBedrockRerankingModelConfiguration = /* @__PURE__ */ __name((input, context) => {
3312
+ return (0, import_smithy_client.take)(input, {
3313
+ additionalModelRequestFields: (_) => se_AdditionalModelRequestFields(_, context),
3314
+ modelArn: []
3315
+ });
3316
+ }, "se_VectorSearchBedrockRerankingModelConfiguration");
3317
+ var se_VectorSearchRerankingConfiguration = /* @__PURE__ */ __name((input, context) => {
3318
+ return (0, import_smithy_client.take)(input, {
3319
+ bedrockRerankingConfiguration: (_) => se_VectorSearchBedrockRerankingConfiguration(_, context),
3320
+ type: []
3321
+ });
3322
+ }, "se_VectorSearchRerankingConfiguration");
2879
3323
  var se_Document = /* @__PURE__ */ __name((input, context) => {
2880
3324
  return input;
2881
3325
  }, "se_Document");
@@ -2890,6 +3334,11 @@ var de_Citation = /* @__PURE__ */ __name((output, context) => {
2890
3334
  retrievedReferences: (_) => de_RetrievedReferences(_, context)
2891
3335
  });
2892
3336
  }, "de_Citation");
3337
+ var de_CitationEvent = /* @__PURE__ */ __name((output, context) => {
3338
+ return (0, import_smithy_client.take)(output, {
3339
+ citation: (_) => de_Citation(_, context)
3340
+ });
3341
+ }, "de_CitationEvent");
2893
3342
  var de_Citations = /* @__PURE__ */ __name((output, context) => {
2894
3343
  const retVal = (output || []).filter((e) => e != null).map((entry) => {
2895
3344
  return de_Citation(entry, context);
@@ -3163,6 +3612,26 @@ var de_PreProcessingTrace = /* @__PURE__ */ __name((output, context) => {
3163
3612
  }
3164
3613
  return { $unknown: Object.entries(output)[0] };
3165
3614
  }, "de_PreProcessingTrace");
3615
+ var de_RerankDocument = /* @__PURE__ */ __name((output, context) => {
3616
+ return (0, import_smithy_client.take)(output, {
3617
+ jsonDocument: (_) => de_Document(_, context),
3618
+ textDocument: import_smithy_client._json,
3619
+ type: import_smithy_client.expectString
3620
+ });
3621
+ }, "de_RerankDocument");
3622
+ var de_RerankResult = /* @__PURE__ */ __name((output, context) => {
3623
+ return (0, import_smithy_client.take)(output, {
3624
+ document: (_) => de_RerankDocument(_, context),
3625
+ index: import_smithy_client.expectInt32,
3626
+ relevanceScore: import_smithy_client.limitedParseFloat32
3627
+ });
3628
+ }, "de_RerankResult");
3629
+ var de_RerankResultsList = /* @__PURE__ */ __name((output, context) => {
3630
+ const retVal = (output || []).filter((e) => e != null).map((entry) => {
3631
+ return de_RerankResult(entry, context);
3632
+ });
3633
+ return retVal;
3634
+ }, "de_RerankResultsList");
3166
3635
  var de_RetrievalResultMetadata = /* @__PURE__ */ __name((output, context) => {
3167
3636
  return Object.entries(output).reduce((acc, [key, value]) => {
3168
3637
  if (value === null) {
@@ -3189,6 +3658,11 @@ var de_RetrievedReferences = /* @__PURE__ */ __name((output, context) => {
3189
3658
  return retVal;
3190
3659
  }, "de_RetrievedReferences");
3191
3660
  var de_Trace = /* @__PURE__ */ __name((output, context) => {
3661
+ if (output.customOrchestrationTrace != null) {
3662
+ return {
3663
+ customOrchestrationTrace: (0, import_smithy_client._json)(output.customOrchestrationTrace)
3664
+ };
3665
+ }
3192
3666
  if (output.failureTrace != null) {
3193
3667
  return {
3194
3668
  failureTrace: (0, import_smithy_client._json)(output.failureTrace)
@@ -3243,6 +3717,7 @@ var _sI = "sessionId";
3243
3717
  var _xabact = "x-amzn-bedrock-agent-content-type";
3244
3718
  var _xabami = "x-amz-bedrock-agent-memory-id";
3245
3719
  var _xabasi = "x-amz-bedrock-agent-session-id";
3720
+ var _xabkbsi = "x-amzn-bedrock-knowledge-base-session-id";
3246
3721
 
3247
3722
  // src/commands/DeleteAgentMemoryCommand.ts
3248
3723
  var _DeleteAgentMemoryCommand = class _DeleteAgentMemoryCommand extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
@@ -3353,6 +3828,20 @@ var _OptimizePromptCommand = class _OptimizePromptCommand extends import_smithy_
3353
3828
  __name(_OptimizePromptCommand, "OptimizePromptCommand");
3354
3829
  var OptimizePromptCommand = _OptimizePromptCommand;
3355
3830
 
3831
+ // src/commands/RerankCommand.ts
3832
+
3833
+
3834
+
3835
+ var _RerankCommand = class _RerankCommand extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
3836
+ return [
3837
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
3838
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
3839
+ ];
3840
+ }).s("AmazonBedrockAgentRunTimeService", "Rerank", {}).n("BedrockAgentRuntimeClient", "RerankCommand").f(RerankRequestFilterSensitiveLog, RerankResponseFilterSensitiveLog).ser(se_RerankCommand).de(de_RerankCommand).build() {
3841
+ };
3842
+ __name(_RerankCommand, "RerankCommand");
3843
+ var RerankCommand = _RerankCommand;
3844
+
3356
3845
  // src/commands/RetrieveAndGenerateCommand.ts
3357
3846
 
3358
3847
 
@@ -3367,6 +3856,27 @@ var _RetrieveAndGenerateCommand = class _RetrieveAndGenerateCommand extends impo
3367
3856
  __name(_RetrieveAndGenerateCommand, "RetrieveAndGenerateCommand");
3368
3857
  var RetrieveAndGenerateCommand = _RetrieveAndGenerateCommand;
3369
3858
 
3859
+ // src/commands/RetrieveAndGenerateStreamCommand.ts
3860
+
3861
+
3862
+
3863
+ var _RetrieveAndGenerateStreamCommand = class _RetrieveAndGenerateStreamCommand extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
3864
+ return [
3865
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
3866
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
3867
+ ];
3868
+ }).s("AmazonBedrockAgentRunTimeService", "RetrieveAndGenerateStream", {
3869
+ /**
3870
+ * @internal
3871
+ */
3872
+ eventStream: {
3873
+ output: true
3874
+ }
3875
+ }).n("BedrockAgentRuntimeClient", "RetrieveAndGenerateStreamCommand").f(RetrieveAndGenerateStreamRequestFilterSensitiveLog, RetrieveAndGenerateStreamResponseFilterSensitiveLog).ser(se_RetrieveAndGenerateStreamCommand).de(de_RetrieveAndGenerateStreamCommand).build() {
3876
+ };
3877
+ __name(_RetrieveAndGenerateStreamCommand, "RetrieveAndGenerateStreamCommand");
3878
+ var RetrieveAndGenerateStreamCommand = _RetrieveAndGenerateStreamCommand;
3879
+
3370
3880
  // src/commands/RetrieveCommand.ts
3371
3881
 
3372
3882
 
@@ -3389,8 +3899,10 @@ var commands = {
3389
3899
  InvokeFlowCommand,
3390
3900
  InvokeInlineAgentCommand,
3391
3901
  OptimizePromptCommand,
3902
+ RerankCommand,
3392
3903
  RetrieveCommand,
3393
- RetrieveAndGenerateCommand
3904
+ RetrieveAndGenerateCommand,
3905
+ RetrieveAndGenerateStreamCommand
3394
3906
  };
3395
3907
  var _BedrockAgentRuntime = class _BedrockAgentRuntime extends BedrockAgentRuntimeClient {
3396
3908
  };
@@ -3402,6 +3914,10 @@ var BedrockAgentRuntime = _BedrockAgentRuntime;
3402
3914
 
3403
3915
  var paginateGetAgentMemory = (0, import_core.createPaginator)(BedrockAgentRuntimeClient, GetAgentMemoryCommand, "nextToken", "nextToken", "maxItems");
3404
3916
 
3917
+ // src/pagination/RerankPaginator.ts
3918
+
3919
+ var paginateRerank = (0, import_core.createPaginator)(BedrockAgentRuntimeClient, RerankCommand, "nextToken", "nextToken", "");
3920
+
3405
3921
  // src/pagination/RetrievePaginator.ts
3406
3922
 
3407
3923
  var paginateRetrieve = (0, import_core.createPaginator)(BedrockAgentRuntimeClient, RetrieveCommand, "nextToken", "nextToken", "");
@@ -3419,9 +3935,12 @@ var paginateRetrieve = (0, import_core.createPaginator)(BedrockAgentRuntimeClien
3419
3935
  InvokeFlowCommand,
3420
3936
  InvokeInlineAgentCommand,
3421
3937
  OptimizePromptCommand,
3938
+ RerankCommand,
3422
3939
  RetrieveAndGenerateCommand,
3940
+ RetrieveAndGenerateStreamCommand,
3423
3941
  RetrieveCommand,
3424
3942
  paginateGetAgentMemory,
3943
+ paginateRerank,
3425
3944
  paginateRetrieve,
3426
3945
  AccessDeniedException,
3427
3946
  CustomControlMethod,
@@ -3451,7 +3970,11 @@ var paginateRetrieve = (0, import_core.createPaginator)(BedrockAgentRuntimeClien
3451
3970
  FlowResponseStream,
3452
3971
  FileSourceType,
3453
3972
  FileUseCase,
3973
+ AttributeType,
3454
3974
  SearchType,
3975
+ RerankingMetadataSelectionMode,
3976
+ RerankingMetadataSelectiveModeConfiguration,
3977
+ VectorSearchRerankingConfigurationType,
3455
3978
  ConfirmationState,
3456
3979
  ResponseState,
3457
3980
  InvocationResultMember,
@@ -3484,10 +4007,15 @@ var paginateRetrieve = (0, import_core.createPaginator)(BedrockAgentRuntimeClien
3484
4007
  InputPrompt,
3485
4008
  OptimizedPrompt,
3486
4009
  OptimizedPromptStream,
4010
+ RerankQueryContentType,
4011
+ RerankingConfigurationType,
4012
+ RerankDocumentType,
4013
+ RerankSourceType,
3487
4014
  ExternalSourceType,
3488
4015
  QueryTransformationType,
3489
4016
  RetrieveAndGenerateType,
3490
4017
  GuadrailAction,
4018
+ RetrieveAndGenerateStreamResponseOutput,
3491
4019
  RetrievalFilter,
3492
4020
  ActionGroupInvocationInputFilterSensitiveLog,
3493
4021
  ActionGroupInvocationOutputFilterSensitiveLog,
@@ -3514,6 +4042,12 @@ var paginateRetrieve = (0, import_core.createPaginator)(BedrockAgentRuntimeClien
3514
4042
  ByteContentFileFilterSensitiveLog,
3515
4043
  FileSourceFilterSensitiveLog,
3516
4044
  InputFileFilterSensitiveLog,
4045
+ MetadataAttributeSchemaFilterSensitiveLog,
4046
+ ImplicitFilterConfigurationFilterSensitiveLog,
4047
+ RerankingMetadataSelectiveModeConfigurationFilterSensitiveLog,
4048
+ MetadataConfigurationForRerankingFilterSensitiveLog,
4049
+ VectorSearchBedrockRerankingConfigurationFilterSensitiveLog,
4050
+ VectorSearchRerankingConfigurationFilterSensitiveLog,
3517
4051
  ApiResultFilterSensitiveLog,
3518
4052
  InvocationResultMemberFilterSensitiveLog,
3519
4053
  TextResponsePartFilterSensitiveLog,
@@ -3529,6 +4063,8 @@ var paginateRetrieve = (0, import_core.createPaginator)(BedrockAgentRuntimeClien
3529
4063
  ApiInvocationInputFilterSensitiveLog,
3530
4064
  InvocationInputMemberFilterSensitiveLog,
3531
4065
  ReturnControlPayloadFilterSensitiveLog,
4066
+ CustomOrchestrationTraceEventFilterSensitiveLog,
4067
+ CustomOrchestrationTraceFilterSensitiveLog,
3532
4068
  FailureTraceFilterSensitiveLog,
3533
4069
  GuardrailContentFilterFilterSensitiveLog,
3534
4070
  GuardrailContentPolicyAssessmentFilterSensitiveLog,
@@ -3582,6 +4118,13 @@ var paginateRetrieve = (0, import_core.createPaginator)(BedrockAgentRuntimeClien
3582
4118
  OptimizedPromptEventFilterSensitiveLog,
3583
4119
  OptimizedPromptStreamFilterSensitiveLog,
3584
4120
  OptimizePromptResponseFilterSensitiveLog,
4121
+ RerankTextDocumentFilterSensitiveLog,
4122
+ RerankQueryFilterSensitiveLog,
4123
+ RerankDocumentFilterSensitiveLog,
4124
+ RerankSourceFilterSensitiveLog,
4125
+ RerankRequestFilterSensitiveLog,
4126
+ RerankResultFilterSensitiveLog,
4127
+ RerankResponseFilterSensitiveLog,
3585
4128
  RetrieveAndGenerateInputFilterSensitiveLog,
3586
4129
  PromptTemplateFilterSensitiveLog,
3587
4130
  ExternalSourcesGenerationConfigurationFilterSensitiveLog,
@@ -3592,6 +4135,10 @@ var paginateRetrieve = (0, import_core.createPaginator)(BedrockAgentRuntimeClien
3592
4135
  OrchestrationConfigurationFilterSensitiveLog,
3593
4136
  RetrieveAndGenerateOutputFilterSensitiveLog,
3594
4137
  RetrieveAndGenerateResponseFilterSensitiveLog,
4138
+ CitationEventFilterSensitiveLog,
4139
+ RetrieveAndGenerateOutputEventFilterSensitiveLog,
4140
+ RetrieveAndGenerateStreamResponseOutputFilterSensitiveLog,
4141
+ RetrieveAndGenerateStreamResponseFilterSensitiveLog,
3595
4142
  KnowledgeBaseQueryFilterSensitiveLog,
3596
4143
  KnowledgeBaseRetrievalResultFilterSensitiveLog,
3597
4144
  RetrieveResponseFilterSensitiveLog,
@@ -3605,6 +4152,7 @@ var paginateRetrieve = (0, import_core.createPaginator)(BedrockAgentRuntimeClien
3605
4152
  RetrieveAndGenerateConfigurationFilterSensitiveLog,
3606
4153
  InvokeInlineAgentRequestFilterSensitiveLog,
3607
4154
  RetrieveAndGenerateRequestFilterSensitiveLog,
4155
+ RetrieveAndGenerateStreamRequestFilterSensitiveLog,
3608
4156
  SessionStateFilterSensitiveLog,
3609
4157
  InvokeAgentRequestFilterSensitiveLog
3610
4158
  });