@aws-sdk/client-bedrock-agent 3.808.0 → 3.811.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-cjs/index.js +995 -703
- package/dist-es/commands/CreateFlowCommand.js +1 -1
- package/dist-es/commands/CreateFlowVersionCommand.js +1 -1
- package/dist-es/commands/GetFlowCommand.js +1 -1
- package/dist-es/commands/GetFlowVersionCommand.js +1 -1
- package/dist-es/commands/UpdateFlowCommand.js +1 -1
- package/dist-es/models/models_0.js +119 -115
- package/dist-es/models/models_1.js +136 -5
- package/dist-es/protocols/Aws_restJson1.js +140 -3
- package/dist-types/commands/CreateFlowAliasCommand.d.ts +8 -0
- package/dist-types/commands/CreateFlowCommand.d.ts +575 -41
- package/dist-types/commands/CreateFlowVersionCommand.d.ts +289 -21
- package/dist-types/commands/GetFlowAliasCommand.d.ts +4 -0
- package/dist-types/commands/GetFlowCommand.d.ts +312 -22
- package/dist-types/commands/GetFlowVersionCommand.d.ts +289 -21
- package/dist-types/commands/GetIngestionJobCommand.d.ts +2 -1
- package/dist-types/commands/ListFlowAliasesCommand.d.ts +4 -0
- package/dist-types/commands/ListIngestionJobsCommand.d.ts +1 -1
- package/dist-types/commands/StartIngestionJobCommand.d.ts +1 -1
- package/dist-types/commands/StopIngestionJobCommand.d.ts +1 -2
- package/dist-types/commands/UpdateFlowAliasCommand.d.ts +8 -0
- package/dist-types/commands/UpdateFlowCommand.d.ts +575 -41
- package/dist-types/commands/ValidateFlowDefinitionCommand.d.ts +310 -21
- package/dist-types/models/models_0.d.ts +1133 -1313
- package/dist-types/models/models_1.d.ts +1263 -20
- package/dist-types/ts3.4/commands/CreateFlowCommand.d.ts +1 -1
- package/dist-types/ts3.4/commands/CreateFlowVersionCommand.d.ts +2 -4
- package/dist-types/ts3.4/commands/GetFlowCommand.d.ts +2 -1
- package/dist-types/ts3.4/commands/GetFlowVersionCommand.d.ts +2 -4
- package/dist-types/ts3.4/commands/GetIngestionJobCommand.d.ts +2 -4
- package/dist-types/ts3.4/commands/ListIngestionJobsCommand.d.ts +1 -1
- package/dist-types/ts3.4/commands/StartIngestionJobCommand.d.ts +1 -1
- package/dist-types/ts3.4/commands/StopIngestionJobCommand.d.ts +4 -2
- package/dist-types/ts3.4/commands/UpdateFlowCommand.d.ts +1 -1
- package/dist-types/ts3.4/models/models_0.d.ts +603 -471
- package/dist-types/ts3.4/models/models_1.d.ts +597 -8
- package/package.json +12 -12
|
@@ -3,7 +3,8 @@ import { requestBuilder as rb } from "@smithy/core";
|
|
|
3
3
|
import { _json, collectBody, decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, limitedParseFloat32 as __limitedParseFloat32, map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, serializeFloat as __serializeFloat, take, withBaseException, } from "@smithy/smithy-client";
|
|
4
4
|
import { v4 as generateIdempotencyToken } from "uuid";
|
|
5
5
|
import { BedrockAgentServiceException as __BaseException } from "../models/BedrockAgentServiceException";
|
|
6
|
-
import { AccessDeniedException, ConflictException,
|
|
6
|
+
import { AccessDeniedException, ConflictException, InternalServerException, PromptFlowNodeSourceConfiguration, PromptInferenceConfiguration, PromptTemplateConfiguration, ResourceNotFoundException, ServiceQuotaExceededException, ThrottlingException, Tool, ToolInputSchema, ValidationException, } from "../models/models_0";
|
|
7
|
+
import { FlowNodeConfiguration, } from "../models/models_1";
|
|
7
8
|
export const se_AssociateAgentCollaboratorCommand = async (input, context) => {
|
|
8
9
|
const b = rb(input, context);
|
|
9
10
|
const headers = {
|
|
@@ -157,6 +158,7 @@ export const se_CreateFlowAliasCommand = async (input, context) => {
|
|
|
157
158
|
let body;
|
|
158
159
|
body = JSON.stringify(take(input, {
|
|
159
160
|
clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
|
|
161
|
+
concurrencyConfiguration: (_) => _json(_),
|
|
160
162
|
description: [],
|
|
161
163
|
name: [],
|
|
162
164
|
routingConfiguration: (_) => _json(_),
|
|
@@ -987,6 +989,7 @@ export const se_UpdateFlowAliasCommand = async (input, context) => {
|
|
|
987
989
|
b.p("aliasIdentifier", () => input.aliasIdentifier, "{aliasIdentifier}", false);
|
|
988
990
|
let body;
|
|
989
991
|
body = JSON.stringify(take(input, {
|
|
992
|
+
concurrencyConfiguration: (_) => _json(_),
|
|
990
993
|
description: [],
|
|
991
994
|
name: [],
|
|
992
995
|
routingConfiguration: (_) => _json(_),
|
|
@@ -1161,6 +1164,7 @@ export const de_CreateFlowAliasCommand = async (output, context) => {
|
|
|
1161
1164
|
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1162
1165
|
const doc = take(data, {
|
|
1163
1166
|
arn: __expectString,
|
|
1167
|
+
concurrencyConfiguration: _json,
|
|
1164
1168
|
createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
|
|
1165
1169
|
description: __expectString,
|
|
1166
1170
|
flowId: __expectString,
|
|
@@ -1569,6 +1573,7 @@ export const de_GetFlowAliasCommand = async (output, context) => {
|
|
|
1569
1573
|
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1570
1574
|
const doc = take(data, {
|
|
1571
1575
|
arn: __expectString,
|
|
1576
|
+
concurrencyConfiguration: _json,
|
|
1572
1577
|
createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
|
|
1573
1578
|
description: __expectString,
|
|
1574
1579
|
flowId: __expectString,
|
|
@@ -2104,6 +2109,7 @@ export const de_UpdateFlowAliasCommand = async (output, context) => {
|
|
|
2104
2109
|
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
2105
2110
|
const doc = take(data, {
|
|
2106
2111
|
arn: __expectString,
|
|
2112
|
+
concurrencyConfiguration: _json,
|
|
2107
2113
|
createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
|
|
2108
2114
|
description: __expectString,
|
|
2109
2115
|
flowId: __expectString,
|
|
@@ -2296,6 +2302,18 @@ const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
|
2296
2302
|
});
|
|
2297
2303
|
return __decorateServiceException(exception, parsedOutput.body);
|
|
2298
2304
|
};
|
|
2305
|
+
const se_AdditionalModelRequestFields = (input, context) => {
|
|
2306
|
+
return Object.entries(input).reduce((acc, [key, value]) => {
|
|
2307
|
+
if (value === null) {
|
|
2308
|
+
return acc;
|
|
2309
|
+
}
|
|
2310
|
+
acc[key] = se_AdditionalModelRequestFieldsValue(value, context);
|
|
2311
|
+
return acc;
|
|
2312
|
+
}, {});
|
|
2313
|
+
};
|
|
2314
|
+
const se_AdditionalModelRequestFieldsValue = (input, context) => {
|
|
2315
|
+
return input;
|
|
2316
|
+
};
|
|
2299
2317
|
const se_ByteContentDoc = (input, context) => {
|
|
2300
2318
|
return take(input, {
|
|
2301
2319
|
data: context.base64Encoder,
|
|
@@ -2355,9 +2373,12 @@ const se_FlowNodeConfiguration = (input, context) => {
|
|
|
2355
2373
|
inlineCode: (value) => ({ inlineCode: _json(value) }),
|
|
2356
2374
|
input: (value) => ({ input: _json(value) }),
|
|
2357
2375
|
iterator: (value) => ({ iterator: _json(value) }),
|
|
2358
|
-
knowledgeBase: (value) => ({ knowledgeBase:
|
|
2376
|
+
knowledgeBase: (value) => ({ knowledgeBase: se_KnowledgeBaseFlowNodeConfiguration(value, context) }),
|
|
2359
2377
|
lambdaFunction: (value) => ({ lambdaFunction: _json(value) }),
|
|
2360
2378
|
lex: (value) => ({ lex: _json(value) }),
|
|
2379
|
+
loop: (value) => ({ loop: se_LoopFlowNodeConfiguration(value, context) }),
|
|
2380
|
+
loopController: (value) => ({ loopController: _json(value) }),
|
|
2381
|
+
loopInput: (value) => ({ loopInput: _json(value) }),
|
|
2361
2382
|
output: (value) => ({ output: _json(value) }),
|
|
2362
2383
|
prompt: (value) => ({ prompt: se_PromptFlowNodeConfiguration(value, context) }),
|
|
2363
2384
|
retrieval: (value) => ({ retrieval: _json(value) }),
|
|
@@ -2401,6 +2422,31 @@ const se_KnowledgeBaseDocuments = (input, context) => {
|
|
|
2401
2422
|
return se_KnowledgeBaseDocument(entry, context);
|
|
2402
2423
|
});
|
|
2403
2424
|
};
|
|
2425
|
+
const se_KnowledgeBaseFlowNodeConfiguration = (input, context) => {
|
|
2426
|
+
return take(input, {
|
|
2427
|
+
guardrailConfiguration: _json,
|
|
2428
|
+
inferenceConfiguration: (_) => se_PromptInferenceConfiguration(_, context),
|
|
2429
|
+
knowledgeBaseId: [],
|
|
2430
|
+
modelId: [],
|
|
2431
|
+
numberOfResults: [],
|
|
2432
|
+
orchestrationConfiguration: (_) => se_KnowledgeBaseOrchestrationConfiguration(_, context),
|
|
2433
|
+
promptTemplate: _json,
|
|
2434
|
+
rerankingConfiguration: (_) => se_VectorSearchRerankingConfiguration(_, context),
|
|
2435
|
+
});
|
|
2436
|
+
};
|
|
2437
|
+
const se_KnowledgeBaseOrchestrationConfiguration = (input, context) => {
|
|
2438
|
+
return take(input, {
|
|
2439
|
+
additionalModelRequestFields: (_) => se_AdditionalModelRequestFields(_, context),
|
|
2440
|
+
inferenceConfig: (_) => se_PromptInferenceConfiguration(_, context),
|
|
2441
|
+
performanceConfig: _json,
|
|
2442
|
+
promptTemplate: _json,
|
|
2443
|
+
});
|
|
2444
|
+
};
|
|
2445
|
+
const se_LoopFlowNodeConfiguration = (input, context) => {
|
|
2446
|
+
return take(input, {
|
|
2447
|
+
definition: (_) => se_FlowDefinition(_, context),
|
|
2448
|
+
});
|
|
2449
|
+
};
|
|
2404
2450
|
const se_MetadataAttribute = (input, context) => {
|
|
2405
2451
|
return take(input, {
|
|
2406
2452
|
key: [],
|
|
@@ -2543,6 +2589,25 @@ const se_ToolSpecification = (input, context) => {
|
|
|
2543
2589
|
name: [],
|
|
2544
2590
|
});
|
|
2545
2591
|
};
|
|
2592
|
+
const se_VectorSearchBedrockRerankingConfiguration = (input, context) => {
|
|
2593
|
+
return take(input, {
|
|
2594
|
+
metadataConfiguration: _json,
|
|
2595
|
+
modelConfiguration: (_) => se_VectorSearchBedrockRerankingModelConfiguration(_, context),
|
|
2596
|
+
numberOfRerankedResults: [],
|
|
2597
|
+
});
|
|
2598
|
+
};
|
|
2599
|
+
const se_VectorSearchBedrockRerankingModelConfiguration = (input, context) => {
|
|
2600
|
+
return take(input, {
|
|
2601
|
+
additionalModelRequestFields: (_) => se_AdditionalModelRequestFields(_, context),
|
|
2602
|
+
modelArn: [],
|
|
2603
|
+
});
|
|
2604
|
+
};
|
|
2605
|
+
const se_VectorSearchRerankingConfiguration = (input, context) => {
|
|
2606
|
+
return take(input, {
|
|
2607
|
+
bedrockRerankingConfiguration: (_) => se_VectorSearchBedrockRerankingConfiguration(_, context),
|
|
2608
|
+
type: [],
|
|
2609
|
+
});
|
|
2610
|
+
};
|
|
2546
2611
|
const se_Document = (input, context) => {
|
|
2547
2612
|
return input;
|
|
2548
2613
|
};
|
|
@@ -2563,6 +2628,18 @@ const de_ActionGroupSummary = (output, context) => {
|
|
|
2563
2628
|
updatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
|
|
2564
2629
|
});
|
|
2565
2630
|
};
|
|
2631
|
+
const de_AdditionalModelRequestFields = (output, context) => {
|
|
2632
|
+
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
2633
|
+
if (value === null) {
|
|
2634
|
+
return acc;
|
|
2635
|
+
}
|
|
2636
|
+
acc[key] = de_AdditionalModelRequestFieldsValue(value, context);
|
|
2637
|
+
return acc;
|
|
2638
|
+
}, {});
|
|
2639
|
+
};
|
|
2640
|
+
const de_AdditionalModelRequestFieldsValue = (output, context) => {
|
|
2641
|
+
return output;
|
|
2642
|
+
};
|
|
2566
2643
|
const de_Agent = (output, context) => {
|
|
2567
2644
|
return take(output, {
|
|
2568
2645
|
agentArn: __expectString,
|
|
@@ -2834,6 +2911,7 @@ const de_FlowAliasSummaries = (output, context) => {
|
|
|
2834
2911
|
const de_FlowAliasSummary = (output, context) => {
|
|
2835
2912
|
return take(output, {
|
|
2836
2913
|
arn: __expectString,
|
|
2914
|
+
concurrencyConfiguration: _json,
|
|
2837
2915
|
createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
|
|
2838
2916
|
description: __expectString,
|
|
2839
2917
|
flowId: __expectString,
|
|
@@ -2891,7 +2969,7 @@ const de_FlowNodeConfiguration = (output, context) => {
|
|
|
2891
2969
|
}
|
|
2892
2970
|
if (output.knowledgeBase != null) {
|
|
2893
2971
|
return {
|
|
2894
|
-
knowledgeBase:
|
|
2972
|
+
knowledgeBase: de_KnowledgeBaseFlowNodeConfiguration(output.knowledgeBase, context),
|
|
2895
2973
|
};
|
|
2896
2974
|
}
|
|
2897
2975
|
if (output.lambdaFunction != null) {
|
|
@@ -2904,6 +2982,21 @@ const de_FlowNodeConfiguration = (output, context) => {
|
|
|
2904
2982
|
lex: _json(output.lex),
|
|
2905
2983
|
};
|
|
2906
2984
|
}
|
|
2985
|
+
if (output.loop != null) {
|
|
2986
|
+
return {
|
|
2987
|
+
loop: de_LoopFlowNodeConfiguration(output.loop, context),
|
|
2988
|
+
};
|
|
2989
|
+
}
|
|
2990
|
+
if (output.loopController != null) {
|
|
2991
|
+
return {
|
|
2992
|
+
loopController: _json(output.loopController),
|
|
2993
|
+
};
|
|
2994
|
+
}
|
|
2995
|
+
if (output.loopInput != null) {
|
|
2996
|
+
return {
|
|
2997
|
+
loopInput: _json(output.loopInput),
|
|
2998
|
+
};
|
|
2999
|
+
}
|
|
2907
3000
|
if (output.output != null) {
|
|
2908
3001
|
return {
|
|
2909
3002
|
output: _json(output.output),
|
|
@@ -3046,6 +3139,26 @@ const de_KnowledgeBaseDocumentDetails = (output, context) => {
|
|
|
3046
3139
|
});
|
|
3047
3140
|
return retVal;
|
|
3048
3141
|
};
|
|
3142
|
+
const de_KnowledgeBaseFlowNodeConfiguration = (output, context) => {
|
|
3143
|
+
return take(output, {
|
|
3144
|
+
guardrailConfiguration: _json,
|
|
3145
|
+
inferenceConfiguration: (_) => de_PromptInferenceConfiguration(__expectUnion(_), context),
|
|
3146
|
+
knowledgeBaseId: __expectString,
|
|
3147
|
+
modelId: __expectString,
|
|
3148
|
+
numberOfResults: __expectInt32,
|
|
3149
|
+
orchestrationConfiguration: (_) => de_KnowledgeBaseOrchestrationConfiguration(_, context),
|
|
3150
|
+
promptTemplate: _json,
|
|
3151
|
+
rerankingConfiguration: (_) => de_VectorSearchRerankingConfiguration(_, context),
|
|
3152
|
+
});
|
|
3153
|
+
};
|
|
3154
|
+
const de_KnowledgeBaseOrchestrationConfiguration = (output, context) => {
|
|
3155
|
+
return take(output, {
|
|
3156
|
+
additionalModelRequestFields: (_) => de_AdditionalModelRequestFields(_, context),
|
|
3157
|
+
inferenceConfig: (_) => de_PromptInferenceConfiguration(__expectUnion(_), context),
|
|
3158
|
+
performanceConfig: _json,
|
|
3159
|
+
promptTemplate: _json,
|
|
3160
|
+
});
|
|
3161
|
+
};
|
|
3049
3162
|
const de_KnowledgeBaseSummaries = (output, context) => {
|
|
3050
3163
|
const retVal = (output || [])
|
|
3051
3164
|
.filter((e) => e != null)
|
|
@@ -3063,6 +3176,11 @@ const de_KnowledgeBaseSummary = (output, context) => {
|
|
|
3063
3176
|
updatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
|
|
3064
3177
|
});
|
|
3065
3178
|
};
|
|
3179
|
+
const de_LoopFlowNodeConfiguration = (output, context) => {
|
|
3180
|
+
return take(output, {
|
|
3181
|
+
definition: (_) => de_FlowDefinition(_, context),
|
|
3182
|
+
});
|
|
3183
|
+
};
|
|
3066
3184
|
const de_PromptConfiguration = (output, context) => {
|
|
3067
3185
|
return take(output, {
|
|
3068
3186
|
additionalModelRequestFields: (_) => de_Document(_, context),
|
|
@@ -3227,6 +3345,25 @@ const de_ToolSpecification = (output, context) => {
|
|
|
3227
3345
|
name: __expectString,
|
|
3228
3346
|
});
|
|
3229
3347
|
};
|
|
3348
|
+
const de_VectorSearchBedrockRerankingConfiguration = (output, context) => {
|
|
3349
|
+
return take(output, {
|
|
3350
|
+
metadataConfiguration: _json,
|
|
3351
|
+
modelConfiguration: (_) => de_VectorSearchBedrockRerankingModelConfiguration(_, context),
|
|
3352
|
+
numberOfRerankedResults: __expectInt32,
|
|
3353
|
+
});
|
|
3354
|
+
};
|
|
3355
|
+
const de_VectorSearchBedrockRerankingModelConfiguration = (output, context) => {
|
|
3356
|
+
return take(output, {
|
|
3357
|
+
additionalModelRequestFields: (_) => de_AdditionalModelRequestFields(_, context),
|
|
3358
|
+
modelArn: __expectString,
|
|
3359
|
+
});
|
|
3360
|
+
};
|
|
3361
|
+
const de_VectorSearchRerankingConfiguration = (output, context) => {
|
|
3362
|
+
return take(output, {
|
|
3363
|
+
bedrockRerankingConfiguration: (_) => de_VectorSearchBedrockRerankingConfiguration(_, context),
|
|
3364
|
+
type: __expectString,
|
|
3365
|
+
});
|
|
3366
|
+
};
|
|
3230
3367
|
const de_Document = (output, context) => {
|
|
3231
3368
|
return output;
|
|
3232
3369
|
};
|
|
@@ -42,6 +42,10 @@ declare const CreateFlowAliasCommand_base: {
|
|
|
42
42
|
* flowVersion: "STRING_VALUE",
|
|
43
43
|
* },
|
|
44
44
|
* ],
|
|
45
|
+
* concurrencyConfiguration: { // FlowAliasConcurrencyConfiguration
|
|
46
|
+
* type: "Automatic" || "Manual", // required
|
|
47
|
+
* maxConcurrency: Number("int"),
|
|
48
|
+
* },
|
|
45
49
|
* flowIdentifier: "STRING_VALUE", // required
|
|
46
50
|
* clientToken: "STRING_VALUE",
|
|
47
51
|
* tags: { // TagsMap
|
|
@@ -58,6 +62,10 @@ declare const CreateFlowAliasCommand_base: {
|
|
|
58
62
|
* // flowVersion: "STRING_VALUE",
|
|
59
63
|
* // },
|
|
60
64
|
* // ],
|
|
65
|
+
* // concurrencyConfiguration: { // FlowAliasConcurrencyConfiguration
|
|
66
|
+
* // type: "Automatic" || "Manual", // required
|
|
67
|
+
* // maxConcurrency: Number("int"),
|
|
68
|
+
* // },
|
|
61
69
|
* // flowId: "STRING_VALUE", // required
|
|
62
70
|
* // id: "STRING_VALUE", // required
|
|
63
71
|
* // arn: "STRING_VALUE", // required
|