@aws-sdk/client-bedrock 3.839.0 → 3.844.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-cjs/auth/httpAuthSchemeProvider.js +17 -0
- package/dist-cjs/index.js +152 -20
- package/dist-cjs/runtimeConfig.js +23 -0
- package/dist-cjs/runtimeConfig.shared.js +6 -0
- package/dist-es/BedrockClient.js +1 -0
- package/dist-es/auth/httpAuthExtensionConfiguration.js +8 -0
- package/dist-es/auth/httpAuthSchemeProvider.js +17 -0
- package/dist-es/models/models_0.js +56 -12
- package/dist-es/models/models_1.js +19 -1
- package/dist-es/protocols/Aws_restJson1.js +42 -0
- package/dist-es/runtimeConfig.js +24 -1
- package/dist-es/runtimeConfig.shared.js +6 -0
- package/dist-types/auth/httpAuthExtensionConfiguration.d.ts +4 -1
- package/dist-types/auth/httpAuthSchemeProvider.d.ts +9 -1
- package/dist-types/commands/CreateEvaluationJobCommand.d.ts +76 -6
- package/dist-types/commands/GetEvaluationJobCommand.d.ts +76 -6
- package/dist-types/commands/GetFoundationModelAvailabilityCommand.d.ts +2 -1
- package/dist-types/commands/ListFoundationModelAgreementOffersCommand.d.ts +1 -2
- package/dist-types/models/models_0.d.ts +220 -177
- package/dist-types/models/models_1.d.ts +188 -1
- package/dist-types/runtimeConfig.browser.d.ts +10 -1
- package/dist-types/runtimeConfig.d.ts +13 -1
- package/dist-types/runtimeConfig.native.d.ts +10 -1
- package/dist-types/runtimeConfig.shared.d.ts +12 -1
- package/dist-types/ts3.4/auth/httpAuthExtensionConfiguration.d.ts +5 -0
- package/dist-types/ts3.4/auth/httpAuthSchemeProvider.d.ts +4 -0
- package/dist-types/ts3.4/commands/GetFoundationModelAvailabilityCommand.d.ts +2 -4
- package/dist-types/ts3.4/commands/ListFoundationModelAgreementOffersCommand.d.ts +4 -2
- package/dist-types/ts3.4/models/models_0.d.ts +101 -52
- package/dist-types/ts3.4/models/models_1.d.ts +58 -1
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +27 -1
- package/dist-types/ts3.4/runtimeConfig.d.ts +30 -1
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +27 -1
- package/dist-types/ts3.4/runtimeConfig.shared.d.ts +27 -1
- package/package.json +21 -20
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.resolveHttpAuthSchemeConfig = exports.defaultBedrockHttpAuthSchemeProvider = exports.defaultBedrockHttpAuthSchemeParametersProvider = void 0;
|
|
4
4
|
const core_1 = require("@aws-sdk/core");
|
|
5
|
+
const core_2 = require("@smithy/core");
|
|
5
6
|
const util_middleware_1 = require("@smithy/util-middleware");
|
|
6
7
|
const defaultBedrockHttpAuthSchemeParametersProvider = async (config, context, input) => {
|
|
7
8
|
return {
|
|
@@ -28,20 +29,36 @@ function createAwsAuthSigv4HttpAuthOption(authParameters) {
|
|
|
28
29
|
}),
|
|
29
30
|
};
|
|
30
31
|
}
|
|
32
|
+
function createSmithyApiHttpBearerAuthHttpAuthOption(authParameters) {
|
|
33
|
+
return {
|
|
34
|
+
schemeId: "smithy.api#httpBearerAuth",
|
|
35
|
+
propertiesExtractor: ({ profile, filepath, configFilepath, ignoreCache }, context) => ({
|
|
36
|
+
identityProperties: {
|
|
37
|
+
profile,
|
|
38
|
+
filepath,
|
|
39
|
+
configFilepath,
|
|
40
|
+
ignoreCache,
|
|
41
|
+
},
|
|
42
|
+
}),
|
|
43
|
+
};
|
|
44
|
+
}
|
|
31
45
|
const defaultBedrockHttpAuthSchemeProvider = (authParameters) => {
|
|
32
46
|
const options = [];
|
|
33
47
|
switch (authParameters.operation) {
|
|
34
48
|
default: {
|
|
35
49
|
options.push(createAwsAuthSigv4HttpAuthOption(authParameters));
|
|
50
|
+
options.push(createSmithyApiHttpBearerAuthHttpAuthOption(authParameters));
|
|
36
51
|
}
|
|
37
52
|
}
|
|
38
53
|
return options;
|
|
39
54
|
};
|
|
40
55
|
exports.defaultBedrockHttpAuthSchemeProvider = defaultBedrockHttpAuthSchemeProvider;
|
|
41
56
|
const resolveHttpAuthSchemeConfig = (config) => {
|
|
57
|
+
const token = (0, core_2.memoizeIdentityProvider)(config.token, core_2.isIdentityExpired, core_2.doesIdentityRequireRefresh);
|
|
42
58
|
const config_0 = (0, core_1.resolveAwsSdkSigV4Config)(config);
|
|
43
59
|
return Object.assign(config_0, {
|
|
44
60
|
authSchemePreference: (0, util_middleware_1.normalizeProvider)(config.authSchemePreference ?? []),
|
|
61
|
+
token,
|
|
45
62
|
});
|
|
46
63
|
};
|
|
47
64
|
exports.resolveHttpAuthSchemeConfig = resolveHttpAuthSchemeConfig;
|
package/dist-cjs/index.js
CHANGED
|
@@ -24,6 +24,7 @@ __export(index_exports, {
|
|
|
24
24
|
AccessDeniedException: () => AccessDeniedException,
|
|
25
25
|
AgreementStatus: () => AgreementStatus,
|
|
26
26
|
ApplicationType: () => ApplicationType,
|
|
27
|
+
AttributeType: () => AttributeType,
|
|
27
28
|
AuthorizationStatus: () => AuthorizationStatus,
|
|
28
29
|
AutomatedEvaluationConfigFilterSensitiveLog: () => AutomatedEvaluationConfigFilterSensitiveLog,
|
|
29
30
|
AutomatedEvaluationCustomMetricConfigFilterSensitiveLog: () => AutomatedEvaluationCustomMetricConfigFilterSensitiveLog,
|
|
@@ -161,6 +162,7 @@ __export(index_exports, {
|
|
|
161
162
|
HumanEvaluationConfigFilterSensitiveLog: () => HumanEvaluationConfigFilterSensitiveLog,
|
|
162
163
|
HumanEvaluationCustomMetricFilterSensitiveLog: () => HumanEvaluationCustomMetricFilterSensitiveLog,
|
|
163
164
|
HumanWorkflowConfigFilterSensitiveLog: () => HumanWorkflowConfigFilterSensitiveLog,
|
|
165
|
+
ImplicitFilterConfigurationFilterSensitiveLog: () => ImplicitFilterConfigurationFilterSensitiveLog,
|
|
164
166
|
InferenceProfileModelSource: () => InferenceProfileModelSource,
|
|
165
167
|
InferenceProfileStatus: () => InferenceProfileStatus,
|
|
166
168
|
InferenceProfileSummaryFilterSensitiveLog: () => InferenceProfileSummaryFilterSensitiveLog,
|
|
@@ -194,6 +196,8 @@ __export(index_exports, {
|
|
|
194
196
|
ListPromptRoutersResponseFilterSensitiveLog: () => ListPromptRoutersResponseFilterSensitiveLog,
|
|
195
197
|
ListProvisionedModelThroughputsCommand: () => ListProvisionedModelThroughputsCommand,
|
|
196
198
|
ListTagsForResourceCommand: () => ListTagsForResourceCommand,
|
|
199
|
+
MetadataAttributeSchemaFilterSensitiveLog: () => MetadataAttributeSchemaFilterSensitiveLog,
|
|
200
|
+
MetadataConfigurationForRerankingFilterSensitiveLog: () => MetadataConfigurationForRerankingFilterSensitiveLog,
|
|
197
201
|
ModelCopyJobStatus: () => ModelCopyJobStatus,
|
|
198
202
|
ModelCustomization: () => ModelCustomization,
|
|
199
203
|
ModelCustomizationJobStatus: () => ModelCustomizationJobStatus,
|
|
@@ -223,6 +227,9 @@ __export(index_exports, {
|
|
|
223
227
|
RequestMetadataBaseFiltersFilterSensitiveLog: () => RequestMetadataBaseFiltersFilterSensitiveLog,
|
|
224
228
|
RequestMetadataFilters: () => RequestMetadataFilters,
|
|
225
229
|
RequestMetadataFiltersFilterSensitiveLog: () => RequestMetadataFiltersFilterSensitiveLog,
|
|
230
|
+
RerankingMetadataSelectionMode: () => RerankingMetadataSelectionMode,
|
|
231
|
+
RerankingMetadataSelectiveModeConfiguration: () => RerankingMetadataSelectiveModeConfiguration,
|
|
232
|
+
RerankingMetadataSelectiveModeConfigurationFilterSensitiveLog: () => RerankingMetadataSelectiveModeConfigurationFilterSensitiveLog,
|
|
226
233
|
ResourceNotFoundException: () => ResourceNotFoundException,
|
|
227
234
|
RetrievalFilter: () => RetrievalFilter,
|
|
228
235
|
RetrievalFilterFilterSensitiveLog: () => RetrievalFilterFilterSensitiveLog,
|
|
@@ -252,6 +259,9 @@ __export(index_exports, {
|
|
|
252
259
|
UpdateMarketplaceModelEndpointCommand: () => UpdateMarketplaceModelEndpointCommand,
|
|
253
260
|
UpdateProvisionedModelThroughputCommand: () => UpdateProvisionedModelThroughputCommand,
|
|
254
261
|
ValidationException: () => ValidationException,
|
|
262
|
+
VectorSearchBedrockRerankingConfigurationFilterSensitiveLog: () => VectorSearchBedrockRerankingConfigurationFilterSensitiveLog,
|
|
263
|
+
VectorSearchRerankingConfigurationFilterSensitiveLog: () => VectorSearchRerankingConfigurationFilterSensitiveLog,
|
|
264
|
+
VectorSearchRerankingConfigurationType: () => VectorSearchRerankingConfigurationType,
|
|
255
265
|
__Client: () => import_smithy_client.Client,
|
|
256
266
|
paginateListCustomModels: () => paginateListCustomModels,
|
|
257
267
|
paginateListEvaluationJobs: () => paginateListEvaluationJobs,
|
|
@@ -309,6 +319,7 @@ var getHttpAuthExtensionConfiguration = /* @__PURE__ */ __name((runtimeConfig) =
|
|
|
309
319
|
const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
|
|
310
320
|
let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
|
|
311
321
|
let _credentials = runtimeConfig.credentials;
|
|
322
|
+
let _token = runtimeConfig.token;
|
|
312
323
|
return {
|
|
313
324
|
setHttpAuthScheme(httpAuthScheme) {
|
|
314
325
|
const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
|
|
@@ -332,6 +343,12 @@ var getHttpAuthExtensionConfiguration = /* @__PURE__ */ __name((runtimeConfig) =
|
|
|
332
343
|
},
|
|
333
344
|
credentials() {
|
|
334
345
|
return _credentials;
|
|
346
|
+
},
|
|
347
|
+
setToken(token) {
|
|
348
|
+
_token = token;
|
|
349
|
+
},
|
|
350
|
+
token() {
|
|
351
|
+
return _token;
|
|
335
352
|
}
|
|
336
353
|
};
|
|
337
354
|
}, "getHttpAuthExtensionConfiguration");
|
|
@@ -339,7 +356,8 @@ var resolveHttpAuthRuntimeConfig = /* @__PURE__ */ __name((config) => {
|
|
|
339
356
|
return {
|
|
340
357
|
httpAuthSchemes: config.httpAuthSchemes(),
|
|
341
358
|
httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
|
|
342
|
-
credentials: config.credentials()
|
|
359
|
+
credentials: config.credentials(),
|
|
360
|
+
token: config.token()
|
|
343
361
|
};
|
|
344
362
|
}, "resolveHttpAuthRuntimeConfig");
|
|
345
363
|
|
|
@@ -393,7 +411,8 @@ var BedrockClient = class extends import_smithy_client.Client {
|
|
|
393
411
|
(0, import_core.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config, {
|
|
394
412
|
httpAuthSchemeParametersProvider: import_httpAuthSchemeProvider.defaultBedrockHttpAuthSchemeParametersProvider,
|
|
395
413
|
identityProviderConfigProvider: /* @__PURE__ */ __name(async (config) => new import_core.DefaultIdentityProviderConfig({
|
|
396
|
-
"aws.auth#sigv4": config.credentials
|
|
414
|
+
"aws.auth#sigv4": config.credentials,
|
|
415
|
+
"smithy.api#httpBearerAuth": config.token
|
|
397
416
|
}), "identityProviderConfigProvider")
|
|
398
417
|
})
|
|
399
418
|
);
|
|
@@ -746,10 +765,31 @@ var ExternalSourceType = {
|
|
|
746
765
|
var QueryTransformationType = {
|
|
747
766
|
QUERY_DECOMPOSITION: "QUERY_DECOMPOSITION"
|
|
748
767
|
};
|
|
768
|
+
var AttributeType = {
|
|
769
|
+
BOOLEAN: "BOOLEAN",
|
|
770
|
+
NUMBER: "NUMBER",
|
|
771
|
+
STRING: "STRING",
|
|
772
|
+
STRING_LIST: "STRING_LIST"
|
|
773
|
+
};
|
|
749
774
|
var SearchType = {
|
|
750
775
|
HYBRID: "HYBRID",
|
|
751
776
|
SEMANTIC: "SEMANTIC"
|
|
752
777
|
};
|
|
778
|
+
var RerankingMetadataSelectionMode = {
|
|
779
|
+
ALL: "ALL",
|
|
780
|
+
SELECTIVE: "SELECTIVE"
|
|
781
|
+
};
|
|
782
|
+
var RerankingMetadataSelectiveModeConfiguration;
|
|
783
|
+
((RerankingMetadataSelectiveModeConfiguration3) => {
|
|
784
|
+
RerankingMetadataSelectiveModeConfiguration3.visit = /* @__PURE__ */ __name((value, visitor) => {
|
|
785
|
+
if (value.fieldsToInclude !== void 0) return visitor.fieldsToInclude(value.fieldsToInclude);
|
|
786
|
+
if (value.fieldsToExclude !== void 0) return visitor.fieldsToExclude(value.fieldsToExclude);
|
|
787
|
+
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
788
|
+
}, "visit");
|
|
789
|
+
})(RerankingMetadataSelectiveModeConfiguration || (RerankingMetadataSelectiveModeConfiguration = {}));
|
|
790
|
+
var VectorSearchRerankingConfigurationType = {
|
|
791
|
+
BEDROCK_RERANKING_MODEL: "BEDROCK_RERANKING_MODEL"
|
|
792
|
+
};
|
|
753
793
|
var RetrieveAndGenerateType = {
|
|
754
794
|
EXTERNAL_SOURCES: "EXTERNAL_SOURCES",
|
|
755
795
|
KNOWLEDGE_BASE: "KNOWLEDGE_BASE"
|
|
@@ -963,18 +1003,6 @@ var AuthorizationStatus = {
|
|
|
963
1003
|
AUTHORIZED: "AUTHORIZED",
|
|
964
1004
|
NOT_AUTHORIZED: "NOT_AUTHORIZED"
|
|
965
1005
|
};
|
|
966
|
-
var EntitlementAvailability = {
|
|
967
|
-
AVAILABLE: "AVAILABLE",
|
|
968
|
-
NOT_AVAILABLE: "NOT_AVAILABLE"
|
|
969
|
-
};
|
|
970
|
-
var RegionAvailability = {
|
|
971
|
-
AVAILABLE: "AVAILABLE",
|
|
972
|
-
NOT_AVAILABLE: "NOT_AVAILABLE"
|
|
973
|
-
};
|
|
974
|
-
var OfferType = {
|
|
975
|
-
ALL: "ALL",
|
|
976
|
-
PUBLIC: "PUBLIC"
|
|
977
|
-
};
|
|
978
1006
|
var RequestMetadataBaseFiltersFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
|
|
979
1007
|
...obj,
|
|
980
1008
|
...obj.equals && { equals: import_smithy_client.SENSITIVE_STRING },
|
|
@@ -1126,6 +1154,40 @@ var GenerationConfigurationFilterSensitiveLog = /* @__PURE__ */ __name((obj) =>
|
|
|
1126
1154
|
...obj,
|
|
1127
1155
|
...obj.promptTemplate && { promptTemplate: PromptTemplateFilterSensitiveLog(obj.promptTemplate) }
|
|
1128
1156
|
}), "GenerationConfigurationFilterSensitiveLog");
|
|
1157
|
+
var MetadataAttributeSchemaFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
|
|
1158
|
+
...obj
|
|
1159
|
+
}), "MetadataAttributeSchemaFilterSensitiveLog");
|
|
1160
|
+
var ImplicitFilterConfigurationFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
|
|
1161
|
+
...obj,
|
|
1162
|
+
...obj.metadataAttributes && { metadataAttributes: import_smithy_client.SENSITIVE_STRING }
|
|
1163
|
+
}), "ImplicitFilterConfigurationFilterSensitiveLog");
|
|
1164
|
+
var RerankingMetadataSelectiveModeConfigurationFilterSensitiveLog = /* @__PURE__ */ __name((obj) => {
|
|
1165
|
+
if (obj.fieldsToInclude !== void 0) return { fieldsToInclude: import_smithy_client.SENSITIVE_STRING };
|
|
1166
|
+
if (obj.fieldsToExclude !== void 0) return { fieldsToExclude: import_smithy_client.SENSITIVE_STRING };
|
|
1167
|
+
if (obj.$unknown !== void 0) return { [obj.$unknown[0]]: "UNKNOWN" };
|
|
1168
|
+
}, "RerankingMetadataSelectiveModeConfigurationFilterSensitiveLog");
|
|
1169
|
+
var MetadataConfigurationForRerankingFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
|
|
1170
|
+
...obj,
|
|
1171
|
+
...obj.selectiveModeConfiguration && {
|
|
1172
|
+
selectiveModeConfiguration: RerankingMetadataSelectiveModeConfigurationFilterSensitiveLog(
|
|
1173
|
+
obj.selectiveModeConfiguration
|
|
1174
|
+
)
|
|
1175
|
+
}
|
|
1176
|
+
}), "MetadataConfigurationForRerankingFilterSensitiveLog");
|
|
1177
|
+
var VectorSearchBedrockRerankingConfigurationFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
|
|
1178
|
+
...obj,
|
|
1179
|
+
...obj.metadataConfiguration && {
|
|
1180
|
+
metadataConfiguration: MetadataConfigurationForRerankingFilterSensitiveLog(obj.metadataConfiguration)
|
|
1181
|
+
}
|
|
1182
|
+
}), "VectorSearchBedrockRerankingConfigurationFilterSensitiveLog");
|
|
1183
|
+
var VectorSearchRerankingConfigurationFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
|
|
1184
|
+
...obj,
|
|
1185
|
+
...obj.bedrockRerankingConfiguration && {
|
|
1186
|
+
bedrockRerankingConfiguration: VectorSearchBedrockRerankingConfigurationFilterSensitiveLog(
|
|
1187
|
+
obj.bedrockRerankingConfiguration
|
|
1188
|
+
)
|
|
1189
|
+
}
|
|
1190
|
+
}), "VectorSearchRerankingConfigurationFilterSensitiveLog");
|
|
1129
1191
|
var GetEvaluationJobRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
|
|
1130
1192
|
...obj,
|
|
1131
1193
|
...obj.jobIdentifier && { jobIdentifier: import_smithy_client.SENSITIVE_STRING }
|
|
@@ -1392,6 +1454,18 @@ var import_uuid = require("uuid");
|
|
|
1392
1454
|
|
|
1393
1455
|
// src/models/models_1.ts
|
|
1394
1456
|
|
|
1457
|
+
var EntitlementAvailability = {
|
|
1458
|
+
AVAILABLE: "AVAILABLE",
|
|
1459
|
+
NOT_AVAILABLE: "NOT_AVAILABLE"
|
|
1460
|
+
};
|
|
1461
|
+
var RegionAvailability = {
|
|
1462
|
+
AVAILABLE: "AVAILABLE",
|
|
1463
|
+
NOT_AVAILABLE: "NOT_AVAILABLE"
|
|
1464
|
+
};
|
|
1465
|
+
var OfferType = {
|
|
1466
|
+
ALL: "ALL",
|
|
1467
|
+
PUBLIC: "PUBLIC"
|
|
1468
|
+
};
|
|
1395
1469
|
var ModelCustomizationJobStatus = {
|
|
1396
1470
|
COMPLETED: "Completed",
|
|
1397
1471
|
FAILED: "Failed",
|
|
@@ -1487,7 +1561,13 @@ var RetrievalFilterFilterSensitiveLog = /* @__PURE__ */ __name((obj) => {
|
|
|
1487
1561
|
}, "RetrievalFilterFilterSensitiveLog");
|
|
1488
1562
|
var KnowledgeBaseVectorSearchConfigurationFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
|
|
1489
1563
|
...obj,
|
|
1490
|
-
...obj.filter && { filter: import_smithy_client.SENSITIVE_STRING }
|
|
1564
|
+
...obj.filter && { filter: import_smithy_client.SENSITIVE_STRING },
|
|
1565
|
+
...obj.implicitFilterConfiguration && {
|
|
1566
|
+
implicitFilterConfiguration: ImplicitFilterConfigurationFilterSensitiveLog(obj.implicitFilterConfiguration)
|
|
1567
|
+
},
|
|
1568
|
+
...obj.rerankingConfiguration && {
|
|
1569
|
+
rerankingConfiguration: VectorSearchRerankingConfigurationFilterSensitiveLog(obj.rerankingConfiguration)
|
|
1570
|
+
}
|
|
1491
1571
|
}), "KnowledgeBaseVectorSearchConfigurationFilterSensitiveLog");
|
|
1492
1572
|
var KnowledgeBaseRetrievalConfigurationFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
|
|
1493
1573
|
...obj,
|
|
@@ -3845,8 +3925,10 @@ var se_KnowledgeBaseRetrieveAndGenerateConfiguration = /* @__PURE__ */ __name((i
|
|
|
3845
3925
|
var se_KnowledgeBaseVectorSearchConfiguration = /* @__PURE__ */ __name((input, context) => {
|
|
3846
3926
|
return (0, import_smithy_client.take)(input, {
|
|
3847
3927
|
filter: /* @__PURE__ */ __name((_) => se_RetrievalFilter(_, context), "filter"),
|
|
3928
|
+
implicitFilterConfiguration: import_smithy_client._json,
|
|
3848
3929
|
numberOfResults: [],
|
|
3849
|
-
overrideSearchType: []
|
|
3930
|
+
overrideSearchType: [],
|
|
3931
|
+
rerankingConfiguration: /* @__PURE__ */ __name((_) => se_VectorSearchRerankingConfiguration(_, context), "rerankingConfiguration")
|
|
3850
3932
|
});
|
|
3851
3933
|
}, "se_KnowledgeBaseVectorSearchConfiguration");
|
|
3852
3934
|
var se_RAGConfig = /* @__PURE__ */ __name((input, context) => {
|
|
@@ -3928,6 +4010,25 @@ var se_TextInferenceConfig = /* @__PURE__ */ __name((input, context) => {
|
|
|
3928
4010
|
topP: import_smithy_client.serializeFloat
|
|
3929
4011
|
});
|
|
3930
4012
|
}, "se_TextInferenceConfig");
|
|
4013
|
+
var se_VectorSearchBedrockRerankingConfiguration = /* @__PURE__ */ __name((input, context) => {
|
|
4014
|
+
return (0, import_smithy_client.take)(input, {
|
|
4015
|
+
metadataConfiguration: import_smithy_client._json,
|
|
4016
|
+
modelConfiguration: /* @__PURE__ */ __name((_) => se_VectorSearchBedrockRerankingModelConfiguration(_, context), "modelConfiguration"),
|
|
4017
|
+
numberOfRerankedResults: []
|
|
4018
|
+
});
|
|
4019
|
+
}, "se_VectorSearchBedrockRerankingConfiguration");
|
|
4020
|
+
var se_VectorSearchBedrockRerankingModelConfiguration = /* @__PURE__ */ __name((input, context) => {
|
|
4021
|
+
return (0, import_smithy_client.take)(input, {
|
|
4022
|
+
additionalModelRequestFields: /* @__PURE__ */ __name((_) => se_AdditionalModelRequestFields(_, context), "additionalModelRequestFields"),
|
|
4023
|
+
modelArn: []
|
|
4024
|
+
});
|
|
4025
|
+
}, "se_VectorSearchBedrockRerankingModelConfiguration");
|
|
4026
|
+
var se_VectorSearchRerankingConfiguration = /* @__PURE__ */ __name((input, context) => {
|
|
4027
|
+
return (0, import_smithy_client.take)(input, {
|
|
4028
|
+
bedrockRerankingConfiguration: /* @__PURE__ */ __name((_) => se_VectorSearchBedrockRerankingConfiguration(_, context), "bedrockRerankingConfiguration"),
|
|
4029
|
+
type: []
|
|
4030
|
+
});
|
|
4031
|
+
}, "se_VectorSearchRerankingConfiguration");
|
|
3931
4032
|
var de_AdditionalModelRequestFields = /* @__PURE__ */ __name((output, context) => {
|
|
3932
4033
|
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
3933
4034
|
if (value === null) {
|
|
@@ -4206,8 +4307,10 @@ var de_KnowledgeBaseRetrieveAndGenerateConfiguration = /* @__PURE__ */ __name((o
|
|
|
4206
4307
|
var de_KnowledgeBaseVectorSearchConfiguration = /* @__PURE__ */ __name((output, context) => {
|
|
4207
4308
|
return (0, import_smithy_client.take)(output, {
|
|
4208
4309
|
filter: /* @__PURE__ */ __name((_) => de_RetrievalFilter((0, import_core2.awsExpectUnion)(_), context), "filter"),
|
|
4310
|
+
implicitFilterConfiguration: import_smithy_client._json,
|
|
4209
4311
|
numberOfResults: import_smithy_client.expectInt32,
|
|
4210
|
-
overrideSearchType: import_smithy_client.expectString
|
|
4312
|
+
overrideSearchType: import_smithy_client.expectString,
|
|
4313
|
+
rerankingConfiguration: /* @__PURE__ */ __name((_) => de_VectorSearchRerankingConfiguration(_, context), "rerankingConfiguration")
|
|
4211
4314
|
});
|
|
4212
4315
|
}, "de_KnowledgeBaseVectorSearchConfiguration");
|
|
4213
4316
|
var de_MarketplaceModelEndpoint = /* @__PURE__ */ __name((output, context) => {
|
|
@@ -4543,6 +4646,25 @@ var de_ValidatorMetric = /* @__PURE__ */ __name((output, context) => {
|
|
|
4543
4646
|
validationLoss: import_smithy_client.limitedParseFloat32
|
|
4544
4647
|
});
|
|
4545
4648
|
}, "de_ValidatorMetric");
|
|
4649
|
+
var de_VectorSearchBedrockRerankingConfiguration = /* @__PURE__ */ __name((output, context) => {
|
|
4650
|
+
return (0, import_smithy_client.take)(output, {
|
|
4651
|
+
metadataConfiguration: import_smithy_client._json,
|
|
4652
|
+
modelConfiguration: /* @__PURE__ */ __name((_) => de_VectorSearchBedrockRerankingModelConfiguration(_, context), "modelConfiguration"),
|
|
4653
|
+
numberOfRerankedResults: import_smithy_client.expectInt32
|
|
4654
|
+
});
|
|
4655
|
+
}, "de_VectorSearchBedrockRerankingConfiguration");
|
|
4656
|
+
var de_VectorSearchBedrockRerankingModelConfiguration = /* @__PURE__ */ __name((output, context) => {
|
|
4657
|
+
return (0, import_smithy_client.take)(output, {
|
|
4658
|
+
additionalModelRequestFields: /* @__PURE__ */ __name((_) => de_AdditionalModelRequestFields(_, context), "additionalModelRequestFields"),
|
|
4659
|
+
modelArn: import_smithy_client.expectString
|
|
4660
|
+
});
|
|
4661
|
+
}, "de_VectorSearchBedrockRerankingModelConfiguration");
|
|
4662
|
+
var de_VectorSearchRerankingConfiguration = /* @__PURE__ */ __name((output, context) => {
|
|
4663
|
+
return (0, import_smithy_client.take)(output, {
|
|
4664
|
+
bedrockRerankingConfiguration: /* @__PURE__ */ __name((_) => de_VectorSearchBedrockRerankingConfiguration(_, context), "bedrockRerankingConfiguration"),
|
|
4665
|
+
type: import_smithy_client.expectString
|
|
4666
|
+
});
|
|
4667
|
+
}, "de_VectorSearchRerankingConfiguration");
|
|
4546
4668
|
var deserializeMetadata = /* @__PURE__ */ __name((output) => ({
|
|
4547
4669
|
httpStatusCode: output.statusCode,
|
|
4548
4670
|
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
@@ -5809,7 +5931,11 @@ var paginateListProvisionedModelThroughputs = (0, import_core.createPaginator)(B
|
|
|
5809
5931
|
EvaluationModelConfig,
|
|
5810
5932
|
ExternalSourceType,
|
|
5811
5933
|
QueryTransformationType,
|
|
5934
|
+
AttributeType,
|
|
5812
5935
|
SearchType,
|
|
5936
|
+
RerankingMetadataSelectionMode,
|
|
5937
|
+
RerankingMetadataSelectiveModeConfiguration,
|
|
5938
|
+
VectorSearchRerankingConfigurationType,
|
|
5813
5939
|
RetrieveAndGenerateType,
|
|
5814
5940
|
EvaluationPrecomputedRagSourceConfig,
|
|
5815
5941
|
EvaluationJobType,
|
|
@@ -5848,9 +5974,6 @@ var paginateListProvisionedModelThroughputs = (0, import_core.createPaginator)(B
|
|
|
5848
5974
|
ProvisionedModelStatus,
|
|
5849
5975
|
SortByProvisionedModels,
|
|
5850
5976
|
AuthorizationStatus,
|
|
5851
|
-
EntitlementAvailability,
|
|
5852
|
-
RegionAvailability,
|
|
5853
|
-
OfferType,
|
|
5854
5977
|
RequestMetadataBaseFiltersFilterSensitiveLog,
|
|
5855
5978
|
RequestMetadataFiltersFilterSensitiveLog,
|
|
5856
5979
|
InvocationLogsConfigFilterSensitiveLog,
|
|
@@ -5878,6 +6001,12 @@ var paginateListProvisionedModelThroughputs = (0, import_core.createPaginator)(B
|
|
|
5878
6001
|
ExternalSourceFilterSensitiveLog,
|
|
5879
6002
|
ExternalSourcesRetrieveAndGenerateConfigurationFilterSensitiveLog,
|
|
5880
6003
|
GenerationConfigurationFilterSensitiveLog,
|
|
6004
|
+
MetadataAttributeSchemaFilterSensitiveLog,
|
|
6005
|
+
ImplicitFilterConfigurationFilterSensitiveLog,
|
|
6006
|
+
RerankingMetadataSelectiveModeConfigurationFilterSensitiveLog,
|
|
6007
|
+
MetadataConfigurationForRerankingFilterSensitiveLog,
|
|
6008
|
+
VectorSearchBedrockRerankingConfigurationFilterSensitiveLog,
|
|
6009
|
+
VectorSearchRerankingConfigurationFilterSensitiveLog,
|
|
5881
6010
|
GetEvaluationJobRequestFilterSensitiveLog,
|
|
5882
6011
|
StopEvaluationJobRequestFilterSensitiveLog,
|
|
5883
6012
|
GuardrailContentFilterConfigFilterSensitiveLog,
|
|
@@ -5919,6 +6048,9 @@ var paginateListProvisionedModelThroughputs = (0, import_core.createPaginator)(B
|
|
|
5919
6048
|
GetPromptRouterResponseFilterSensitiveLog,
|
|
5920
6049
|
PromptRouterSummaryFilterSensitiveLog,
|
|
5921
6050
|
ListPromptRoutersResponseFilterSensitiveLog,
|
|
6051
|
+
EntitlementAvailability,
|
|
6052
|
+
RegionAvailability,
|
|
6053
|
+
OfferType,
|
|
5922
6054
|
ModelCustomizationJobStatus,
|
|
5923
6055
|
JobStatusDetails,
|
|
5924
6056
|
FineTuningJobStatus,
|
|
@@ -5,8 +5,10 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const package_json_1 = tslib_1.__importDefault(require("../package.json"));
|
|
6
6
|
const core_1 = require("@aws-sdk/core");
|
|
7
7
|
const credential_provider_node_1 = require("@aws-sdk/credential-provider-node");
|
|
8
|
+
const token_providers_1 = require("@aws-sdk/token-providers");
|
|
8
9
|
const util_user_agent_node_1 = require("@aws-sdk/util-user-agent-node");
|
|
9
10
|
const config_resolver_1 = require("@smithy/config-resolver");
|
|
11
|
+
const core_2 = require("@smithy/core");
|
|
10
12
|
const hash_node_1 = require("@smithy/hash-node");
|
|
11
13
|
const middleware_retry_1 = require("@smithy/middleware-retry");
|
|
12
14
|
const node_config_provider_1 = require("@smithy/node-config-provider");
|
|
@@ -26,6 +28,7 @@ const getRuntimeConfig = (config) => {
|
|
|
26
28
|
const loaderConfig = {
|
|
27
29
|
profile: config?.profile,
|
|
28
30
|
logger: clientSharedValues.logger,
|
|
31
|
+
signingName: "bedrock",
|
|
29
32
|
};
|
|
30
33
|
return {
|
|
31
34
|
...clientSharedValues,
|
|
@@ -37,6 +40,26 @@ const getRuntimeConfig = (config) => {
|
|
|
37
40
|
credentialDefaultProvider: config?.credentialDefaultProvider ?? credential_provider_node_1.defaultProvider,
|
|
38
41
|
defaultUserAgentProvider: config?.defaultUserAgentProvider ??
|
|
39
42
|
(0, util_user_agent_node_1.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
|
|
43
|
+
httpAuthSchemes: config?.httpAuthSchemes ?? [
|
|
44
|
+
{
|
|
45
|
+
schemeId: "aws.auth#sigv4",
|
|
46
|
+
identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
|
|
47
|
+
signer: new core_1.AwsSdkSigV4Signer(),
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
schemeId: "smithy.api#httpBearerAuth",
|
|
51
|
+
identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#httpBearerAuth") ||
|
|
52
|
+
(async (idProps) => {
|
|
53
|
+
try {
|
|
54
|
+
return await (0, token_providers_1.fromEnvSigningName)({ signingName: "bedrock" })();
|
|
55
|
+
}
|
|
56
|
+
catch (error) {
|
|
57
|
+
return await (0, token_providers_1.nodeProvider)(idProps)(idProps);
|
|
58
|
+
}
|
|
59
|
+
}),
|
|
60
|
+
signer: new core_2.HttpBearerAuthSigner(),
|
|
61
|
+
},
|
|
62
|
+
],
|
|
40
63
|
maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
|
|
41
64
|
region: config?.region ??
|
|
42
65
|
(0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, { ...config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getRuntimeConfig = void 0;
|
|
4
4
|
const core_1 = require("@aws-sdk/core");
|
|
5
|
+
const core_2 = require("@smithy/core");
|
|
5
6
|
const smithy_client_1 = require("@smithy/smithy-client");
|
|
6
7
|
const url_parser_1 = require("@smithy/url-parser");
|
|
7
8
|
const util_base64_1 = require("@smithy/util-base64");
|
|
@@ -23,6 +24,11 @@ const getRuntimeConfig = (config) => {
|
|
|
23
24
|
identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
|
|
24
25
|
signer: new core_1.AwsSdkSigV4Signer(),
|
|
25
26
|
},
|
|
27
|
+
{
|
|
28
|
+
schemeId: "smithy.api#httpBearerAuth",
|
|
29
|
+
identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#httpBearerAuth"),
|
|
30
|
+
signer: new core_2.HttpBearerAuthSigner(),
|
|
31
|
+
},
|
|
26
32
|
],
|
|
27
33
|
logger: config?.logger ?? new smithy_client_1.NoOpLogger(),
|
|
28
34
|
serviceId: config?.serviceId ?? "Bedrock",
|
package/dist-es/BedrockClient.js
CHANGED
|
@@ -38,6 +38,7 @@ export class BedrockClient extends __Client {
|
|
|
38
38
|
httpAuthSchemeParametersProvider: defaultBedrockHttpAuthSchemeParametersProvider,
|
|
39
39
|
identityProviderConfigProvider: async (config) => new DefaultIdentityProviderConfig({
|
|
40
40
|
"aws.auth#sigv4": config.credentials,
|
|
41
|
+
"smithy.api#httpBearerAuth": config.token,
|
|
41
42
|
}),
|
|
42
43
|
}));
|
|
43
44
|
this.middlewareStack.use(getHttpSigningPlugin(this.config));
|
|
@@ -2,6 +2,7 @@ export const getHttpAuthExtensionConfiguration = (runtimeConfig) => {
|
|
|
2
2
|
const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
|
|
3
3
|
let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
|
|
4
4
|
let _credentials = runtimeConfig.credentials;
|
|
5
|
+
let _token = runtimeConfig.token;
|
|
5
6
|
return {
|
|
6
7
|
setHttpAuthScheme(httpAuthScheme) {
|
|
7
8
|
const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
|
|
@@ -27,6 +28,12 @@ export const getHttpAuthExtensionConfiguration = (runtimeConfig) => {
|
|
|
27
28
|
credentials() {
|
|
28
29
|
return _credentials;
|
|
29
30
|
},
|
|
31
|
+
setToken(token) {
|
|
32
|
+
_token = token;
|
|
33
|
+
},
|
|
34
|
+
token() {
|
|
35
|
+
return _token;
|
|
36
|
+
},
|
|
30
37
|
};
|
|
31
38
|
};
|
|
32
39
|
export const resolveHttpAuthRuntimeConfig = (config) => {
|
|
@@ -34,5 +41,6 @@ export const resolveHttpAuthRuntimeConfig = (config) => {
|
|
|
34
41
|
httpAuthSchemes: config.httpAuthSchemes(),
|
|
35
42
|
httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
|
|
36
43
|
credentials: config.credentials(),
|
|
44
|
+
token: config.token(),
|
|
37
45
|
};
|
|
38
46
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { resolveAwsSdkSigV4Config, } from "@aws-sdk/core";
|
|
2
|
+
import { doesIdentityRequireRefresh, isIdentityExpired, memoizeIdentityProvider } from "@smithy/core";
|
|
2
3
|
import { getSmithyContext, normalizeProvider } from "@smithy/util-middleware";
|
|
3
4
|
export const defaultBedrockHttpAuthSchemeParametersProvider = async (config, context, input) => {
|
|
4
5
|
return {
|
|
@@ -24,18 +25,34 @@ function createAwsAuthSigv4HttpAuthOption(authParameters) {
|
|
|
24
25
|
}),
|
|
25
26
|
};
|
|
26
27
|
}
|
|
28
|
+
function createSmithyApiHttpBearerAuthHttpAuthOption(authParameters) {
|
|
29
|
+
return {
|
|
30
|
+
schemeId: "smithy.api#httpBearerAuth",
|
|
31
|
+
propertiesExtractor: ({ profile, filepath, configFilepath, ignoreCache }, context) => ({
|
|
32
|
+
identityProperties: {
|
|
33
|
+
profile,
|
|
34
|
+
filepath,
|
|
35
|
+
configFilepath,
|
|
36
|
+
ignoreCache,
|
|
37
|
+
},
|
|
38
|
+
}),
|
|
39
|
+
};
|
|
40
|
+
}
|
|
27
41
|
export const defaultBedrockHttpAuthSchemeProvider = (authParameters) => {
|
|
28
42
|
const options = [];
|
|
29
43
|
switch (authParameters.operation) {
|
|
30
44
|
default: {
|
|
31
45
|
options.push(createAwsAuthSigv4HttpAuthOption(authParameters));
|
|
46
|
+
options.push(createSmithyApiHttpBearerAuthHttpAuthOption(authParameters));
|
|
32
47
|
}
|
|
33
48
|
}
|
|
34
49
|
return options;
|
|
35
50
|
};
|
|
36
51
|
export const resolveHttpAuthSchemeConfig = (config) => {
|
|
52
|
+
const token = memoizeIdentityProvider(config.token, isIdentityExpired, doesIdentityRequireRefresh);
|
|
37
53
|
const config_0 = resolveAwsSdkSigV4Config(config);
|
|
38
54
|
return Object.assign(config_0, {
|
|
39
55
|
authSchemePreference: normalizeProvider(config.authSchemePreference ?? []),
|
|
56
|
+
token,
|
|
40
57
|
});
|
|
41
58
|
};
|
|
@@ -268,10 +268,33 @@ export const ExternalSourceType = {
|
|
|
268
268
|
export const QueryTransformationType = {
|
|
269
269
|
QUERY_DECOMPOSITION: "QUERY_DECOMPOSITION",
|
|
270
270
|
};
|
|
271
|
+
export const AttributeType = {
|
|
272
|
+
BOOLEAN: "BOOLEAN",
|
|
273
|
+
NUMBER: "NUMBER",
|
|
274
|
+
STRING: "STRING",
|
|
275
|
+
STRING_LIST: "STRING_LIST",
|
|
276
|
+
};
|
|
271
277
|
export const SearchType = {
|
|
272
278
|
HYBRID: "HYBRID",
|
|
273
279
|
SEMANTIC: "SEMANTIC",
|
|
274
280
|
};
|
|
281
|
+
export const RerankingMetadataSelectionMode = {
|
|
282
|
+
ALL: "ALL",
|
|
283
|
+
SELECTIVE: "SELECTIVE",
|
|
284
|
+
};
|
|
285
|
+
export var RerankingMetadataSelectiveModeConfiguration;
|
|
286
|
+
(function (RerankingMetadataSelectiveModeConfiguration) {
|
|
287
|
+
RerankingMetadataSelectiveModeConfiguration.visit = (value, visitor) => {
|
|
288
|
+
if (value.fieldsToInclude !== undefined)
|
|
289
|
+
return visitor.fieldsToInclude(value.fieldsToInclude);
|
|
290
|
+
if (value.fieldsToExclude !== undefined)
|
|
291
|
+
return visitor.fieldsToExclude(value.fieldsToExclude);
|
|
292
|
+
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
293
|
+
};
|
|
294
|
+
})(RerankingMetadataSelectiveModeConfiguration || (RerankingMetadataSelectiveModeConfiguration = {}));
|
|
295
|
+
export const VectorSearchRerankingConfigurationType = {
|
|
296
|
+
BEDROCK_RERANKING_MODEL: "BEDROCK_RERANKING_MODEL",
|
|
297
|
+
};
|
|
275
298
|
export const RetrieveAndGenerateType = {
|
|
276
299
|
EXTERNAL_SOURCES: "EXTERNAL_SOURCES",
|
|
277
300
|
KNOWLEDGE_BASE: "KNOWLEDGE_BASE",
|
|
@@ -489,18 +512,6 @@ export const AuthorizationStatus = {
|
|
|
489
512
|
AUTHORIZED: "AUTHORIZED",
|
|
490
513
|
NOT_AUTHORIZED: "NOT_AUTHORIZED",
|
|
491
514
|
};
|
|
492
|
-
export const EntitlementAvailability = {
|
|
493
|
-
AVAILABLE: "AVAILABLE",
|
|
494
|
-
NOT_AVAILABLE: "NOT_AVAILABLE",
|
|
495
|
-
};
|
|
496
|
-
export const RegionAvailability = {
|
|
497
|
-
AVAILABLE: "AVAILABLE",
|
|
498
|
-
NOT_AVAILABLE: "NOT_AVAILABLE",
|
|
499
|
-
};
|
|
500
|
-
export const OfferType = {
|
|
501
|
-
ALL: "ALL",
|
|
502
|
-
PUBLIC: "PUBLIC",
|
|
503
|
-
};
|
|
504
515
|
export const RequestMetadataBaseFiltersFilterSensitiveLog = (obj) => ({
|
|
505
516
|
...obj,
|
|
506
517
|
...(obj.equals && { equals: SENSITIVE_STRING }),
|
|
@@ -661,6 +672,39 @@ export const GenerationConfigurationFilterSensitiveLog = (obj) => ({
|
|
|
661
672
|
...obj,
|
|
662
673
|
...(obj.promptTemplate && { promptTemplate: PromptTemplateFilterSensitiveLog(obj.promptTemplate) }),
|
|
663
674
|
});
|
|
675
|
+
export const MetadataAttributeSchemaFilterSensitiveLog = (obj) => ({
|
|
676
|
+
...obj,
|
|
677
|
+
});
|
|
678
|
+
export const ImplicitFilterConfigurationFilterSensitiveLog = (obj) => ({
|
|
679
|
+
...obj,
|
|
680
|
+
...(obj.metadataAttributes && { metadataAttributes: SENSITIVE_STRING }),
|
|
681
|
+
});
|
|
682
|
+
export const RerankingMetadataSelectiveModeConfigurationFilterSensitiveLog = (obj) => {
|
|
683
|
+
if (obj.fieldsToInclude !== undefined)
|
|
684
|
+
return { fieldsToInclude: SENSITIVE_STRING };
|
|
685
|
+
if (obj.fieldsToExclude !== undefined)
|
|
686
|
+
return { fieldsToExclude: SENSITIVE_STRING };
|
|
687
|
+
if (obj.$unknown !== undefined)
|
|
688
|
+
return { [obj.$unknown[0]]: "UNKNOWN" };
|
|
689
|
+
};
|
|
690
|
+
export const MetadataConfigurationForRerankingFilterSensitiveLog = (obj) => ({
|
|
691
|
+
...obj,
|
|
692
|
+
...(obj.selectiveModeConfiguration && {
|
|
693
|
+
selectiveModeConfiguration: RerankingMetadataSelectiveModeConfigurationFilterSensitiveLog(obj.selectiveModeConfiguration),
|
|
694
|
+
}),
|
|
695
|
+
});
|
|
696
|
+
export const VectorSearchBedrockRerankingConfigurationFilterSensitiveLog = (obj) => ({
|
|
697
|
+
...obj,
|
|
698
|
+
...(obj.metadataConfiguration && {
|
|
699
|
+
metadataConfiguration: MetadataConfigurationForRerankingFilterSensitiveLog(obj.metadataConfiguration),
|
|
700
|
+
}),
|
|
701
|
+
});
|
|
702
|
+
export const VectorSearchRerankingConfigurationFilterSensitiveLog = (obj) => ({
|
|
703
|
+
...obj,
|
|
704
|
+
...(obj.bedrockRerankingConfiguration && {
|
|
705
|
+
bedrockRerankingConfiguration: VectorSearchBedrockRerankingConfigurationFilterSensitiveLog(obj.bedrockRerankingConfiguration),
|
|
706
|
+
}),
|
|
707
|
+
});
|
|
664
708
|
export const GetEvaluationJobRequestFilterSensitiveLog = (obj) => ({
|
|
665
709
|
...obj,
|
|
666
710
|
...(obj.jobIdentifier && { jobIdentifier: SENSITIVE_STRING }),
|
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
import { SENSITIVE_STRING } from "@smithy/smithy-client";
|
|
2
|
-
import { EvaluationConfigFilterSensitiveLog, EvaluationModelConfigFilterSensitiveLog, ExternalSourcesRetrieveAndGenerateConfigurationFilterSensitiveLog, GenerationConfigurationFilterSensitiveLog, TrainingDataConfigFilterSensitiveLog, } from "./models_0";
|
|
2
|
+
import { EvaluationConfigFilterSensitiveLog, EvaluationModelConfigFilterSensitiveLog, ExternalSourcesRetrieveAndGenerateConfigurationFilterSensitiveLog, GenerationConfigurationFilterSensitiveLog, ImplicitFilterConfigurationFilterSensitiveLog, TrainingDataConfigFilterSensitiveLog, VectorSearchRerankingConfigurationFilterSensitiveLog, } from "./models_0";
|
|
3
|
+
export const EntitlementAvailability = {
|
|
4
|
+
AVAILABLE: "AVAILABLE",
|
|
5
|
+
NOT_AVAILABLE: "NOT_AVAILABLE",
|
|
6
|
+
};
|
|
7
|
+
export const RegionAvailability = {
|
|
8
|
+
AVAILABLE: "AVAILABLE",
|
|
9
|
+
NOT_AVAILABLE: "NOT_AVAILABLE",
|
|
10
|
+
};
|
|
11
|
+
export const OfferType = {
|
|
12
|
+
ALL: "ALL",
|
|
13
|
+
PUBLIC: "PUBLIC",
|
|
14
|
+
};
|
|
3
15
|
export const ModelCustomizationJobStatus = {
|
|
4
16
|
COMPLETED: "Completed",
|
|
5
17
|
FAILED: "Failed",
|
|
@@ -127,6 +139,12 @@ export const RetrievalFilterFilterSensitiveLog = (obj) => {
|
|
|
127
139
|
export const KnowledgeBaseVectorSearchConfigurationFilterSensitiveLog = (obj) => ({
|
|
128
140
|
...obj,
|
|
129
141
|
...(obj.filter && { filter: SENSITIVE_STRING }),
|
|
142
|
+
...(obj.implicitFilterConfiguration && {
|
|
143
|
+
implicitFilterConfiguration: ImplicitFilterConfigurationFilterSensitiveLog(obj.implicitFilterConfiguration),
|
|
144
|
+
}),
|
|
145
|
+
...(obj.rerankingConfiguration && {
|
|
146
|
+
rerankingConfiguration: VectorSearchRerankingConfigurationFilterSensitiveLog(obj.rerankingConfiguration),
|
|
147
|
+
}),
|
|
130
148
|
});
|
|
131
149
|
export const KnowledgeBaseRetrievalConfigurationFilterSensitiveLog = (obj) => ({
|
|
132
150
|
...obj,
|