@aws-sdk/client-bedrock-agent-runtime 3.701.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.
- package/README.md +16 -0
- package/dist-cjs/index.js +530 -3
- package/dist-es/BedrockAgentRuntime.js +4 -0
- package/dist-es/commands/RerankCommand.js +23 -0
- package/dist-es/commands/RetrieveAndGenerateStreamCommand.js +27 -0
- package/dist-es/commands/index.js +2 -0
- package/dist-es/models/models_0.js +180 -0
- package/dist-es/pagination/RerankPaginator.js +4 -0
- package/dist-es/pagination/index.js +1 -0
- package/dist-es/protocols/Aws_restJson1.js +231 -0
- package/dist-types/BedrockAgentRuntime.d.ts +14 -0
- package/dist-types/BedrockAgentRuntimeClient.d.ts +4 -2
- package/dist-types/commands/InvokeAgentCommand.d.ts +45 -2
- package/dist-types/commands/InvokeInlineAgentCommand.d.ts +45 -2
- package/dist-types/commands/RerankCommand.d.ts +143 -0
- package/dist-types/commands/RetrieveAndGenerateCommand.d.ts +42 -2
- package/dist-types/commands/RetrieveAndGenerateStreamCommand.d.ts +371 -0
- package/dist-types/commands/RetrieveCommand.d.ts +46 -1
- package/dist-types/commands/index.d.ts +2 -0
- package/dist-types/models/models_0.d.ts +1038 -166
- package/dist-types/pagination/RerankPaginator.d.ts +7 -0
- package/dist-types/pagination/index.d.ts +1 -0
- package/dist-types/protocols/Aws_restJson1.d.ts +18 -0
- package/dist-types/ts3.4/BedrockAgentRuntime.d.ts +34 -0
- package/dist-types/ts3.4/BedrockAgentRuntimeClient.d.ts +12 -0
- package/dist-types/ts3.4/commands/RerankCommand.d.ts +41 -0
- package/dist-types/ts3.4/commands/RetrieveAndGenerateStreamCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/index.d.ts +2 -0
- package/dist-types/ts3.4/models/models_0.d.ts +455 -0
- package/dist-types/ts3.4/pagination/RerankPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/index.d.ts +1 -0
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +24 -0
- 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,6 +41,7 @@ __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,
|
|
@@ -110,6 +112,7 @@ __export(src_exports, {
|
|
|
110
112
|
GuardrailTraceFilterSensitiveLog: () => GuardrailTraceFilterSensitiveLog,
|
|
111
113
|
GuardrailWordPolicyAction: () => GuardrailWordPolicyAction,
|
|
112
114
|
GuardrailWordPolicyAssessmentFilterSensitiveLog: () => GuardrailWordPolicyAssessmentFilterSensitiveLog,
|
|
115
|
+
ImplicitFilterConfigurationFilterSensitiveLog: () => ImplicitFilterConfigurationFilterSensitiveLog,
|
|
113
116
|
InlineAgentFilePartFilterSensitiveLog: () => InlineAgentFilePartFilterSensitiveLog,
|
|
114
117
|
InlineAgentPayloadPartFilterSensitiveLog: () => InlineAgentPayloadPartFilterSensitiveLog,
|
|
115
118
|
InlineAgentResponseStream: () => InlineAgentResponseStream,
|
|
@@ -147,6 +150,8 @@ __export(src_exports, {
|
|
|
147
150
|
KnowledgeBaseVectorSearchConfigurationFilterSensitiveLog: () => KnowledgeBaseVectorSearchConfigurationFilterSensitiveLog,
|
|
148
151
|
Memory: () => Memory,
|
|
149
152
|
MemoryType: () => MemoryType,
|
|
153
|
+
MetadataAttributeSchemaFilterSensitiveLog: () => MetadataAttributeSchemaFilterSensitiveLog,
|
|
154
|
+
MetadataConfigurationForRerankingFilterSensitiveLog: () => MetadataConfigurationForRerankingFilterSensitiveLog,
|
|
150
155
|
MetadataFilterSensitiveLog: () => MetadataFilterSensitiveLog,
|
|
151
156
|
ModelInvocationInputFilterSensitiveLog: () => ModelInvocationInputFilterSensitiveLog,
|
|
152
157
|
NodeType: () => NodeType,
|
|
@@ -184,6 +189,21 @@ __export(src_exports, {
|
|
|
184
189
|
RawResponseFilterSensitiveLog: () => RawResponseFilterSensitiveLog,
|
|
185
190
|
RepromptResponseFilterSensitiveLog: () => RepromptResponseFilterSensitiveLog,
|
|
186
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,
|
|
187
207
|
ResourceNotFoundException: () => ResourceNotFoundException,
|
|
188
208
|
ResponseState: () => ResponseState,
|
|
189
209
|
ResponseStream: () => ResponseStream,
|
|
@@ -196,9 +216,15 @@ __export(src_exports, {
|
|
|
196
216
|
RetrieveAndGenerateCommand: () => RetrieveAndGenerateCommand,
|
|
197
217
|
RetrieveAndGenerateConfigurationFilterSensitiveLog: () => RetrieveAndGenerateConfigurationFilterSensitiveLog,
|
|
198
218
|
RetrieveAndGenerateInputFilterSensitiveLog: () => RetrieveAndGenerateInputFilterSensitiveLog,
|
|
219
|
+
RetrieveAndGenerateOutputEventFilterSensitiveLog: () => RetrieveAndGenerateOutputEventFilterSensitiveLog,
|
|
199
220
|
RetrieveAndGenerateOutputFilterSensitiveLog: () => RetrieveAndGenerateOutputFilterSensitiveLog,
|
|
200
221
|
RetrieveAndGenerateRequestFilterSensitiveLog: () => RetrieveAndGenerateRequestFilterSensitiveLog,
|
|
201
222
|
RetrieveAndGenerateResponseFilterSensitiveLog: () => RetrieveAndGenerateResponseFilterSensitiveLog,
|
|
223
|
+
RetrieveAndGenerateStreamCommand: () => RetrieveAndGenerateStreamCommand,
|
|
224
|
+
RetrieveAndGenerateStreamRequestFilterSensitiveLog: () => RetrieveAndGenerateStreamRequestFilterSensitiveLog,
|
|
225
|
+
RetrieveAndGenerateStreamResponseFilterSensitiveLog: () => RetrieveAndGenerateStreamResponseFilterSensitiveLog,
|
|
226
|
+
RetrieveAndGenerateStreamResponseOutput: () => RetrieveAndGenerateStreamResponseOutput,
|
|
227
|
+
RetrieveAndGenerateStreamResponseOutputFilterSensitiveLog: () => RetrieveAndGenerateStreamResponseOutputFilterSensitiveLog,
|
|
202
228
|
RetrieveAndGenerateType: () => RetrieveAndGenerateType,
|
|
203
229
|
RetrieveCommand: () => RetrieveCommand,
|
|
204
230
|
RetrieveRequestFilterSensitiveLog: () => RetrieveRequestFilterSensitiveLog,
|
|
@@ -218,8 +244,12 @@ __export(src_exports, {
|
|
|
218
244
|
Type: () => Type,
|
|
219
245
|
UsageFilterSensitiveLog: () => UsageFilterSensitiveLog,
|
|
220
246
|
ValidationException: () => ValidationException,
|
|
247
|
+
VectorSearchBedrockRerankingConfigurationFilterSensitiveLog: () => VectorSearchBedrockRerankingConfigurationFilterSensitiveLog,
|
|
248
|
+
VectorSearchRerankingConfigurationFilterSensitiveLog: () => VectorSearchRerankingConfigurationFilterSensitiveLog,
|
|
249
|
+
VectorSearchRerankingConfigurationType: () => VectorSearchRerankingConfigurationType,
|
|
221
250
|
__Client: () => import_smithy_client.Client,
|
|
222
251
|
paginateGetAgentMemory: () => paginateGetAgentMemory,
|
|
252
|
+
paginateRerank: () => paginateRerank,
|
|
223
253
|
paginateRetrieve: () => paginateRetrieve
|
|
224
254
|
});
|
|
225
255
|
module.exports = __toCommonJS(src_exports);
|
|
@@ -696,10 +726,33 @@ var FileUseCase = {
|
|
|
696
726
|
CHAT: "CHAT",
|
|
697
727
|
CODE_INTERPRETER: "CODE_INTERPRETER"
|
|
698
728
|
};
|
|
729
|
+
var AttributeType = {
|
|
730
|
+
BOOLEAN: "BOOLEAN",
|
|
731
|
+
NUMBER: "NUMBER",
|
|
732
|
+
STRING: "STRING",
|
|
733
|
+
STRING_LIST: "STRING_LIST"
|
|
734
|
+
};
|
|
699
735
|
var SearchType = {
|
|
700
736
|
HYBRID: "HYBRID",
|
|
701
737
|
SEMANTIC: "SEMANTIC"
|
|
702
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
|
+
};
|
|
703
756
|
var ConfirmationState = {
|
|
704
757
|
CONFIRM: "CONFIRM",
|
|
705
758
|
DENY: "DENY"
|
|
@@ -720,6 +773,7 @@ var InvocationResultMember;
|
|
|
720
773
|
})(InvocationResultMember || (InvocationResultMember = {}));
|
|
721
774
|
var RetrievalResultLocationType = {
|
|
722
775
|
CONFLUENCE: "CONFLUENCE",
|
|
776
|
+
CUSTOM: "CUSTOM",
|
|
723
777
|
S3: "S3",
|
|
724
778
|
SALESFORCE: "SALESFORCE",
|
|
725
779
|
SHAREPOINT: "SHAREPOINT",
|
|
@@ -1005,6 +1059,19 @@ var OptimizedPromptStream;
|
|
|
1005
1059
|
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
1006
1060
|
}, "visit");
|
|
1007
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
|
+
};
|
|
1008
1075
|
var ExternalSourceType = {
|
|
1009
1076
|
BYTE_CONTENT: "BYTE_CONTENT",
|
|
1010
1077
|
S3: "S3"
|
|
@@ -1020,6 +1087,36 @@ var GuadrailAction = {
|
|
|
1020
1087
|
INTERVENED: "INTERVENED",
|
|
1021
1088
|
NONE: "NONE"
|
|
1022
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 = {}));
|
|
1023
1120
|
var RetrievalFilter;
|
|
1024
1121
|
((RetrievalFilter2) => {
|
|
1025
1122
|
RetrievalFilter2.visit = /* @__PURE__ */ __name((value, visitor) => {
|
|
@@ -1197,6 +1294,43 @@ var InputFileFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
|
|
|
1197
1294
|
...obj,
|
|
1198
1295
|
...obj.source && { source: FileSourceFilterSensitiveLog(obj.source) }
|
|
1199
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");
|
|
1200
1334
|
var ApiResultFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
|
|
1201
1335
|
...obj,
|
|
1202
1336
|
...obj.apiPath && { apiPath: import_smithy_client.SENSITIVE_STRING }
|
|
@@ -1619,6 +1753,34 @@ var OptimizePromptResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => (
|
|
|
1619
1753
|
...obj,
|
|
1620
1754
|
...obj.optimizedPrompt && { optimizedPrompt: "STREAMING_CONTENT" }
|
|
1621
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");
|
|
1622
1784
|
var RetrieveAndGenerateInputFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
|
|
1623
1785
|
...obj
|
|
1624
1786
|
}), "RetrieveAndGenerateInputFilterSensitiveLog");
|
|
@@ -1662,6 +1824,45 @@ var RetrieveAndGenerateResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj)
|
|
|
1662
1824
|
...obj.output && { output: import_smithy_client.SENSITIVE_STRING },
|
|
1663
1825
|
...obj.citations && { citations: obj.citations.map((item) => CitationFilterSensitiveLog(item)) }
|
|
1664
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");
|
|
1665
1866
|
var KnowledgeBaseQueryFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
|
|
1666
1867
|
...obj
|
|
1667
1868
|
}), "KnowledgeBaseQueryFilterSensitiveLog");
|
|
@@ -1707,7 +1908,13 @@ var RetrievalFilterFilterSensitiveLog = /* @__PURE__ */ __name((obj) => {
|
|
|
1707
1908
|
}, "RetrievalFilterFilterSensitiveLog");
|
|
1708
1909
|
var KnowledgeBaseVectorSearchConfigurationFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
|
|
1709
1910
|
...obj,
|
|
1710
|
-
...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
|
+
}
|
|
1711
1918
|
}), "KnowledgeBaseVectorSearchConfigurationFilterSensitiveLog");
|
|
1712
1919
|
var KnowledgeBaseRetrievalConfigurationFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
|
|
1713
1920
|
...obj,
|
|
@@ -1780,6 +1987,15 @@ var RetrieveAndGenerateRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj)
|
|
|
1780
1987
|
)
|
|
1781
1988
|
}
|
|
1782
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");
|
|
1783
1999
|
var SessionStateFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
|
|
1784
2000
|
...obj,
|
|
1785
2001
|
...obj.returnControlInvocationResults && {
|
|
@@ -1914,6 +2130,24 @@ var se_OptimizePromptCommand = /* @__PURE__ */ __name(async (input, context) =>
|
|
|
1914
2130
|
b.m("POST").h(headers).b(body);
|
|
1915
2131
|
return b.build();
|
|
1916
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");
|
|
1917
2151
|
var se_RetrieveCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
1918
2152
|
const b = (0, import_core.requestBuilder)(input, context);
|
|
1919
2153
|
const headers = {
|
|
@@ -1924,6 +2158,7 @@ var se_RetrieveCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
|
1924
2158
|
let body;
|
|
1925
2159
|
body = JSON.stringify(
|
|
1926
2160
|
(0, import_smithy_client.take)(input, {
|
|
2161
|
+
guardrailConfiguration: (_) => (0, import_smithy_client._json)(_),
|
|
1927
2162
|
nextToken: [],
|
|
1928
2163
|
retrievalConfiguration: (_) => se_KnowledgeBaseRetrievalConfiguration(_, context),
|
|
1929
2164
|
retrievalQuery: (_) => (0, import_smithy_client._json)(_)
|
|
@@ -1950,6 +2185,24 @@ var se_RetrieveAndGenerateCommand = /* @__PURE__ */ __name(async (input, context
|
|
|
1950
2185
|
b.m("POST").h(headers).b(body);
|
|
1951
2186
|
return b.build();
|
|
1952
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");
|
|
1953
2206
|
var de_DeleteAgentMemoryCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
1954
2207
|
if (output.statusCode !== 202 && output.statusCode >= 300) {
|
|
1955
2208
|
return de_CommandError(output, context);
|
|
@@ -2024,6 +2277,21 @@ var de_OptimizePromptCommand = /* @__PURE__ */ __name(async (output, context) =>
|
|
|
2024
2277
|
contents.optimizedPrompt = de_OptimizedPromptStream(data, context);
|
|
2025
2278
|
return contents;
|
|
2026
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");
|
|
2027
2295
|
var de_RetrieveCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
2028
2296
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2029
2297
|
return de_CommandError(output, context);
|
|
@@ -2033,6 +2301,7 @@ var de_RetrieveCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
2033
2301
|
});
|
|
2034
2302
|
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
2035
2303
|
const doc = (0, import_smithy_client.take)(data, {
|
|
2304
|
+
guardrailAction: import_smithy_client.expectString,
|
|
2036
2305
|
nextToken: import_smithy_client.expectString,
|
|
2037
2306
|
retrievalResults: (_) => de_KnowledgeBaseRetrievalResults(_, context)
|
|
2038
2307
|
});
|
|
@@ -2056,6 +2325,18 @@ var de_RetrieveAndGenerateCommand = /* @__PURE__ */ __name(async (output, contex
|
|
|
2056
2325
|
Object.assign(contents, doc);
|
|
2057
2326
|
return contents;
|
|
2058
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");
|
|
2059
2340
|
var de_CommandError = /* @__PURE__ */ __name(async (output, context) => {
|
|
2060
2341
|
const parsedOutput = {
|
|
2061
2342
|
...output,
|
|
@@ -2499,6 +2780,80 @@ var de_ResponseStream = /* @__PURE__ */ __name((output, context) => {
|
|
|
2499
2780
|
return { $unknown: output };
|
|
2500
2781
|
});
|
|
2501
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");
|
|
2502
2857
|
var de_AccessDeniedException_event = /* @__PURE__ */ __name(async (output, context) => {
|
|
2503
2858
|
const parsedOutput = {
|
|
2504
2859
|
...output,
|
|
@@ -2519,6 +2874,12 @@ var de_BadGatewayException_event = /* @__PURE__ */ __name(async (output, context
|
|
|
2519
2874
|
};
|
|
2520
2875
|
return de_BadGatewayExceptionRes(parsedOutput, context);
|
|
2521
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");
|
|
2522
2883
|
var de_ConflictException_event = /* @__PURE__ */ __name(async (output, context) => {
|
|
2523
2884
|
const parsedOutput = {
|
|
2524
2885
|
...output,
|
|
@@ -2557,6 +2918,12 @@ var de_FlowTraceEvent_event = /* @__PURE__ */ __name(async (output, context) =>
|
|
|
2557
2918
|
Object.assign(contents, de_FlowTraceEvent(data, context));
|
|
2558
2919
|
return contents;
|
|
2559
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");
|
|
2560
2927
|
var de_InlineAgentFilePart_event = /* @__PURE__ */ __name(async (output, context) => {
|
|
2561
2928
|
const contents = {};
|
|
2562
2929
|
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
@@ -2607,6 +2974,12 @@ var de_ResourceNotFoundException_event = /* @__PURE__ */ __name(async (output, c
|
|
|
2607
2974
|
};
|
|
2608
2975
|
return de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
2609
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");
|
|
2610
2983
|
var de_ReturnControlPayload_event = /* @__PURE__ */ __name(async (output, context) => {
|
|
2611
2984
|
const contents = {};
|
|
2612
2985
|
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
@@ -2652,6 +3025,18 @@ var se_AdditionalModelRequestFields = /* @__PURE__ */ __name((input, context) =>
|
|
|
2652
3025
|
var se_AdditionalModelRequestFieldsValue = /* @__PURE__ */ __name((input, context) => {
|
|
2653
3026
|
return input;
|
|
2654
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");
|
|
2655
3040
|
var se_ByteContentDoc = /* @__PURE__ */ __name((input, context) => {
|
|
2656
3041
|
return (0, import_smithy_client.take)(input, {
|
|
2657
3042
|
contentType: [],
|
|
@@ -2809,8 +3194,10 @@ var se_KnowledgeBases = /* @__PURE__ */ __name((input, context) => {
|
|
|
2809
3194
|
var se_KnowledgeBaseVectorSearchConfiguration = /* @__PURE__ */ __name((input, context) => {
|
|
2810
3195
|
return (0, import_smithy_client.take)(input, {
|
|
2811
3196
|
filter: (_) => se_RetrievalFilter(_, context),
|
|
3197
|
+
implicitFilterConfiguration: import_smithy_client._json,
|
|
2812
3198
|
numberOfResults: [],
|
|
2813
|
-
overrideSearchType: []
|
|
3199
|
+
overrideSearchType: [],
|
|
3200
|
+
rerankingConfiguration: (_) => se_VectorSearchRerankingConfiguration(_, context)
|
|
2814
3201
|
});
|
|
2815
3202
|
}, "se_KnowledgeBaseVectorSearchConfiguration");
|
|
2816
3203
|
var se_OrchestrationConfiguration = /* @__PURE__ */ __name((input, context) => {
|
|
@@ -2842,6 +3229,30 @@ var se_PromptOverrideConfiguration = /* @__PURE__ */ __name((input, context) =>
|
|
|
2842
3229
|
promptConfigurations: (_) => se_PromptConfigurations(_, context)
|
|
2843
3230
|
});
|
|
2844
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");
|
|
2845
3256
|
var se_RetrievalFilter = /* @__PURE__ */ __name((input, context) => {
|
|
2846
3257
|
return RetrievalFilter.visit(input, {
|
|
2847
3258
|
andAll: (value) => ({ andAll: se_RetrievalFilterList(value, context) }),
|
|
@@ -2890,6 +3301,25 @@ var se_TextInferenceConfig = /* @__PURE__ */ __name((input, context) => {
|
|
|
2890
3301
|
topP: import_smithy_client.serializeFloat
|
|
2891
3302
|
});
|
|
2892
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");
|
|
2893
3323
|
var se_Document = /* @__PURE__ */ __name((input, context) => {
|
|
2894
3324
|
return input;
|
|
2895
3325
|
}, "se_Document");
|
|
@@ -2904,6 +3334,11 @@ var de_Citation = /* @__PURE__ */ __name((output, context) => {
|
|
|
2904
3334
|
retrievedReferences: (_) => de_RetrievedReferences(_, context)
|
|
2905
3335
|
});
|
|
2906
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");
|
|
2907
3342
|
var de_Citations = /* @__PURE__ */ __name((output, context) => {
|
|
2908
3343
|
const retVal = (output || []).filter((e) => e != null).map((entry) => {
|
|
2909
3344
|
return de_Citation(entry, context);
|
|
@@ -3177,6 +3612,26 @@ var de_PreProcessingTrace = /* @__PURE__ */ __name((output, context) => {
|
|
|
3177
3612
|
}
|
|
3178
3613
|
return { $unknown: Object.entries(output)[0] };
|
|
3179
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");
|
|
3180
3635
|
var de_RetrievalResultMetadata = /* @__PURE__ */ __name((output, context) => {
|
|
3181
3636
|
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
3182
3637
|
if (value === null) {
|
|
@@ -3262,6 +3717,7 @@ var _sI = "sessionId";
|
|
|
3262
3717
|
var _xabact = "x-amzn-bedrock-agent-content-type";
|
|
3263
3718
|
var _xabami = "x-amz-bedrock-agent-memory-id";
|
|
3264
3719
|
var _xabasi = "x-amz-bedrock-agent-session-id";
|
|
3720
|
+
var _xabkbsi = "x-amzn-bedrock-knowledge-base-session-id";
|
|
3265
3721
|
|
|
3266
3722
|
// src/commands/DeleteAgentMemoryCommand.ts
|
|
3267
3723
|
var _DeleteAgentMemoryCommand = class _DeleteAgentMemoryCommand extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
|
|
@@ -3372,6 +3828,20 @@ var _OptimizePromptCommand = class _OptimizePromptCommand extends import_smithy_
|
|
|
3372
3828
|
__name(_OptimizePromptCommand, "OptimizePromptCommand");
|
|
3373
3829
|
var OptimizePromptCommand = _OptimizePromptCommand;
|
|
3374
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
|
+
|
|
3375
3845
|
// src/commands/RetrieveAndGenerateCommand.ts
|
|
3376
3846
|
|
|
3377
3847
|
|
|
@@ -3386,6 +3856,27 @@ var _RetrieveAndGenerateCommand = class _RetrieveAndGenerateCommand extends impo
|
|
|
3386
3856
|
__name(_RetrieveAndGenerateCommand, "RetrieveAndGenerateCommand");
|
|
3387
3857
|
var RetrieveAndGenerateCommand = _RetrieveAndGenerateCommand;
|
|
3388
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
|
+
|
|
3389
3880
|
// src/commands/RetrieveCommand.ts
|
|
3390
3881
|
|
|
3391
3882
|
|
|
@@ -3408,8 +3899,10 @@ var commands = {
|
|
|
3408
3899
|
InvokeFlowCommand,
|
|
3409
3900
|
InvokeInlineAgentCommand,
|
|
3410
3901
|
OptimizePromptCommand,
|
|
3902
|
+
RerankCommand,
|
|
3411
3903
|
RetrieveCommand,
|
|
3412
|
-
RetrieveAndGenerateCommand
|
|
3904
|
+
RetrieveAndGenerateCommand,
|
|
3905
|
+
RetrieveAndGenerateStreamCommand
|
|
3413
3906
|
};
|
|
3414
3907
|
var _BedrockAgentRuntime = class _BedrockAgentRuntime extends BedrockAgentRuntimeClient {
|
|
3415
3908
|
};
|
|
@@ -3421,6 +3914,10 @@ var BedrockAgentRuntime = _BedrockAgentRuntime;
|
|
|
3421
3914
|
|
|
3422
3915
|
var paginateGetAgentMemory = (0, import_core.createPaginator)(BedrockAgentRuntimeClient, GetAgentMemoryCommand, "nextToken", "nextToken", "maxItems");
|
|
3423
3916
|
|
|
3917
|
+
// src/pagination/RerankPaginator.ts
|
|
3918
|
+
|
|
3919
|
+
var paginateRerank = (0, import_core.createPaginator)(BedrockAgentRuntimeClient, RerankCommand, "nextToken", "nextToken", "");
|
|
3920
|
+
|
|
3424
3921
|
// src/pagination/RetrievePaginator.ts
|
|
3425
3922
|
|
|
3426
3923
|
var paginateRetrieve = (0, import_core.createPaginator)(BedrockAgentRuntimeClient, RetrieveCommand, "nextToken", "nextToken", "");
|
|
@@ -3438,9 +3935,12 @@ var paginateRetrieve = (0, import_core.createPaginator)(BedrockAgentRuntimeClien
|
|
|
3438
3935
|
InvokeFlowCommand,
|
|
3439
3936
|
InvokeInlineAgentCommand,
|
|
3440
3937
|
OptimizePromptCommand,
|
|
3938
|
+
RerankCommand,
|
|
3441
3939
|
RetrieveAndGenerateCommand,
|
|
3940
|
+
RetrieveAndGenerateStreamCommand,
|
|
3442
3941
|
RetrieveCommand,
|
|
3443
3942
|
paginateGetAgentMemory,
|
|
3943
|
+
paginateRerank,
|
|
3444
3944
|
paginateRetrieve,
|
|
3445
3945
|
AccessDeniedException,
|
|
3446
3946
|
CustomControlMethod,
|
|
@@ -3470,7 +3970,11 @@ var paginateRetrieve = (0, import_core.createPaginator)(BedrockAgentRuntimeClien
|
|
|
3470
3970
|
FlowResponseStream,
|
|
3471
3971
|
FileSourceType,
|
|
3472
3972
|
FileUseCase,
|
|
3973
|
+
AttributeType,
|
|
3473
3974
|
SearchType,
|
|
3975
|
+
RerankingMetadataSelectionMode,
|
|
3976
|
+
RerankingMetadataSelectiveModeConfiguration,
|
|
3977
|
+
VectorSearchRerankingConfigurationType,
|
|
3474
3978
|
ConfirmationState,
|
|
3475
3979
|
ResponseState,
|
|
3476
3980
|
InvocationResultMember,
|
|
@@ -3503,10 +4007,15 @@ var paginateRetrieve = (0, import_core.createPaginator)(BedrockAgentRuntimeClien
|
|
|
3503
4007
|
InputPrompt,
|
|
3504
4008
|
OptimizedPrompt,
|
|
3505
4009
|
OptimizedPromptStream,
|
|
4010
|
+
RerankQueryContentType,
|
|
4011
|
+
RerankingConfigurationType,
|
|
4012
|
+
RerankDocumentType,
|
|
4013
|
+
RerankSourceType,
|
|
3506
4014
|
ExternalSourceType,
|
|
3507
4015
|
QueryTransformationType,
|
|
3508
4016
|
RetrieveAndGenerateType,
|
|
3509
4017
|
GuadrailAction,
|
|
4018
|
+
RetrieveAndGenerateStreamResponseOutput,
|
|
3510
4019
|
RetrievalFilter,
|
|
3511
4020
|
ActionGroupInvocationInputFilterSensitiveLog,
|
|
3512
4021
|
ActionGroupInvocationOutputFilterSensitiveLog,
|
|
@@ -3533,6 +4042,12 @@ var paginateRetrieve = (0, import_core.createPaginator)(BedrockAgentRuntimeClien
|
|
|
3533
4042
|
ByteContentFileFilterSensitiveLog,
|
|
3534
4043
|
FileSourceFilterSensitiveLog,
|
|
3535
4044
|
InputFileFilterSensitiveLog,
|
|
4045
|
+
MetadataAttributeSchemaFilterSensitiveLog,
|
|
4046
|
+
ImplicitFilterConfigurationFilterSensitiveLog,
|
|
4047
|
+
RerankingMetadataSelectiveModeConfigurationFilterSensitiveLog,
|
|
4048
|
+
MetadataConfigurationForRerankingFilterSensitiveLog,
|
|
4049
|
+
VectorSearchBedrockRerankingConfigurationFilterSensitiveLog,
|
|
4050
|
+
VectorSearchRerankingConfigurationFilterSensitiveLog,
|
|
3536
4051
|
ApiResultFilterSensitiveLog,
|
|
3537
4052
|
InvocationResultMemberFilterSensitiveLog,
|
|
3538
4053
|
TextResponsePartFilterSensitiveLog,
|
|
@@ -3603,6 +4118,13 @@ var paginateRetrieve = (0, import_core.createPaginator)(BedrockAgentRuntimeClien
|
|
|
3603
4118
|
OptimizedPromptEventFilterSensitiveLog,
|
|
3604
4119
|
OptimizedPromptStreamFilterSensitiveLog,
|
|
3605
4120
|
OptimizePromptResponseFilterSensitiveLog,
|
|
4121
|
+
RerankTextDocumentFilterSensitiveLog,
|
|
4122
|
+
RerankQueryFilterSensitiveLog,
|
|
4123
|
+
RerankDocumentFilterSensitiveLog,
|
|
4124
|
+
RerankSourceFilterSensitiveLog,
|
|
4125
|
+
RerankRequestFilterSensitiveLog,
|
|
4126
|
+
RerankResultFilterSensitiveLog,
|
|
4127
|
+
RerankResponseFilterSensitiveLog,
|
|
3606
4128
|
RetrieveAndGenerateInputFilterSensitiveLog,
|
|
3607
4129
|
PromptTemplateFilterSensitiveLog,
|
|
3608
4130
|
ExternalSourcesGenerationConfigurationFilterSensitiveLog,
|
|
@@ -3613,6 +4135,10 @@ var paginateRetrieve = (0, import_core.createPaginator)(BedrockAgentRuntimeClien
|
|
|
3613
4135
|
OrchestrationConfigurationFilterSensitiveLog,
|
|
3614
4136
|
RetrieveAndGenerateOutputFilterSensitiveLog,
|
|
3615
4137
|
RetrieveAndGenerateResponseFilterSensitiveLog,
|
|
4138
|
+
CitationEventFilterSensitiveLog,
|
|
4139
|
+
RetrieveAndGenerateOutputEventFilterSensitiveLog,
|
|
4140
|
+
RetrieveAndGenerateStreamResponseOutputFilterSensitiveLog,
|
|
4141
|
+
RetrieveAndGenerateStreamResponseFilterSensitiveLog,
|
|
3616
4142
|
KnowledgeBaseQueryFilterSensitiveLog,
|
|
3617
4143
|
KnowledgeBaseRetrievalResultFilterSensitiveLog,
|
|
3618
4144
|
RetrieveResponseFilterSensitiveLog,
|
|
@@ -3626,6 +4152,7 @@ var paginateRetrieve = (0, import_core.createPaginator)(BedrockAgentRuntimeClien
|
|
|
3626
4152
|
RetrieveAndGenerateConfigurationFilterSensitiveLog,
|
|
3627
4153
|
InvokeInlineAgentRequestFilterSensitiveLog,
|
|
3628
4154
|
RetrieveAndGenerateRequestFilterSensitiveLog,
|
|
4155
|
+
RetrieveAndGenerateStreamRequestFilterSensitiveLog,
|
|
3629
4156
|
SessionStateFilterSensitiveLog,
|
|
3630
4157
|
InvokeAgentRequestFilterSensitiveLog
|
|
3631
4158
|
});
|