@aws-sdk/client-bedrock-agent 3.686.0 → 3.691.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 +8 -0
- package/dist-cjs/index.js +516 -49
- package/dist-es/BedrockAgent.js +2 -0
- package/dist-es/commands/CreatePromptCommand.js +1 -1
- package/dist-es/commands/CreatePromptVersionCommand.js +1 -1
- package/dist-es/commands/GetAgentVersionCommand.js +1 -1
- package/dist-es/commands/GetPromptCommand.js +1 -1
- package/dist-es/commands/UpdatePromptCommand.js +1 -1
- package/dist-es/commands/ValidateFlowDefinitionCommand.js +23 -0
- package/dist-es/commands/index.js +1 -0
- package/dist-es/models/index.js +1 -0
- package/dist-es/models/models_0.js +239 -41
- package/dist-es/models/models_1.js +69 -0
- package/dist-es/protocols/Aws_restJson1.js +141 -5
- package/dist-types/BedrockAgent.d.ts +7 -0
- package/dist-types/BedrockAgentClient.d.ts +3 -2
- package/dist-types/commands/CreateFlowCommand.d.ts +102 -2
- package/dist-types/commands/CreateFlowVersionCommand.d.ts +51 -1
- package/dist-types/commands/CreatePromptCommand.d.ts +97 -3
- package/dist-types/commands/CreatePromptVersionCommand.d.ts +49 -2
- package/dist-types/commands/DeleteAgentVersionCommand.d.ts +1 -1
- package/dist-types/commands/DeletePromptCommand.d.ts +1 -1
- package/dist-types/commands/GetAgentVersionCommand.d.ts +1 -1
- package/dist-types/commands/GetFlowCommand.d.ts +137 -1
- package/dist-types/commands/GetFlowVersionCommand.d.ts +51 -1
- package/dist-types/commands/GetPromptCommand.d.ts +49 -2
- package/dist-types/commands/ListAgentKnowledgeBasesCommand.d.ts +1 -1
- package/dist-types/commands/ListAgentVersionsCommand.d.ts +1 -1
- package/dist-types/commands/ListKnowledgeBasesCommand.d.ts +1 -1
- package/dist-types/commands/ListPromptsCommand.d.ts +1 -1
- package/dist-types/commands/ListTagsForResourceCommand.d.ts +1 -1
- package/dist-types/commands/TagResourceCommand.d.ts +1 -1
- package/dist-types/commands/UntagResourceCommand.d.ts +1 -1
- package/dist-types/commands/UpdateAgentKnowledgeBaseCommand.d.ts +1 -1
- package/dist-types/commands/UpdateFlowCommand.d.ts +102 -2
- package/dist-types/commands/UpdateKnowledgeBaseCommand.d.ts +1 -1
- package/dist-types/commands/UpdatePromptCommand.d.ts +97 -3
- package/dist-types/commands/ValidateFlowDefinitionCommand.d.ts +335 -0
- package/dist-types/commands/index.d.ts +1 -0
- package/dist-types/models/index.d.ts +1 -0
- package/dist-types/models/models_0.d.ts +2286 -1582
- package/dist-types/models/models_1.d.ts +974 -0
- package/dist-types/protocols/Aws_restJson1.d.ts +9 -0
- package/dist-types/ts3.4/BedrockAgent.d.ts +17 -0
- package/dist-types/ts3.4/BedrockAgentClient.d.ts +8 -2
- package/dist-types/ts3.4/commands/CreatePromptCommand.d.ts +1 -1
- package/dist-types/ts3.4/commands/CreatePromptVersionCommand.d.ts +1 -1
- package/dist-types/ts3.4/commands/DeleteAgentVersionCommand.d.ts +1 -1
- package/dist-types/ts3.4/commands/DeletePromptCommand.d.ts +1 -1
- package/dist-types/ts3.4/commands/GetAgentVersionCommand.d.ts +1 -1
- package/dist-types/ts3.4/commands/GetPromptCommand.d.ts +1 -1
- package/dist-types/ts3.4/commands/ListAgentKnowledgeBasesCommand.d.ts +1 -1
- package/dist-types/ts3.4/commands/ListAgentVersionsCommand.d.ts +1 -1
- package/dist-types/ts3.4/commands/ListKnowledgeBasesCommand.d.ts +1 -1
- package/dist-types/ts3.4/commands/ListPromptsCommand.d.ts +1 -1
- package/dist-types/ts3.4/commands/ListTagsForResourceCommand.d.ts +1 -1
- package/dist-types/ts3.4/commands/TagResourceCommand.d.ts +1 -1
- package/dist-types/ts3.4/commands/UntagResourceCommand.d.ts +1 -1
- package/dist-types/ts3.4/commands/UpdateAgentKnowledgeBaseCommand.d.ts +1 -1
- package/dist-types/ts3.4/commands/UpdateKnowledgeBaseCommand.d.ts +1 -1
- package/dist-types/ts3.4/commands/UpdatePromptCommand.d.ts +1 -1
- package/dist-types/ts3.4/commands/ValidateFlowDefinitionCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/index.d.ts +1 -0
- package/dist-types/ts3.4/models/index.d.ts +1 -0
- package/dist-types/ts3.4/models/models_0.d.ts +1395 -495
- package/dist-types/ts3.4/models/models_1.d.ts +287 -0
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +12 -0
- package/package.json +7 -7
|
@@ -3,7 +3,7 @@ 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, FlowNodeConfiguration, InternalServerException, PromptFlowNodeSourceConfiguration, PromptInferenceConfiguration, ResourceNotFoundException, ServiceQuotaExceededException, ThrottlingException, ValidationException, } from "../models/models_0";
|
|
6
|
+
import { AccessDeniedException, ConflictException, FlowNodeConfiguration, InternalServerException, PromptFlowNodeSourceConfiguration, PromptInferenceConfiguration, PromptTemplateConfiguration, ResourceNotFoundException, ServiceQuotaExceededException, ThrottlingException, Tool, ToolInputSchema, ValidationException, } from "../models/models_0";
|
|
7
7
|
export const se_AssociateAgentKnowledgeBaseCommand = async (input, context) => {
|
|
8
8
|
const b = rb(input, context);
|
|
9
9
|
const headers = {
|
|
@@ -883,6 +883,19 @@ export const se_UpdatePromptCommand = async (input, context) => {
|
|
|
883
883
|
b.m("PUT").h(headers).b(body);
|
|
884
884
|
return b.build();
|
|
885
885
|
};
|
|
886
|
+
export const se_ValidateFlowDefinitionCommand = async (input, context) => {
|
|
887
|
+
const b = rb(input, context);
|
|
888
|
+
const headers = {
|
|
889
|
+
"content-type": "application/json",
|
|
890
|
+
};
|
|
891
|
+
b.bp("/flows/validate-definition");
|
|
892
|
+
let body;
|
|
893
|
+
body = JSON.stringify(take(input, {
|
|
894
|
+
definition: (_) => se_FlowDefinition(_, context),
|
|
895
|
+
}));
|
|
896
|
+
b.m("POST").h(headers).b(body);
|
|
897
|
+
return b.build();
|
|
898
|
+
};
|
|
886
899
|
export const de_AssociateAgentKnowledgeBaseCommand = async (output, context) => {
|
|
887
900
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
888
901
|
return de_CommandError(output, context);
|
|
@@ -1868,6 +1881,20 @@ export const de_UpdatePromptCommand = async (output, context) => {
|
|
|
1868
1881
|
Object.assign(contents, doc);
|
|
1869
1882
|
return contents;
|
|
1870
1883
|
};
|
|
1884
|
+
export const de_ValidateFlowDefinitionCommand = async (output, context) => {
|
|
1885
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1886
|
+
return de_CommandError(output, context);
|
|
1887
|
+
}
|
|
1888
|
+
const contents = map({
|
|
1889
|
+
$metadata: deserializeMetadata(output),
|
|
1890
|
+
});
|
|
1891
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1892
|
+
const doc = take(data, {
|
|
1893
|
+
validations: _json,
|
|
1894
|
+
});
|
|
1895
|
+
Object.assign(contents, doc);
|
|
1896
|
+
return contents;
|
|
1897
|
+
};
|
|
1871
1898
|
const de_CommandError = async (output, context) => {
|
|
1872
1899
|
const parsedOutput = {
|
|
1873
1900
|
...output,
|
|
@@ -1998,6 +2025,14 @@ const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
|
1998
2025
|
});
|
|
1999
2026
|
return __decorateServiceException(exception, parsedOutput.body);
|
|
2000
2027
|
};
|
|
2028
|
+
const se_ChatPromptTemplateConfiguration = (input, context) => {
|
|
2029
|
+
return take(input, {
|
|
2030
|
+
inputVariables: _json,
|
|
2031
|
+
messages: _json,
|
|
2032
|
+
system: _json,
|
|
2033
|
+
toolConfiguration: (_) => se_ToolConfiguration(_, context),
|
|
2034
|
+
});
|
|
2035
|
+
};
|
|
2001
2036
|
const se_FlowDefinition = (input, context) => {
|
|
2002
2037
|
return take(input, {
|
|
2003
2038
|
connections: _json,
|
|
@@ -2065,6 +2100,7 @@ const se_PromptConfigurations = (input, context) => {
|
|
|
2065
2100
|
};
|
|
2066
2101
|
const se_PromptFlowNodeConfiguration = (input, context) => {
|
|
2067
2102
|
return take(input, {
|
|
2103
|
+
guardrailConfiguration: _json,
|
|
2068
2104
|
sourceConfiguration: (_) => se_PromptFlowNodeSourceConfiguration(_, context),
|
|
2069
2105
|
});
|
|
2070
2106
|
};
|
|
@@ -2073,7 +2109,7 @@ const se_PromptFlowNodeInlineConfiguration = (input, context) => {
|
|
|
2073
2109
|
additionalModelRequestFields: (_) => se_Document(_, context),
|
|
2074
2110
|
inferenceConfiguration: (_) => se_PromptInferenceConfiguration(_, context),
|
|
2075
2111
|
modelId: [],
|
|
2076
|
-
templateConfiguration:
|
|
2112
|
+
templateConfiguration: (_) => se_PromptTemplateConfiguration(_, context),
|
|
2077
2113
|
templateType: [],
|
|
2078
2114
|
});
|
|
2079
2115
|
};
|
|
@@ -2104,14 +2140,22 @@ const se_PromptOverrideConfiguration = (input, context) => {
|
|
|
2104
2140
|
promptConfigurations: (_) => se_PromptConfigurations(_, context),
|
|
2105
2141
|
});
|
|
2106
2142
|
};
|
|
2143
|
+
const se_PromptTemplateConfiguration = (input, context) => {
|
|
2144
|
+
return PromptTemplateConfiguration.visit(input, {
|
|
2145
|
+
chat: (value) => ({ chat: se_ChatPromptTemplateConfiguration(value, context) }),
|
|
2146
|
+
text: (value) => ({ text: _json(value) }),
|
|
2147
|
+
_: (name, value) => ({ name: value }),
|
|
2148
|
+
});
|
|
2149
|
+
};
|
|
2107
2150
|
const se_PromptVariant = (input, context) => {
|
|
2108
2151
|
return take(input, {
|
|
2109
2152
|
additionalModelRequestFields: (_) => se_Document(_, context),
|
|
2153
|
+
genAiResource: _json,
|
|
2110
2154
|
inferenceConfiguration: (_) => se_PromptInferenceConfiguration(_, context),
|
|
2111
2155
|
metadata: _json,
|
|
2112
2156
|
modelId: [],
|
|
2113
2157
|
name: [],
|
|
2114
|
-
templateConfiguration:
|
|
2158
|
+
templateConfiguration: (_) => se_PromptTemplateConfiguration(_, context),
|
|
2115
2159
|
templateType: [],
|
|
2116
2160
|
});
|
|
2117
2161
|
};
|
|
@@ -2122,6 +2166,38 @@ const se_PromptVariantList = (input, context) => {
|
|
|
2122
2166
|
return se_PromptVariant(entry, context);
|
|
2123
2167
|
});
|
|
2124
2168
|
};
|
|
2169
|
+
const se_Tool = (input, context) => {
|
|
2170
|
+
return Tool.visit(input, {
|
|
2171
|
+
toolSpec: (value) => ({ toolSpec: se_ToolSpecification(value, context) }),
|
|
2172
|
+
_: (name, value) => ({ name: value }),
|
|
2173
|
+
});
|
|
2174
|
+
};
|
|
2175
|
+
const se_ToolConfiguration = (input, context) => {
|
|
2176
|
+
return take(input, {
|
|
2177
|
+
toolChoice: _json,
|
|
2178
|
+
tools: (_) => se_Tools(_, context),
|
|
2179
|
+
});
|
|
2180
|
+
};
|
|
2181
|
+
const se_ToolInputSchema = (input, context) => {
|
|
2182
|
+
return ToolInputSchema.visit(input, {
|
|
2183
|
+
json: (value) => ({ json: se_Document(value, context) }),
|
|
2184
|
+
_: (name, value) => ({ name: value }),
|
|
2185
|
+
});
|
|
2186
|
+
};
|
|
2187
|
+
const se_Tools = (input, context) => {
|
|
2188
|
+
return input
|
|
2189
|
+
.filter((e) => e != null)
|
|
2190
|
+
.map((entry) => {
|
|
2191
|
+
return se_Tool(entry, context);
|
|
2192
|
+
});
|
|
2193
|
+
};
|
|
2194
|
+
const se_ToolSpecification = (input, context) => {
|
|
2195
|
+
return take(input, {
|
|
2196
|
+
description: [],
|
|
2197
|
+
inputSchema: (_) => se_ToolInputSchema(_, context),
|
|
2198
|
+
name: [],
|
|
2199
|
+
});
|
|
2200
|
+
};
|
|
2125
2201
|
const se_Document = (input, context) => {
|
|
2126
2202
|
return input;
|
|
2127
2203
|
};
|
|
@@ -2320,6 +2396,14 @@ const de_AgentVersionSummary = (output, context) => {
|
|
|
2320
2396
|
updatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
|
|
2321
2397
|
});
|
|
2322
2398
|
};
|
|
2399
|
+
const de_ChatPromptTemplateConfiguration = (output, context) => {
|
|
2400
|
+
return take(output, {
|
|
2401
|
+
inputVariables: _json,
|
|
2402
|
+
messages: _json,
|
|
2403
|
+
system: _json,
|
|
2404
|
+
toolConfiguration: (_) => de_ToolConfiguration(_, context),
|
|
2405
|
+
});
|
|
2406
|
+
};
|
|
2323
2407
|
const de_DataSource = (output, context) => {
|
|
2324
2408
|
return take(output, {
|
|
2325
2409
|
createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
|
|
@@ -2591,6 +2675,7 @@ const de_PromptConfigurations = (output, context) => {
|
|
|
2591
2675
|
};
|
|
2592
2676
|
const de_PromptFlowNodeConfiguration = (output, context) => {
|
|
2593
2677
|
return take(output, {
|
|
2678
|
+
guardrailConfiguration: _json,
|
|
2594
2679
|
sourceConfiguration: (_) => de_PromptFlowNodeSourceConfiguration(__expectUnion(_), context),
|
|
2595
2680
|
});
|
|
2596
2681
|
};
|
|
@@ -2599,7 +2684,7 @@ const de_PromptFlowNodeInlineConfiguration = (output, context) => {
|
|
|
2599
2684
|
additionalModelRequestFields: (_) => de_Document(_, context),
|
|
2600
2685
|
inferenceConfiguration: (_) => de_PromptInferenceConfiguration(__expectUnion(_), context),
|
|
2601
2686
|
modelId: __expectString,
|
|
2602
|
-
templateConfiguration: (_) =>
|
|
2687
|
+
templateConfiguration: (_) => de_PromptTemplateConfiguration(__expectUnion(_), context),
|
|
2603
2688
|
templateType: __expectString,
|
|
2604
2689
|
});
|
|
2605
2690
|
};
|
|
@@ -2657,14 +2742,28 @@ const de_PromptSummary = (output, context) => {
|
|
|
2657
2742
|
version: __expectString,
|
|
2658
2743
|
});
|
|
2659
2744
|
};
|
|
2745
|
+
const de_PromptTemplateConfiguration = (output, context) => {
|
|
2746
|
+
if (output.chat != null) {
|
|
2747
|
+
return {
|
|
2748
|
+
chat: de_ChatPromptTemplateConfiguration(output.chat, context),
|
|
2749
|
+
};
|
|
2750
|
+
}
|
|
2751
|
+
if (output.text != null) {
|
|
2752
|
+
return {
|
|
2753
|
+
text: _json(output.text),
|
|
2754
|
+
};
|
|
2755
|
+
}
|
|
2756
|
+
return { $unknown: Object.entries(output)[0] };
|
|
2757
|
+
};
|
|
2660
2758
|
const de_PromptVariant = (output, context) => {
|
|
2661
2759
|
return take(output, {
|
|
2662
2760
|
additionalModelRequestFields: (_) => de_Document(_, context),
|
|
2761
|
+
genAiResource: (_) => _json(__expectUnion(_)),
|
|
2663
2762
|
inferenceConfiguration: (_) => de_PromptInferenceConfiguration(__expectUnion(_), context),
|
|
2664
2763
|
metadata: _json,
|
|
2665
2764
|
modelId: __expectString,
|
|
2666
2765
|
name: __expectString,
|
|
2667
|
-
templateConfiguration: (_) =>
|
|
2766
|
+
templateConfiguration: (_) => de_PromptTemplateConfiguration(__expectUnion(_), context),
|
|
2668
2767
|
templateType: __expectString,
|
|
2669
2768
|
});
|
|
2670
2769
|
};
|
|
@@ -2676,6 +2775,43 @@ const de_PromptVariantList = (output, context) => {
|
|
|
2676
2775
|
});
|
|
2677
2776
|
return retVal;
|
|
2678
2777
|
};
|
|
2778
|
+
const de_Tool = (output, context) => {
|
|
2779
|
+
if (output.toolSpec != null) {
|
|
2780
|
+
return {
|
|
2781
|
+
toolSpec: de_ToolSpecification(output.toolSpec, context),
|
|
2782
|
+
};
|
|
2783
|
+
}
|
|
2784
|
+
return { $unknown: Object.entries(output)[0] };
|
|
2785
|
+
};
|
|
2786
|
+
const de_ToolConfiguration = (output, context) => {
|
|
2787
|
+
return take(output, {
|
|
2788
|
+
toolChoice: (_) => _json(__expectUnion(_)),
|
|
2789
|
+
tools: (_) => de_Tools(_, context),
|
|
2790
|
+
});
|
|
2791
|
+
};
|
|
2792
|
+
const de_ToolInputSchema = (output, context) => {
|
|
2793
|
+
if (output.json != null) {
|
|
2794
|
+
return {
|
|
2795
|
+
json: de_Document(output.json, context),
|
|
2796
|
+
};
|
|
2797
|
+
}
|
|
2798
|
+
return { $unknown: Object.entries(output)[0] };
|
|
2799
|
+
};
|
|
2800
|
+
const de_Tools = (output, context) => {
|
|
2801
|
+
const retVal = (output || [])
|
|
2802
|
+
.filter((e) => e != null)
|
|
2803
|
+
.map((entry) => {
|
|
2804
|
+
return de_Tool(__expectUnion(entry), context);
|
|
2805
|
+
});
|
|
2806
|
+
return retVal;
|
|
2807
|
+
};
|
|
2808
|
+
const de_ToolSpecification = (output, context) => {
|
|
2809
|
+
return take(output, {
|
|
2810
|
+
description: __expectString,
|
|
2811
|
+
inputSchema: (_) => de_ToolInputSchema(__expectUnion(_), context),
|
|
2812
|
+
name: __expectString,
|
|
2813
|
+
});
|
|
2814
|
+
};
|
|
2679
2815
|
const de_Document = (output, context) => {
|
|
2680
2816
|
return output;
|
|
2681
2817
|
};
|
|
@@ -62,6 +62,7 @@ import { UpdateFlowAliasCommandInput, UpdateFlowAliasCommandOutput } from "./com
|
|
|
62
62
|
import { UpdateFlowCommandInput, UpdateFlowCommandOutput } from "./commands/UpdateFlowCommand";
|
|
63
63
|
import { UpdateKnowledgeBaseCommandInput, UpdateKnowledgeBaseCommandOutput } from "./commands/UpdateKnowledgeBaseCommand";
|
|
64
64
|
import { UpdatePromptCommandInput, UpdatePromptCommandOutput } from "./commands/UpdatePromptCommand";
|
|
65
|
+
import { ValidateFlowDefinitionCommandInput, ValidateFlowDefinitionCommandOutput } from "./commands/ValidateFlowDefinitionCommand";
|
|
65
66
|
export interface BedrockAgent {
|
|
66
67
|
/**
|
|
67
68
|
* @see {@link AssociateAgentKnowledgeBaseCommand}
|
|
@@ -439,6 +440,12 @@ export interface BedrockAgent {
|
|
|
439
440
|
updatePrompt(args: UpdatePromptCommandInput, options?: __HttpHandlerOptions): Promise<UpdatePromptCommandOutput>;
|
|
440
441
|
updatePrompt(args: UpdatePromptCommandInput, cb: (err: any, data?: UpdatePromptCommandOutput) => void): void;
|
|
441
442
|
updatePrompt(args: UpdatePromptCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: UpdatePromptCommandOutput) => void): void;
|
|
443
|
+
/**
|
|
444
|
+
* @see {@link ValidateFlowDefinitionCommand}
|
|
445
|
+
*/
|
|
446
|
+
validateFlowDefinition(args: ValidateFlowDefinitionCommandInput, options?: __HttpHandlerOptions): Promise<ValidateFlowDefinitionCommandOutput>;
|
|
447
|
+
validateFlowDefinition(args: ValidateFlowDefinitionCommandInput, cb: (err: any, data?: ValidateFlowDefinitionCommandOutput) => void): void;
|
|
448
|
+
validateFlowDefinition(args: ValidateFlowDefinitionCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ValidateFlowDefinitionCommandOutput) => void): void;
|
|
442
449
|
}
|
|
443
450
|
/**
|
|
444
451
|
* <p>Describes the API operations for creating and managing Amazon Bedrock agents.</p>
|
|
@@ -69,17 +69,18 @@ import { UpdateFlowAliasCommandInput, UpdateFlowAliasCommandOutput } from "./com
|
|
|
69
69
|
import { UpdateFlowCommandInput, UpdateFlowCommandOutput } from "./commands/UpdateFlowCommand";
|
|
70
70
|
import { UpdateKnowledgeBaseCommandInput, UpdateKnowledgeBaseCommandOutput } from "./commands/UpdateKnowledgeBaseCommand";
|
|
71
71
|
import { UpdatePromptCommandInput, UpdatePromptCommandOutput } from "./commands/UpdatePromptCommand";
|
|
72
|
+
import { ValidateFlowDefinitionCommandInput, ValidateFlowDefinitionCommandOutput } from "./commands/ValidateFlowDefinitionCommand";
|
|
72
73
|
import { ClientInputEndpointParameters, ClientResolvedEndpointParameters, EndpointParameters } from "./endpoint/EndpointParameters";
|
|
73
74
|
import { RuntimeExtension, RuntimeExtensionsConfig } from "./runtimeExtensions";
|
|
74
75
|
export { __Client };
|
|
75
76
|
/**
|
|
76
77
|
* @public
|
|
77
78
|
*/
|
|
78
|
-
export type ServiceInputTypes = AssociateAgentKnowledgeBaseCommandInput | CreateAgentActionGroupCommandInput | CreateAgentAliasCommandInput | CreateAgentCommandInput | CreateDataSourceCommandInput | CreateFlowAliasCommandInput | CreateFlowCommandInput | CreateFlowVersionCommandInput | CreateKnowledgeBaseCommandInput | CreatePromptCommandInput | CreatePromptVersionCommandInput | DeleteAgentActionGroupCommandInput | DeleteAgentAliasCommandInput | DeleteAgentCommandInput | DeleteAgentVersionCommandInput | DeleteDataSourceCommandInput | DeleteFlowAliasCommandInput | DeleteFlowCommandInput | DeleteFlowVersionCommandInput | DeleteKnowledgeBaseCommandInput | DeletePromptCommandInput | DisassociateAgentKnowledgeBaseCommandInput | GetAgentActionGroupCommandInput | GetAgentAliasCommandInput | GetAgentCommandInput | GetAgentKnowledgeBaseCommandInput | GetAgentVersionCommandInput | GetDataSourceCommandInput | GetFlowAliasCommandInput | GetFlowCommandInput | GetFlowVersionCommandInput | GetIngestionJobCommandInput | GetKnowledgeBaseCommandInput | GetPromptCommandInput | ListAgentActionGroupsCommandInput | ListAgentAliasesCommandInput | ListAgentKnowledgeBasesCommandInput | ListAgentVersionsCommandInput | ListAgentsCommandInput | ListDataSourcesCommandInput | ListFlowAliasesCommandInput | ListFlowVersionsCommandInput | ListFlowsCommandInput | ListIngestionJobsCommandInput | ListKnowledgeBasesCommandInput | ListPromptsCommandInput | ListTagsForResourceCommandInput | PrepareAgentCommandInput | PrepareFlowCommandInput | StartIngestionJobCommandInput | StopIngestionJobCommandInput | TagResourceCommandInput | UntagResourceCommandInput | UpdateAgentActionGroupCommandInput | UpdateAgentAliasCommandInput | UpdateAgentCommandInput | UpdateAgentKnowledgeBaseCommandInput | UpdateDataSourceCommandInput | UpdateFlowAliasCommandInput | UpdateFlowCommandInput | UpdateKnowledgeBaseCommandInput | UpdatePromptCommandInput;
|
|
79
|
+
export type ServiceInputTypes = AssociateAgentKnowledgeBaseCommandInput | CreateAgentActionGroupCommandInput | CreateAgentAliasCommandInput | CreateAgentCommandInput | CreateDataSourceCommandInput | CreateFlowAliasCommandInput | CreateFlowCommandInput | CreateFlowVersionCommandInput | CreateKnowledgeBaseCommandInput | CreatePromptCommandInput | CreatePromptVersionCommandInput | DeleteAgentActionGroupCommandInput | DeleteAgentAliasCommandInput | DeleteAgentCommandInput | DeleteAgentVersionCommandInput | DeleteDataSourceCommandInput | DeleteFlowAliasCommandInput | DeleteFlowCommandInput | DeleteFlowVersionCommandInput | DeleteKnowledgeBaseCommandInput | DeletePromptCommandInput | DisassociateAgentKnowledgeBaseCommandInput | GetAgentActionGroupCommandInput | GetAgentAliasCommandInput | GetAgentCommandInput | GetAgentKnowledgeBaseCommandInput | GetAgentVersionCommandInput | GetDataSourceCommandInput | GetFlowAliasCommandInput | GetFlowCommandInput | GetFlowVersionCommandInput | GetIngestionJobCommandInput | GetKnowledgeBaseCommandInput | GetPromptCommandInput | ListAgentActionGroupsCommandInput | ListAgentAliasesCommandInput | ListAgentKnowledgeBasesCommandInput | ListAgentVersionsCommandInput | ListAgentsCommandInput | ListDataSourcesCommandInput | ListFlowAliasesCommandInput | ListFlowVersionsCommandInput | ListFlowsCommandInput | ListIngestionJobsCommandInput | ListKnowledgeBasesCommandInput | ListPromptsCommandInput | ListTagsForResourceCommandInput | PrepareAgentCommandInput | PrepareFlowCommandInput | StartIngestionJobCommandInput | StopIngestionJobCommandInput | TagResourceCommandInput | UntagResourceCommandInput | UpdateAgentActionGroupCommandInput | UpdateAgentAliasCommandInput | UpdateAgentCommandInput | UpdateAgentKnowledgeBaseCommandInput | UpdateDataSourceCommandInput | UpdateFlowAliasCommandInput | UpdateFlowCommandInput | UpdateKnowledgeBaseCommandInput | UpdatePromptCommandInput | ValidateFlowDefinitionCommandInput;
|
|
79
80
|
/**
|
|
80
81
|
* @public
|
|
81
82
|
*/
|
|
82
|
-
export type ServiceOutputTypes = AssociateAgentKnowledgeBaseCommandOutput | CreateAgentActionGroupCommandOutput | CreateAgentAliasCommandOutput | CreateAgentCommandOutput | CreateDataSourceCommandOutput | CreateFlowAliasCommandOutput | CreateFlowCommandOutput | CreateFlowVersionCommandOutput | CreateKnowledgeBaseCommandOutput | CreatePromptCommandOutput | CreatePromptVersionCommandOutput | DeleteAgentActionGroupCommandOutput | DeleteAgentAliasCommandOutput | DeleteAgentCommandOutput | DeleteAgentVersionCommandOutput | DeleteDataSourceCommandOutput | DeleteFlowAliasCommandOutput | DeleteFlowCommandOutput | DeleteFlowVersionCommandOutput | DeleteKnowledgeBaseCommandOutput | DeletePromptCommandOutput | DisassociateAgentKnowledgeBaseCommandOutput | GetAgentActionGroupCommandOutput | GetAgentAliasCommandOutput | GetAgentCommandOutput | GetAgentKnowledgeBaseCommandOutput | GetAgentVersionCommandOutput | GetDataSourceCommandOutput | GetFlowAliasCommandOutput | GetFlowCommandOutput | GetFlowVersionCommandOutput | GetIngestionJobCommandOutput | GetKnowledgeBaseCommandOutput | GetPromptCommandOutput | ListAgentActionGroupsCommandOutput | ListAgentAliasesCommandOutput | ListAgentKnowledgeBasesCommandOutput | ListAgentVersionsCommandOutput | ListAgentsCommandOutput | ListDataSourcesCommandOutput | ListFlowAliasesCommandOutput | ListFlowVersionsCommandOutput | ListFlowsCommandOutput | ListIngestionJobsCommandOutput | ListKnowledgeBasesCommandOutput | ListPromptsCommandOutput | ListTagsForResourceCommandOutput | PrepareAgentCommandOutput | PrepareFlowCommandOutput | StartIngestionJobCommandOutput | StopIngestionJobCommandOutput | TagResourceCommandOutput | UntagResourceCommandOutput | UpdateAgentActionGroupCommandOutput | UpdateAgentAliasCommandOutput | UpdateAgentCommandOutput | UpdateAgentKnowledgeBaseCommandOutput | UpdateDataSourceCommandOutput | UpdateFlowAliasCommandOutput | UpdateFlowCommandOutput | UpdateKnowledgeBaseCommandOutput | UpdatePromptCommandOutput;
|
|
83
|
+
export type ServiceOutputTypes = AssociateAgentKnowledgeBaseCommandOutput | CreateAgentActionGroupCommandOutput | CreateAgentAliasCommandOutput | CreateAgentCommandOutput | CreateDataSourceCommandOutput | CreateFlowAliasCommandOutput | CreateFlowCommandOutput | CreateFlowVersionCommandOutput | CreateKnowledgeBaseCommandOutput | CreatePromptCommandOutput | CreatePromptVersionCommandOutput | DeleteAgentActionGroupCommandOutput | DeleteAgentAliasCommandOutput | DeleteAgentCommandOutput | DeleteAgentVersionCommandOutput | DeleteDataSourceCommandOutput | DeleteFlowAliasCommandOutput | DeleteFlowCommandOutput | DeleteFlowVersionCommandOutput | DeleteKnowledgeBaseCommandOutput | DeletePromptCommandOutput | DisassociateAgentKnowledgeBaseCommandOutput | GetAgentActionGroupCommandOutput | GetAgentAliasCommandOutput | GetAgentCommandOutput | GetAgentKnowledgeBaseCommandOutput | GetAgentVersionCommandOutput | GetDataSourceCommandOutput | GetFlowAliasCommandOutput | GetFlowCommandOutput | GetFlowVersionCommandOutput | GetIngestionJobCommandOutput | GetKnowledgeBaseCommandOutput | GetPromptCommandOutput | ListAgentActionGroupsCommandOutput | ListAgentAliasesCommandOutput | ListAgentKnowledgeBasesCommandOutput | ListAgentVersionsCommandOutput | ListAgentsCommandOutput | ListDataSourcesCommandOutput | ListFlowAliasesCommandOutput | ListFlowVersionsCommandOutput | ListFlowsCommandOutput | ListIngestionJobsCommandOutput | ListKnowledgeBasesCommandOutput | ListPromptsCommandOutput | ListTagsForResourceCommandOutput | PrepareAgentCommandOutput | PrepareFlowCommandOutput | StartIngestionJobCommandOutput | StopIngestionJobCommandOutput | TagResourceCommandOutput | UntagResourceCommandOutput | UpdateAgentActionGroupCommandOutput | UpdateAgentAliasCommandOutput | UpdateAgentCommandOutput | UpdateAgentKnowledgeBaseCommandOutput | UpdateDataSourceCommandOutput | UpdateFlowAliasCommandOutput | UpdateFlowCommandOutput | UpdateKnowledgeBaseCommandOutput | UpdatePromptCommandOutput | ValidateFlowDefinitionCommandOutput;
|
|
83
84
|
/**
|
|
84
85
|
* @public
|
|
85
86
|
*/
|
|
@@ -50,6 +50,10 @@ declare const CreateFlowCommand_base: {
|
|
|
50
50
|
* knowledgeBase: { // KnowledgeBaseFlowNodeConfiguration
|
|
51
51
|
* knowledgeBaseId: "STRING_VALUE", // required
|
|
52
52
|
* modelId: "STRING_VALUE",
|
|
53
|
+
* guardrailConfiguration: { // GuardrailConfiguration
|
|
54
|
+
* guardrailIdentifier: "STRING_VALUE",
|
|
55
|
+
* guardrailVersion: "STRING_VALUE",
|
|
56
|
+
* },
|
|
53
57
|
* },
|
|
54
58
|
* condition: { // ConditionFlowNodeConfiguration
|
|
55
59
|
* conditions: [ // FlowConditions // required
|
|
@@ -69,7 +73,7 @@ declare const CreateFlowCommand_base: {
|
|
|
69
73
|
* promptArn: "STRING_VALUE", // required
|
|
70
74
|
* },
|
|
71
75
|
* inline: { // PromptFlowNodeInlineConfiguration
|
|
72
|
-
* templateType: "TEXT", // required
|
|
76
|
+
* templateType: "TEXT" || "CHAT", // required
|
|
73
77
|
* templateConfiguration: { // PromptTemplateConfiguration Union: only one key present
|
|
74
78
|
* text: { // TextPromptTemplateConfiguration
|
|
75
79
|
* text: "STRING_VALUE", // required
|
|
@@ -79,6 +83,48 @@ declare const CreateFlowCommand_base: {
|
|
|
79
83
|
* },
|
|
80
84
|
* ],
|
|
81
85
|
* },
|
|
86
|
+
* chat: { // ChatPromptTemplateConfiguration
|
|
87
|
+
* messages: [ // Messages // required
|
|
88
|
+
* { // Message
|
|
89
|
+
* role: "user" || "assistant", // required
|
|
90
|
+
* content: [ // ContentBlocks // required
|
|
91
|
+
* { // ContentBlock Union: only one key present
|
|
92
|
+
* text: "STRING_VALUE",
|
|
93
|
+
* },
|
|
94
|
+
* ],
|
|
95
|
+
* },
|
|
96
|
+
* ],
|
|
97
|
+
* system: [ // SystemContentBlocks
|
|
98
|
+
* { // SystemContentBlock Union: only one key present
|
|
99
|
+
* text: "STRING_VALUE",
|
|
100
|
+
* },
|
|
101
|
+
* ],
|
|
102
|
+
* inputVariables: [
|
|
103
|
+
* {
|
|
104
|
+
* name: "STRING_VALUE",
|
|
105
|
+
* },
|
|
106
|
+
* ],
|
|
107
|
+
* toolConfiguration: { // ToolConfiguration
|
|
108
|
+
* tools: [ // Tools // required
|
|
109
|
+
* { // Tool Union: only one key present
|
|
110
|
+
* toolSpec: { // ToolSpecification
|
|
111
|
+
* name: "STRING_VALUE", // required
|
|
112
|
+
* description: "STRING_VALUE",
|
|
113
|
+
* inputSchema: { // ToolInputSchema Union: only one key present
|
|
114
|
+
* json: "DOCUMENT_VALUE",
|
|
115
|
+
* },
|
|
116
|
+
* },
|
|
117
|
+
* },
|
|
118
|
+
* ],
|
|
119
|
+
* toolChoice: { // ToolChoice Union: only one key present
|
|
120
|
+
* auto: {},
|
|
121
|
+
* any: {},
|
|
122
|
+
* tool: { // SpecificToolChoice
|
|
123
|
+
* name: "STRING_VALUE", // required
|
|
124
|
+
* },
|
|
125
|
+
* },
|
|
126
|
+
* },
|
|
127
|
+
* },
|
|
82
128
|
* },
|
|
83
129
|
* modelId: "STRING_VALUE", // required
|
|
84
130
|
* inferenceConfiguration: { // PromptInferenceConfiguration Union: only one key present
|
|
@@ -94,6 +140,10 @@ declare const CreateFlowCommand_base: {
|
|
|
94
140
|
* additionalModelRequestFields: "DOCUMENT_VALUE",
|
|
95
141
|
* },
|
|
96
142
|
* },
|
|
143
|
+
* guardrailConfiguration: {
|
|
144
|
+
* guardrailIdentifier: "STRING_VALUE",
|
|
145
|
+
* guardrailVersion: "STRING_VALUE",
|
|
146
|
+
* },
|
|
97
147
|
* },
|
|
98
148
|
* lambdaFunction: { // LambdaFunctionFlowNodeConfiguration
|
|
99
149
|
* lambdaArn: "STRING_VALUE", // required
|
|
@@ -180,6 +230,10 @@ declare const CreateFlowCommand_base: {
|
|
|
180
230
|
* // knowledgeBase: { // KnowledgeBaseFlowNodeConfiguration
|
|
181
231
|
* // knowledgeBaseId: "STRING_VALUE", // required
|
|
182
232
|
* // modelId: "STRING_VALUE",
|
|
233
|
+
* // guardrailConfiguration: { // GuardrailConfiguration
|
|
234
|
+
* // guardrailIdentifier: "STRING_VALUE",
|
|
235
|
+
* // guardrailVersion: "STRING_VALUE",
|
|
236
|
+
* // },
|
|
183
237
|
* // },
|
|
184
238
|
* // condition: { // ConditionFlowNodeConfiguration
|
|
185
239
|
* // conditions: [ // FlowConditions // required
|
|
@@ -199,7 +253,7 @@ declare const CreateFlowCommand_base: {
|
|
|
199
253
|
* // promptArn: "STRING_VALUE", // required
|
|
200
254
|
* // },
|
|
201
255
|
* // inline: { // PromptFlowNodeInlineConfiguration
|
|
202
|
-
* // templateType: "TEXT", // required
|
|
256
|
+
* // templateType: "TEXT" || "CHAT", // required
|
|
203
257
|
* // templateConfiguration: { // PromptTemplateConfiguration Union: only one key present
|
|
204
258
|
* // text: { // TextPromptTemplateConfiguration
|
|
205
259
|
* // text: "STRING_VALUE", // required
|
|
@@ -209,6 +263,48 @@ declare const CreateFlowCommand_base: {
|
|
|
209
263
|
* // },
|
|
210
264
|
* // ],
|
|
211
265
|
* // },
|
|
266
|
+
* // chat: { // ChatPromptTemplateConfiguration
|
|
267
|
+
* // messages: [ // Messages // required
|
|
268
|
+
* // { // Message
|
|
269
|
+
* // role: "user" || "assistant", // required
|
|
270
|
+
* // content: [ // ContentBlocks // required
|
|
271
|
+
* // { // ContentBlock Union: only one key present
|
|
272
|
+
* // text: "STRING_VALUE",
|
|
273
|
+
* // },
|
|
274
|
+
* // ],
|
|
275
|
+
* // },
|
|
276
|
+
* // ],
|
|
277
|
+
* // system: [ // SystemContentBlocks
|
|
278
|
+
* // { // SystemContentBlock Union: only one key present
|
|
279
|
+
* // text: "STRING_VALUE",
|
|
280
|
+
* // },
|
|
281
|
+
* // ],
|
|
282
|
+
* // inputVariables: [
|
|
283
|
+
* // {
|
|
284
|
+
* // name: "STRING_VALUE",
|
|
285
|
+
* // },
|
|
286
|
+
* // ],
|
|
287
|
+
* // toolConfiguration: { // ToolConfiguration
|
|
288
|
+
* // tools: [ // Tools // required
|
|
289
|
+
* // { // Tool Union: only one key present
|
|
290
|
+
* // toolSpec: { // ToolSpecification
|
|
291
|
+
* // name: "STRING_VALUE", // required
|
|
292
|
+
* // description: "STRING_VALUE",
|
|
293
|
+
* // inputSchema: { // ToolInputSchema Union: only one key present
|
|
294
|
+
* // json: "DOCUMENT_VALUE",
|
|
295
|
+
* // },
|
|
296
|
+
* // },
|
|
297
|
+
* // },
|
|
298
|
+
* // ],
|
|
299
|
+
* // toolChoice: { // ToolChoice Union: only one key present
|
|
300
|
+
* // auto: {},
|
|
301
|
+
* // any: {},
|
|
302
|
+
* // tool: { // SpecificToolChoice
|
|
303
|
+
* // name: "STRING_VALUE", // required
|
|
304
|
+
* // },
|
|
305
|
+
* // },
|
|
306
|
+
* // },
|
|
307
|
+
* // },
|
|
212
308
|
* // },
|
|
213
309
|
* // modelId: "STRING_VALUE", // required
|
|
214
310
|
* // inferenceConfiguration: { // PromptInferenceConfiguration Union: only one key present
|
|
@@ -224,6 +320,10 @@ declare const CreateFlowCommand_base: {
|
|
|
224
320
|
* // additionalModelRequestFields: "DOCUMENT_VALUE",
|
|
225
321
|
* // },
|
|
226
322
|
* // },
|
|
323
|
+
* // guardrailConfiguration: {
|
|
324
|
+
* // guardrailIdentifier: "STRING_VALUE",
|
|
325
|
+
* // guardrailVersion: "STRING_VALUE",
|
|
326
|
+
* // },
|
|
227
327
|
* // },
|
|
228
328
|
* // lambdaFunction: { // LambdaFunctionFlowNodeConfiguration
|
|
229
329
|
* // lambdaArn: "STRING_VALUE", // required
|
|
@@ -62,6 +62,10 @@ declare const CreateFlowVersionCommand_base: {
|
|
|
62
62
|
* // knowledgeBase: { // KnowledgeBaseFlowNodeConfiguration
|
|
63
63
|
* // knowledgeBaseId: "STRING_VALUE", // required
|
|
64
64
|
* // modelId: "STRING_VALUE",
|
|
65
|
+
* // guardrailConfiguration: { // GuardrailConfiguration
|
|
66
|
+
* // guardrailIdentifier: "STRING_VALUE",
|
|
67
|
+
* // guardrailVersion: "STRING_VALUE",
|
|
68
|
+
* // },
|
|
65
69
|
* // },
|
|
66
70
|
* // condition: { // ConditionFlowNodeConfiguration
|
|
67
71
|
* // conditions: [ // FlowConditions // required
|
|
@@ -81,7 +85,7 @@ declare const CreateFlowVersionCommand_base: {
|
|
|
81
85
|
* // promptArn: "STRING_VALUE", // required
|
|
82
86
|
* // },
|
|
83
87
|
* // inline: { // PromptFlowNodeInlineConfiguration
|
|
84
|
-
* // templateType: "TEXT", // required
|
|
88
|
+
* // templateType: "TEXT" || "CHAT", // required
|
|
85
89
|
* // templateConfiguration: { // PromptTemplateConfiguration Union: only one key present
|
|
86
90
|
* // text: { // TextPromptTemplateConfiguration
|
|
87
91
|
* // text: "STRING_VALUE", // required
|
|
@@ -91,6 +95,48 @@ declare const CreateFlowVersionCommand_base: {
|
|
|
91
95
|
* // },
|
|
92
96
|
* // ],
|
|
93
97
|
* // },
|
|
98
|
+
* // chat: { // ChatPromptTemplateConfiguration
|
|
99
|
+
* // messages: [ // Messages // required
|
|
100
|
+
* // { // Message
|
|
101
|
+
* // role: "user" || "assistant", // required
|
|
102
|
+
* // content: [ // ContentBlocks // required
|
|
103
|
+
* // { // ContentBlock Union: only one key present
|
|
104
|
+
* // text: "STRING_VALUE",
|
|
105
|
+
* // },
|
|
106
|
+
* // ],
|
|
107
|
+
* // },
|
|
108
|
+
* // ],
|
|
109
|
+
* // system: [ // SystemContentBlocks
|
|
110
|
+
* // { // SystemContentBlock Union: only one key present
|
|
111
|
+
* // text: "STRING_VALUE",
|
|
112
|
+
* // },
|
|
113
|
+
* // ],
|
|
114
|
+
* // inputVariables: [
|
|
115
|
+
* // {
|
|
116
|
+
* // name: "STRING_VALUE",
|
|
117
|
+
* // },
|
|
118
|
+
* // ],
|
|
119
|
+
* // toolConfiguration: { // ToolConfiguration
|
|
120
|
+
* // tools: [ // Tools // required
|
|
121
|
+
* // { // Tool Union: only one key present
|
|
122
|
+
* // toolSpec: { // ToolSpecification
|
|
123
|
+
* // name: "STRING_VALUE", // required
|
|
124
|
+
* // description: "STRING_VALUE",
|
|
125
|
+
* // inputSchema: { // ToolInputSchema Union: only one key present
|
|
126
|
+
* // json: "DOCUMENT_VALUE",
|
|
127
|
+
* // },
|
|
128
|
+
* // },
|
|
129
|
+
* // },
|
|
130
|
+
* // ],
|
|
131
|
+
* // toolChoice: { // ToolChoice Union: only one key present
|
|
132
|
+
* // auto: {},
|
|
133
|
+
* // any: {},
|
|
134
|
+
* // tool: { // SpecificToolChoice
|
|
135
|
+
* // name: "STRING_VALUE", // required
|
|
136
|
+
* // },
|
|
137
|
+
* // },
|
|
138
|
+
* // },
|
|
139
|
+
* // },
|
|
94
140
|
* // },
|
|
95
141
|
* // modelId: "STRING_VALUE", // required
|
|
96
142
|
* // inferenceConfiguration: { // PromptInferenceConfiguration Union: only one key present
|
|
@@ -106,6 +152,10 @@ declare const CreateFlowVersionCommand_base: {
|
|
|
106
152
|
* // additionalModelRequestFields: "DOCUMENT_VALUE",
|
|
107
153
|
* // },
|
|
108
154
|
* // },
|
|
155
|
+
* // guardrailConfiguration: {
|
|
156
|
+
* // guardrailIdentifier: "STRING_VALUE",
|
|
157
|
+
* // guardrailVersion: "STRING_VALUE",
|
|
158
|
+
* // },
|
|
109
159
|
* // },
|
|
110
160
|
* // lambdaFunction: { // LambdaFunctionFlowNodeConfiguration
|
|
111
161
|
* // lambdaArn: "STRING_VALUE", // required
|