@aws-sdk/client-bedrock-agent-runtime 3.697.0 → 3.701.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 +505 -2
- package/dist-es/BedrockAgentRuntime.js +2 -0
- package/dist-es/commands/InvokeInlineAgentCommand.js +27 -0
- package/dist-es/commands/index.js +1 -0
- package/dist-es/models/models_0.js +208 -0
- package/dist-es/protocols/Aws_restJson1.js +210 -0
- package/dist-types/BedrockAgentRuntime.d.ts +7 -0
- package/dist-types/BedrockAgentRuntimeClient.d.ts +3 -2
- package/dist-types/commands/InvokeAgentCommand.d.ts +16 -6
- package/dist-types/commands/InvokeInlineAgentCommand.d.ts +761 -0
- package/dist-types/commands/index.d.ts +1 -0
- package/dist-types/models/models_0.d.ts +1227 -44
- package/dist-types/protocols/Aws_restJson1.d.ts +9 -0
- package/dist-types/ts3.4/BedrockAgentRuntime.d.ts +17 -0
- package/dist-types/ts3.4/BedrockAgentRuntimeClient.d.ts +6 -0
- package/dist-types/ts3.4/commands/InvokeInlineAgentCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/index.d.ts +1 -0
- package/dist-types/ts3.4/models/models_0.d.ts +527 -2
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +12 -0
- package/package.json +4 -4
|
@@ -4,6 +4,7 @@ import { DeleteAgentMemoryCommand, } from "./commands/DeleteAgentMemoryCommand";
|
|
|
4
4
|
import { GetAgentMemoryCommand, } from "./commands/GetAgentMemoryCommand";
|
|
5
5
|
import { InvokeAgentCommand } from "./commands/InvokeAgentCommand";
|
|
6
6
|
import { InvokeFlowCommand } from "./commands/InvokeFlowCommand";
|
|
7
|
+
import { InvokeInlineAgentCommand, } from "./commands/InvokeInlineAgentCommand";
|
|
7
8
|
import { OptimizePromptCommand, } from "./commands/OptimizePromptCommand";
|
|
8
9
|
import { RetrieveAndGenerateCommand, } from "./commands/RetrieveAndGenerateCommand";
|
|
9
10
|
import { RetrieveCommand } from "./commands/RetrieveCommand";
|
|
@@ -12,6 +13,7 @@ const commands = {
|
|
|
12
13
|
GetAgentMemoryCommand,
|
|
13
14
|
InvokeAgentCommand,
|
|
14
15
|
InvokeFlowCommand,
|
|
16
|
+
InvokeInlineAgentCommand,
|
|
15
17
|
OptimizePromptCommand,
|
|
16
18
|
RetrieveCommand,
|
|
17
19
|
RetrieveAndGenerateCommand,
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
|
|
2
|
+
import { getSerdePlugin } from "@smithy/middleware-serde";
|
|
3
|
+
import { Command as $Command } from "@smithy/smithy-client";
|
|
4
|
+
import { commonParams } from "../endpoint/EndpointParameters";
|
|
5
|
+
import { InvokeInlineAgentRequestFilterSensitiveLog, InvokeInlineAgentResponseFilterSensitiveLog, } from "../models/models_0";
|
|
6
|
+
import { de_InvokeInlineAgentCommand, se_InvokeInlineAgentCommand } from "../protocols/Aws_restJson1";
|
|
7
|
+
export { $Command };
|
|
8
|
+
export class InvokeInlineAgentCommand extends $Command
|
|
9
|
+
.classBuilder()
|
|
10
|
+
.ep(commonParams)
|
|
11
|
+
.m(function (Command, cs, config, o) {
|
|
12
|
+
return [
|
|
13
|
+
getSerdePlugin(config, this.serialize, this.deserialize),
|
|
14
|
+
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
|
|
15
|
+
];
|
|
16
|
+
})
|
|
17
|
+
.s("AmazonBedrockAgentRunTimeService", "InvokeInlineAgent", {
|
|
18
|
+
eventStream: {
|
|
19
|
+
output: true,
|
|
20
|
+
},
|
|
21
|
+
})
|
|
22
|
+
.n("BedrockAgentRuntimeClient", "InvokeInlineAgentCommand")
|
|
23
|
+
.f(InvokeInlineAgentRequestFilterSensitiveLog, InvokeInlineAgentResponseFilterSensitiveLog)
|
|
24
|
+
.ser(se_InvokeInlineAgentCommand)
|
|
25
|
+
.de(de_InvokeInlineAgentCommand)
|
|
26
|
+
.build() {
|
|
27
|
+
}
|
|
@@ -2,6 +2,7 @@ export * from "./DeleteAgentMemoryCommand";
|
|
|
2
2
|
export * from "./GetAgentMemoryCommand";
|
|
3
3
|
export * from "./InvokeAgentCommand";
|
|
4
4
|
export * from "./InvokeFlowCommand";
|
|
5
|
+
export * from "./InvokeInlineAgentCommand";
|
|
5
6
|
export * from "./OptimizePromptCommand";
|
|
6
7
|
export * from "./RetrieveAndGenerateCommand";
|
|
7
8
|
export * from "./RetrieveCommand";
|
|
@@ -12,15 +12,61 @@ export class AccessDeniedException extends __BaseException {
|
|
|
12
12
|
Object.setPrototypeOf(this, AccessDeniedException.prototype);
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
|
+
export const CustomControlMethod = {
|
|
16
|
+
RETURN_CONTROL: "RETURN_CONTROL",
|
|
17
|
+
};
|
|
18
|
+
export var ActionGroupExecutor;
|
|
19
|
+
(function (ActionGroupExecutor) {
|
|
20
|
+
ActionGroupExecutor.visit = (value, visitor) => {
|
|
21
|
+
if (value.lambda !== undefined)
|
|
22
|
+
return visitor.lambda(value.lambda);
|
|
23
|
+
if (value.customControl !== undefined)
|
|
24
|
+
return visitor.customControl(value.customControl);
|
|
25
|
+
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
26
|
+
};
|
|
27
|
+
})(ActionGroupExecutor || (ActionGroupExecutor = {}));
|
|
15
28
|
export const ExecutionType = {
|
|
16
29
|
LAMBDA: "LAMBDA",
|
|
17
30
|
RETURN_CONTROL: "RETURN_CONTROL",
|
|
18
31
|
};
|
|
32
|
+
export const ActionGroupSignature = {
|
|
33
|
+
AMAZON_CODEINTERPRETER: "AMAZON.CodeInterpreter",
|
|
34
|
+
AMAZON_USERINPUT: "AMAZON.UserInput",
|
|
35
|
+
};
|
|
19
36
|
export const ActionInvocationType = {
|
|
20
37
|
RESULT: "RESULT",
|
|
21
38
|
USER_CONFIRMATION: "USER_CONFIRMATION",
|
|
22
39
|
USER_CONFIRMATION_AND_RESULT: "USER_CONFIRMATION_AND_RESULT",
|
|
23
40
|
};
|
|
41
|
+
export var APISchema;
|
|
42
|
+
(function (APISchema) {
|
|
43
|
+
APISchema.visit = (value, visitor) => {
|
|
44
|
+
if (value.s3 !== undefined)
|
|
45
|
+
return visitor.s3(value.s3);
|
|
46
|
+
if (value.payload !== undefined)
|
|
47
|
+
return visitor.payload(value.payload);
|
|
48
|
+
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
49
|
+
};
|
|
50
|
+
})(APISchema || (APISchema = {}));
|
|
51
|
+
export const ParameterType = {
|
|
52
|
+
ARRAY: "array",
|
|
53
|
+
BOOLEAN: "boolean",
|
|
54
|
+
INTEGER: "integer",
|
|
55
|
+
NUMBER: "number",
|
|
56
|
+
STRING: "string",
|
|
57
|
+
};
|
|
58
|
+
export const RequireConfirmation = {
|
|
59
|
+
DISABLED: "DISABLED",
|
|
60
|
+
ENABLED: "ENABLED",
|
|
61
|
+
};
|
|
62
|
+
export var FunctionSchema;
|
|
63
|
+
(function (FunctionSchema) {
|
|
64
|
+
FunctionSchema.visit = (value, visitor) => {
|
|
65
|
+
if (value.functions !== undefined)
|
|
66
|
+
return visitor.functions(value.functions);
|
|
67
|
+
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
68
|
+
};
|
|
69
|
+
})(FunctionSchema || (FunctionSchema = {}));
|
|
24
70
|
export class BadGatewayException extends __BaseException {
|
|
25
71
|
constructor(opts) {
|
|
26
72
|
super({
|
|
@@ -337,6 +383,7 @@ export const PromptType = {
|
|
|
337
383
|
ORCHESTRATION: "ORCHESTRATION",
|
|
338
384
|
POST_PROCESSING: "POST_PROCESSING",
|
|
339
385
|
PRE_PROCESSING: "PRE_PROCESSING",
|
|
386
|
+
ROUTING_CLASSIFIER: "ROUTING_CLASSIFIER",
|
|
340
387
|
};
|
|
341
388
|
export const Source = {
|
|
342
389
|
ACTION_GROUP: "ACTION_GROUP",
|
|
@@ -399,6 +446,8 @@ export var Trace;
|
|
|
399
446
|
return visitor.postProcessingTrace(value.postProcessingTrace);
|
|
400
447
|
if (value.failureTrace !== undefined)
|
|
401
448
|
return visitor.failureTrace(value.failureTrace);
|
|
449
|
+
if (value.customOrchestrationTrace !== undefined)
|
|
450
|
+
return visitor.customOrchestrationTrace(value.customOrchestrationTrace);
|
|
402
451
|
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
403
452
|
};
|
|
404
453
|
})(Trace || (Trace = {}));
|
|
@@ -434,6 +483,42 @@ export var ResponseStream;
|
|
|
434
483
|
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
435
484
|
};
|
|
436
485
|
})(ResponseStream || (ResponseStream = {}));
|
|
486
|
+
export const PromptState = {
|
|
487
|
+
DISABLED: "DISABLED",
|
|
488
|
+
ENABLED: "ENABLED",
|
|
489
|
+
};
|
|
490
|
+
export var InlineAgentResponseStream;
|
|
491
|
+
(function (InlineAgentResponseStream) {
|
|
492
|
+
InlineAgentResponseStream.visit = (value, visitor) => {
|
|
493
|
+
if (value.chunk !== undefined)
|
|
494
|
+
return visitor.chunk(value.chunk);
|
|
495
|
+
if (value.trace !== undefined)
|
|
496
|
+
return visitor.trace(value.trace);
|
|
497
|
+
if (value.returnControl !== undefined)
|
|
498
|
+
return visitor.returnControl(value.returnControl);
|
|
499
|
+
if (value.internalServerException !== undefined)
|
|
500
|
+
return visitor.internalServerException(value.internalServerException);
|
|
501
|
+
if (value.validationException !== undefined)
|
|
502
|
+
return visitor.validationException(value.validationException);
|
|
503
|
+
if (value.resourceNotFoundException !== undefined)
|
|
504
|
+
return visitor.resourceNotFoundException(value.resourceNotFoundException);
|
|
505
|
+
if (value.serviceQuotaExceededException !== undefined)
|
|
506
|
+
return visitor.serviceQuotaExceededException(value.serviceQuotaExceededException);
|
|
507
|
+
if (value.throttlingException !== undefined)
|
|
508
|
+
return visitor.throttlingException(value.throttlingException);
|
|
509
|
+
if (value.accessDeniedException !== undefined)
|
|
510
|
+
return visitor.accessDeniedException(value.accessDeniedException);
|
|
511
|
+
if (value.conflictException !== undefined)
|
|
512
|
+
return visitor.conflictException(value.conflictException);
|
|
513
|
+
if (value.dependencyFailedException !== undefined)
|
|
514
|
+
return visitor.dependencyFailedException(value.dependencyFailedException);
|
|
515
|
+
if (value.badGatewayException !== undefined)
|
|
516
|
+
return visitor.badGatewayException(value.badGatewayException);
|
|
517
|
+
if (value.files !== undefined)
|
|
518
|
+
return visitor.files(value.files);
|
|
519
|
+
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
520
|
+
};
|
|
521
|
+
})(InlineAgentResponseStream || (InlineAgentResponseStream = {}));
|
|
437
522
|
export const MemoryType = {
|
|
438
523
|
SESSION_SUMMARY: "SESSION_SUMMARY",
|
|
439
524
|
};
|
|
@@ -541,6 +626,32 @@ export const ActionGroupInvocationOutputFilterSensitiveLog = (obj) => ({
|
|
|
541
626
|
...obj,
|
|
542
627
|
...(obj.text && { text: SENSITIVE_STRING }),
|
|
543
628
|
});
|
|
629
|
+
export const APISchemaFilterSensitiveLog = (obj) => {
|
|
630
|
+
if (obj.s3 !== undefined)
|
|
631
|
+
return { s3: obj.s3 };
|
|
632
|
+
if (obj.payload !== undefined)
|
|
633
|
+
return { payload: SENSITIVE_STRING };
|
|
634
|
+
if (obj.$unknown !== undefined)
|
|
635
|
+
return { [obj.$unknown[0]]: "UNKNOWN" };
|
|
636
|
+
};
|
|
637
|
+
export const FunctionDefinitionFilterSensitiveLog = (obj) => ({
|
|
638
|
+
...obj,
|
|
639
|
+
...(obj.name && { name: SENSITIVE_STRING }),
|
|
640
|
+
});
|
|
641
|
+
export const FunctionSchemaFilterSensitiveLog = (obj) => {
|
|
642
|
+
if (obj.functions !== undefined)
|
|
643
|
+
return { functions: obj.functions.map((item) => FunctionDefinitionFilterSensitiveLog(item)) };
|
|
644
|
+
if (obj.$unknown !== undefined)
|
|
645
|
+
return { [obj.$unknown[0]]: "UNKNOWN" };
|
|
646
|
+
};
|
|
647
|
+
export const AgentActionGroupFilterSensitiveLog = (obj) => ({
|
|
648
|
+
...obj,
|
|
649
|
+
...(obj.actionGroupName && { actionGroupName: SENSITIVE_STRING }),
|
|
650
|
+
...(obj.description && { description: SENSITIVE_STRING }),
|
|
651
|
+
...(obj.actionGroupExecutor && { actionGroupExecutor: obj.actionGroupExecutor }),
|
|
652
|
+
...(obj.apiSchema && { apiSchema: APISchemaFilterSensitiveLog(obj.apiSchema) }),
|
|
653
|
+
...(obj.functionSchema && { functionSchema: FunctionSchemaFilterSensitiveLog(obj.functionSchema) }),
|
|
654
|
+
});
|
|
544
655
|
export const FlowInputContentFilterSensitiveLog = (obj) => {
|
|
545
656
|
if (obj.document !== undefined)
|
|
546
657
|
return { document: obj.document };
|
|
@@ -724,6 +835,13 @@ export const ReturnControlPayloadFilterSensitiveLog = (obj) => ({
|
|
|
724
835
|
invocationInputs: obj.invocationInputs.map((item) => InvocationInputMemberFilterSensitiveLog(item)),
|
|
725
836
|
}),
|
|
726
837
|
});
|
|
838
|
+
export const CustomOrchestrationTraceEventFilterSensitiveLog = (obj) => ({
|
|
839
|
+
...obj,
|
|
840
|
+
});
|
|
841
|
+
export const CustomOrchestrationTraceFilterSensitiveLog = (obj) => ({
|
|
842
|
+
...obj,
|
|
843
|
+
...(obj.event && { event: SENSITIVE_STRING }),
|
|
844
|
+
});
|
|
727
845
|
export const FailureTraceFilterSensitiveLog = (obj) => ({
|
|
728
846
|
...obj,
|
|
729
847
|
...(obj.failureReason && { failureReason: SENSITIVE_STRING }),
|
|
@@ -899,6 +1017,8 @@ export const TraceFilterSensitiveLog = (obj) => {
|
|
|
899
1017
|
return { postProcessingTrace: SENSITIVE_STRING };
|
|
900
1018
|
if (obj.failureTrace !== undefined)
|
|
901
1019
|
return { failureTrace: SENSITIVE_STRING };
|
|
1020
|
+
if (obj.customOrchestrationTrace !== undefined)
|
|
1021
|
+
return { customOrchestrationTrace: SENSITIVE_STRING };
|
|
902
1022
|
if (obj.$unknown !== undefined)
|
|
903
1023
|
return { [obj.$unknown[0]]: "UNKNOWN" };
|
|
904
1024
|
};
|
|
@@ -940,6 +1060,76 @@ export const InvokeAgentResponseFilterSensitiveLog = (obj) => ({
|
|
|
940
1060
|
...obj,
|
|
941
1061
|
...(obj.completion && { completion: "STREAMING_CONTENT" }),
|
|
942
1062
|
});
|
|
1063
|
+
export const InlineSessionStateFilterSensitiveLog = (obj) => ({
|
|
1064
|
+
...obj,
|
|
1065
|
+
...(obj.returnControlInvocationResults && {
|
|
1066
|
+
returnControlInvocationResults: obj.returnControlInvocationResults.map((item) => InvocationResultMemberFilterSensitiveLog(item)),
|
|
1067
|
+
}),
|
|
1068
|
+
...(obj.files && { files: obj.files.map((item) => InputFileFilterSensitiveLog(item)) }),
|
|
1069
|
+
});
|
|
1070
|
+
export const PromptConfigurationFilterSensitiveLog = (obj) => ({
|
|
1071
|
+
...obj,
|
|
1072
|
+
...(obj.basePromptTemplate && { basePromptTemplate: SENSITIVE_STRING }),
|
|
1073
|
+
});
|
|
1074
|
+
export const PromptOverrideConfigurationFilterSensitiveLog = (obj) => ({
|
|
1075
|
+
...obj,
|
|
1076
|
+
...(obj.promptConfigurations && {
|
|
1077
|
+
promptConfigurations: obj.promptConfigurations.map((item) => PromptConfigurationFilterSensitiveLog(item)),
|
|
1078
|
+
}),
|
|
1079
|
+
});
|
|
1080
|
+
export const InlineAgentPayloadPartFilterSensitiveLog = (obj) => ({
|
|
1081
|
+
...obj,
|
|
1082
|
+
...(obj.bytes && { bytes: SENSITIVE_STRING }),
|
|
1083
|
+
...(obj.attribution && { attribution: AttributionFilterSensitiveLog(obj.attribution) }),
|
|
1084
|
+
});
|
|
1085
|
+
export const InlineAgentFilePartFilterSensitiveLog = (obj) => ({
|
|
1086
|
+
...obj,
|
|
1087
|
+
...(obj.files && { files: SENSITIVE_STRING }),
|
|
1088
|
+
});
|
|
1089
|
+
export const InlineAgentReturnControlPayloadFilterSensitiveLog = (obj) => ({
|
|
1090
|
+
...obj,
|
|
1091
|
+
...(obj.invocationInputs && {
|
|
1092
|
+
invocationInputs: obj.invocationInputs.map((item) => InvocationInputMemberFilterSensitiveLog(item)),
|
|
1093
|
+
}),
|
|
1094
|
+
});
|
|
1095
|
+
export const InlineAgentTracePartFilterSensitiveLog = (obj) => ({
|
|
1096
|
+
...obj,
|
|
1097
|
+
...(obj.trace && { trace: SENSITIVE_STRING }),
|
|
1098
|
+
});
|
|
1099
|
+
export const InlineAgentResponseStreamFilterSensitiveLog = (obj) => {
|
|
1100
|
+
if (obj.chunk !== undefined)
|
|
1101
|
+
return { chunk: SENSITIVE_STRING };
|
|
1102
|
+
if (obj.trace !== undefined)
|
|
1103
|
+
return { trace: SENSITIVE_STRING };
|
|
1104
|
+
if (obj.returnControl !== undefined)
|
|
1105
|
+
return { returnControl: SENSITIVE_STRING };
|
|
1106
|
+
if (obj.internalServerException !== undefined)
|
|
1107
|
+
return { internalServerException: obj.internalServerException };
|
|
1108
|
+
if (obj.validationException !== undefined)
|
|
1109
|
+
return { validationException: obj.validationException };
|
|
1110
|
+
if (obj.resourceNotFoundException !== undefined)
|
|
1111
|
+
return { resourceNotFoundException: obj.resourceNotFoundException };
|
|
1112
|
+
if (obj.serviceQuotaExceededException !== undefined)
|
|
1113
|
+
return { serviceQuotaExceededException: obj.serviceQuotaExceededException };
|
|
1114
|
+
if (obj.throttlingException !== undefined)
|
|
1115
|
+
return { throttlingException: obj.throttlingException };
|
|
1116
|
+
if (obj.accessDeniedException !== undefined)
|
|
1117
|
+
return { accessDeniedException: obj.accessDeniedException };
|
|
1118
|
+
if (obj.conflictException !== undefined)
|
|
1119
|
+
return { conflictException: obj.conflictException };
|
|
1120
|
+
if (obj.dependencyFailedException !== undefined)
|
|
1121
|
+
return { dependencyFailedException: obj.dependencyFailedException };
|
|
1122
|
+
if (obj.badGatewayException !== undefined)
|
|
1123
|
+
return { badGatewayException: obj.badGatewayException };
|
|
1124
|
+
if (obj.files !== undefined)
|
|
1125
|
+
return { files: InlineAgentFilePartFilterSensitiveLog(obj.files) };
|
|
1126
|
+
if (obj.$unknown !== undefined)
|
|
1127
|
+
return { [obj.$unknown[0]]: "UNKNOWN" };
|
|
1128
|
+
};
|
|
1129
|
+
export const InvokeInlineAgentResponseFilterSensitiveLog = (obj) => ({
|
|
1130
|
+
...obj,
|
|
1131
|
+
...(obj.completion && { completion: "STREAMING_CONTENT" }),
|
|
1132
|
+
});
|
|
943
1133
|
export const TextPromptFilterSensitiveLog = (obj) => ({
|
|
944
1134
|
...obj,
|
|
945
1135
|
});
|
|
@@ -1086,6 +1276,13 @@ export const KnowledgeBaseRetrievalConfigurationFilterSensitiveLog = (obj) => ({
|
|
|
1086
1276
|
vectorSearchConfiguration: KnowledgeBaseVectorSearchConfigurationFilterSensitiveLog(obj.vectorSearchConfiguration),
|
|
1087
1277
|
}),
|
|
1088
1278
|
});
|
|
1279
|
+
export const KnowledgeBaseFilterSensitiveLog = (obj) => ({
|
|
1280
|
+
...obj,
|
|
1281
|
+
...(obj.description && { description: SENSITIVE_STRING }),
|
|
1282
|
+
...(obj.retrievalConfiguration && {
|
|
1283
|
+
retrievalConfiguration: KnowledgeBaseRetrievalConfigurationFilterSensitiveLog(obj.retrievalConfiguration),
|
|
1284
|
+
}),
|
|
1285
|
+
});
|
|
1089
1286
|
export const KnowledgeBaseConfigurationFilterSensitiveLog = (obj) => ({
|
|
1090
1287
|
...obj,
|
|
1091
1288
|
...(obj.retrievalConfiguration && {
|
|
@@ -1120,6 +1317,17 @@ export const RetrieveAndGenerateConfigurationFilterSensitiveLog = (obj) => ({
|
|
|
1120
1317
|
externalSourcesConfiguration: ExternalSourcesRetrieveAndGenerateConfigurationFilterSensitiveLog(obj.externalSourcesConfiguration),
|
|
1121
1318
|
}),
|
|
1122
1319
|
});
|
|
1320
|
+
export const InvokeInlineAgentRequestFilterSensitiveLog = (obj) => ({
|
|
1321
|
+
...obj,
|
|
1322
|
+
...(obj.inputText && { inputText: SENSITIVE_STRING }),
|
|
1323
|
+
...(obj.inlineSessionState && { inlineSessionState: InlineSessionStateFilterSensitiveLog(obj.inlineSessionState) }),
|
|
1324
|
+
...(obj.instruction && { instruction: SENSITIVE_STRING }),
|
|
1325
|
+
...(obj.actionGroups && { actionGroups: obj.actionGroups.map((item) => AgentActionGroupFilterSensitiveLog(item)) }),
|
|
1326
|
+
...(obj.knowledgeBases && {
|
|
1327
|
+
knowledgeBases: obj.knowledgeBases.map((item) => KnowledgeBaseFilterSensitiveLog(item)),
|
|
1328
|
+
}),
|
|
1329
|
+
...(obj.promptOverrideConfiguration && { promptOverrideConfiguration: SENSITIVE_STRING }),
|
|
1330
|
+
});
|
|
1123
1331
|
export const RetrieveAndGenerateRequestFilterSensitiveLog = (obj) => ({
|
|
1124
1332
|
...obj,
|
|
1125
1333
|
...(obj.input && { input: SENSITIVE_STRING }),
|
|
@@ -48,6 +48,7 @@ export const se_InvokeAgentCommand = async (input, context) => {
|
|
|
48
48
|
inputText: [],
|
|
49
49
|
memoryId: [],
|
|
50
50
|
sessionState: (_) => se_SessionState(_, context),
|
|
51
|
+
streamingConfigurations: (_) => _json(_),
|
|
51
52
|
}));
|
|
52
53
|
b.m("POST").h(headers).b(body);
|
|
53
54
|
return b.build();
|
|
@@ -68,6 +69,31 @@ export const se_InvokeFlowCommand = async (input, context) => {
|
|
|
68
69
|
b.m("POST").h(headers).b(body);
|
|
69
70
|
return b.build();
|
|
70
71
|
};
|
|
72
|
+
export const se_InvokeInlineAgentCommand = async (input, context) => {
|
|
73
|
+
const b = rb(input, context);
|
|
74
|
+
const headers = {
|
|
75
|
+
"content-type": "application/json",
|
|
76
|
+
};
|
|
77
|
+
b.bp("/agents/{sessionId}");
|
|
78
|
+
b.p("sessionId", () => input.sessionId, "{sessionId}", false);
|
|
79
|
+
let body;
|
|
80
|
+
body = JSON.stringify(take(input, {
|
|
81
|
+
actionGroups: (_) => _json(_),
|
|
82
|
+
customerEncryptionKeyArn: [],
|
|
83
|
+
enableTrace: [],
|
|
84
|
+
endSession: [],
|
|
85
|
+
foundationModel: [],
|
|
86
|
+
guardrailConfiguration: (_) => _json(_),
|
|
87
|
+
idleSessionTTLInSeconds: [],
|
|
88
|
+
inlineSessionState: (_) => se_InlineSessionState(_, context),
|
|
89
|
+
inputText: [],
|
|
90
|
+
instruction: [],
|
|
91
|
+
knowledgeBases: (_) => se_KnowledgeBases(_, context),
|
|
92
|
+
promptOverrideConfiguration: (_) => se_PromptOverrideConfiguration(_, context),
|
|
93
|
+
}));
|
|
94
|
+
b.m("POST").h(headers).b(body);
|
|
95
|
+
return b.build();
|
|
96
|
+
};
|
|
71
97
|
export const se_OptimizePromptCommand = async (input, context) => {
|
|
72
98
|
const b = rb(input, context);
|
|
73
99
|
const headers = {
|
|
@@ -164,6 +190,19 @@ export const de_InvokeFlowCommand = async (output, context) => {
|
|
|
164
190
|
contents.responseStream = de_FlowResponseStream(data, context);
|
|
165
191
|
return contents;
|
|
166
192
|
};
|
|
193
|
+
export const de_InvokeInlineAgentCommand = async (output, context) => {
|
|
194
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
195
|
+
return de_CommandError(output, context);
|
|
196
|
+
}
|
|
197
|
+
const contents = map({
|
|
198
|
+
$metadata: deserializeMetadata(output),
|
|
199
|
+
[_cT]: [, output.headers[_xabact]],
|
|
200
|
+
[_sI]: [, output.headers[_xabasi]],
|
|
201
|
+
});
|
|
202
|
+
const data = output.body;
|
|
203
|
+
contents.completion = de_InlineAgentResponseStream(data, context);
|
|
204
|
+
return contents;
|
|
205
|
+
};
|
|
167
206
|
export const de_OptimizePromptCommand = async (output, context) => {
|
|
168
207
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
169
208
|
return de_CommandError(output, context);
|
|
@@ -435,6 +474,76 @@ const de_FlowResponseStream = (output, context) => {
|
|
|
435
474
|
return { $unknown: output };
|
|
436
475
|
});
|
|
437
476
|
};
|
|
477
|
+
const de_InlineAgentResponseStream = (output, context) => {
|
|
478
|
+
return context.eventStreamMarshaller.deserialize(output, async (event) => {
|
|
479
|
+
if (event["chunk"] != null) {
|
|
480
|
+
return {
|
|
481
|
+
chunk: await de_InlineAgentPayloadPart_event(event["chunk"], context),
|
|
482
|
+
};
|
|
483
|
+
}
|
|
484
|
+
if (event["trace"] != null) {
|
|
485
|
+
return {
|
|
486
|
+
trace: await de_InlineAgentTracePart_event(event["trace"], context),
|
|
487
|
+
};
|
|
488
|
+
}
|
|
489
|
+
if (event["returnControl"] != null) {
|
|
490
|
+
return {
|
|
491
|
+
returnControl: await de_InlineAgentReturnControlPayload_event(event["returnControl"], context),
|
|
492
|
+
};
|
|
493
|
+
}
|
|
494
|
+
if (event["internalServerException"] != null) {
|
|
495
|
+
return {
|
|
496
|
+
internalServerException: await de_InternalServerException_event(event["internalServerException"], context),
|
|
497
|
+
};
|
|
498
|
+
}
|
|
499
|
+
if (event["validationException"] != null) {
|
|
500
|
+
return {
|
|
501
|
+
validationException: await de_ValidationException_event(event["validationException"], context),
|
|
502
|
+
};
|
|
503
|
+
}
|
|
504
|
+
if (event["resourceNotFoundException"] != null) {
|
|
505
|
+
return {
|
|
506
|
+
resourceNotFoundException: await de_ResourceNotFoundException_event(event["resourceNotFoundException"], context),
|
|
507
|
+
};
|
|
508
|
+
}
|
|
509
|
+
if (event["serviceQuotaExceededException"] != null) {
|
|
510
|
+
return {
|
|
511
|
+
serviceQuotaExceededException: await de_ServiceQuotaExceededException_event(event["serviceQuotaExceededException"], context),
|
|
512
|
+
};
|
|
513
|
+
}
|
|
514
|
+
if (event["throttlingException"] != null) {
|
|
515
|
+
return {
|
|
516
|
+
throttlingException: await de_ThrottlingException_event(event["throttlingException"], context),
|
|
517
|
+
};
|
|
518
|
+
}
|
|
519
|
+
if (event["accessDeniedException"] != null) {
|
|
520
|
+
return {
|
|
521
|
+
accessDeniedException: await de_AccessDeniedException_event(event["accessDeniedException"], context),
|
|
522
|
+
};
|
|
523
|
+
}
|
|
524
|
+
if (event["conflictException"] != null) {
|
|
525
|
+
return {
|
|
526
|
+
conflictException: await de_ConflictException_event(event["conflictException"], context),
|
|
527
|
+
};
|
|
528
|
+
}
|
|
529
|
+
if (event["dependencyFailedException"] != null) {
|
|
530
|
+
return {
|
|
531
|
+
dependencyFailedException: await de_DependencyFailedException_event(event["dependencyFailedException"], context),
|
|
532
|
+
};
|
|
533
|
+
}
|
|
534
|
+
if (event["badGatewayException"] != null) {
|
|
535
|
+
return {
|
|
536
|
+
badGatewayException: await de_BadGatewayException_event(event["badGatewayException"], context),
|
|
537
|
+
};
|
|
538
|
+
}
|
|
539
|
+
if (event["files"] != null) {
|
|
540
|
+
return {
|
|
541
|
+
files: await de_InlineAgentFilePart_event(event["files"], context),
|
|
542
|
+
};
|
|
543
|
+
}
|
|
544
|
+
return { $unknown: output };
|
|
545
|
+
});
|
|
546
|
+
};
|
|
438
547
|
const de_OptimizedPromptStream = (output, context) => {
|
|
439
548
|
return context.eventStreamMarshaller.deserialize(output, async (event) => {
|
|
440
549
|
if (event["optimizedPromptEvent"] != null) {
|
|
@@ -608,6 +717,30 @@ const de_FlowTraceEvent_event = async (output, context) => {
|
|
|
608
717
|
Object.assign(contents, de_FlowTraceEvent(data, context));
|
|
609
718
|
return contents;
|
|
610
719
|
};
|
|
720
|
+
const de_InlineAgentFilePart_event = async (output, context) => {
|
|
721
|
+
const contents = {};
|
|
722
|
+
const data = await parseBody(output.body, context);
|
|
723
|
+
Object.assign(contents, de_InlineAgentFilePart(data, context));
|
|
724
|
+
return contents;
|
|
725
|
+
};
|
|
726
|
+
const de_InlineAgentPayloadPart_event = async (output, context) => {
|
|
727
|
+
const contents = {};
|
|
728
|
+
const data = await parseBody(output.body, context);
|
|
729
|
+
Object.assign(contents, de_InlineAgentPayloadPart(data, context));
|
|
730
|
+
return contents;
|
|
731
|
+
};
|
|
732
|
+
const de_InlineAgentReturnControlPayload_event = async (output, context) => {
|
|
733
|
+
const contents = {};
|
|
734
|
+
const data = await parseBody(output.body, context);
|
|
735
|
+
Object.assign(contents, _json(data));
|
|
736
|
+
return contents;
|
|
737
|
+
};
|
|
738
|
+
const de_InlineAgentTracePart_event = async (output, context) => {
|
|
739
|
+
const contents = {};
|
|
740
|
+
const data = await parseBody(output.body, context);
|
|
741
|
+
Object.assign(contents, de_InlineAgentTracePart(data, context));
|
|
742
|
+
return contents;
|
|
743
|
+
};
|
|
611
744
|
const de_InternalServerException_event = async (output, context) => {
|
|
612
745
|
const parsedOutput = {
|
|
613
746
|
...output,
|
|
@@ -770,6 +903,24 @@ const se_InferenceConfig = (input, context) => {
|
|
|
770
903
|
textInferenceConfig: (_) => se_TextInferenceConfig(_, context),
|
|
771
904
|
});
|
|
772
905
|
};
|
|
906
|
+
const se_InferenceConfiguration = (input, context) => {
|
|
907
|
+
return take(input, {
|
|
908
|
+
maximumLength: [],
|
|
909
|
+
stopSequences: _json,
|
|
910
|
+
temperature: __serializeFloat,
|
|
911
|
+
topK: [],
|
|
912
|
+
topP: __serializeFloat,
|
|
913
|
+
});
|
|
914
|
+
};
|
|
915
|
+
const se_InlineSessionState = (input, context) => {
|
|
916
|
+
return take(input, {
|
|
917
|
+
files: (_) => se_InputFiles(_, context),
|
|
918
|
+
invocationId: [],
|
|
919
|
+
promptSessionAttributes: _json,
|
|
920
|
+
returnControlInvocationResults: _json,
|
|
921
|
+
sessionAttributes: _json,
|
|
922
|
+
});
|
|
923
|
+
};
|
|
773
924
|
const se_InputFile = (input, context) => {
|
|
774
925
|
return take(input, {
|
|
775
926
|
name: [],
|
|
@@ -784,6 +935,13 @@ const se_InputFiles = (input, context) => {
|
|
|
784
935
|
return se_InputFile(entry, context);
|
|
785
936
|
});
|
|
786
937
|
};
|
|
938
|
+
const se_KnowledgeBase = (input, context) => {
|
|
939
|
+
return take(input, {
|
|
940
|
+
description: [],
|
|
941
|
+
knowledgeBaseId: [],
|
|
942
|
+
retrievalConfiguration: (_) => se_KnowledgeBaseRetrievalConfiguration(_, context),
|
|
943
|
+
});
|
|
944
|
+
};
|
|
787
945
|
const se_KnowledgeBaseConfiguration = (input, context) => {
|
|
788
946
|
return take(input, {
|
|
789
947
|
knowledgeBaseId: [],
|
|
@@ -811,6 +969,13 @@ const se_KnowledgeBaseRetrieveAndGenerateConfiguration = (input, context) => {
|
|
|
811
969
|
retrievalConfiguration: (_) => se_KnowledgeBaseRetrievalConfiguration(_, context),
|
|
812
970
|
});
|
|
813
971
|
};
|
|
972
|
+
const se_KnowledgeBases = (input, context) => {
|
|
973
|
+
return input
|
|
974
|
+
.filter((e) => e != null)
|
|
975
|
+
.map((entry) => {
|
|
976
|
+
return se_KnowledgeBase(entry, context);
|
|
977
|
+
});
|
|
978
|
+
};
|
|
814
979
|
const se_KnowledgeBaseVectorSearchConfiguration = (input, context) => {
|
|
815
980
|
return take(input, {
|
|
816
981
|
filter: (_) => se_RetrievalFilter(_, context),
|
|
@@ -826,6 +991,29 @@ const se_OrchestrationConfiguration = (input, context) => {
|
|
|
826
991
|
queryTransformationConfiguration: _json,
|
|
827
992
|
});
|
|
828
993
|
};
|
|
994
|
+
const se_PromptConfiguration = (input, context) => {
|
|
995
|
+
return take(input, {
|
|
996
|
+
basePromptTemplate: [],
|
|
997
|
+
inferenceConfiguration: (_) => se_InferenceConfiguration(_, context),
|
|
998
|
+
parserMode: [],
|
|
999
|
+
promptCreationMode: [],
|
|
1000
|
+
promptState: [],
|
|
1001
|
+
promptType: [],
|
|
1002
|
+
});
|
|
1003
|
+
};
|
|
1004
|
+
const se_PromptConfigurations = (input, context) => {
|
|
1005
|
+
return input
|
|
1006
|
+
.filter((e) => e != null)
|
|
1007
|
+
.map((entry) => {
|
|
1008
|
+
return se_PromptConfiguration(entry, context);
|
|
1009
|
+
});
|
|
1010
|
+
};
|
|
1011
|
+
const se_PromptOverrideConfiguration = (input, context) => {
|
|
1012
|
+
return take(input, {
|
|
1013
|
+
overrideLambda: [],
|
|
1014
|
+
promptConfigurations: (_) => se_PromptConfigurations(_, context),
|
|
1015
|
+
});
|
|
1016
|
+
};
|
|
829
1017
|
const se_RetrievalFilter = (input, context) => {
|
|
830
1018
|
return RetrievalFilter.visit(input, {
|
|
831
1019
|
andAll: (value) => ({ andAll: se_RetrievalFilterList(value, context) }),
|
|
@@ -1015,6 +1203,23 @@ const de_InferenceConfiguration = (output, context) => {
|
|
|
1015
1203
|
topP: __limitedParseFloat32,
|
|
1016
1204
|
});
|
|
1017
1205
|
};
|
|
1206
|
+
const de_InlineAgentFilePart = (output, context) => {
|
|
1207
|
+
return take(output, {
|
|
1208
|
+
files: (_) => de_OutputFiles(_, context),
|
|
1209
|
+
});
|
|
1210
|
+
};
|
|
1211
|
+
const de_InlineAgentPayloadPart = (output, context) => {
|
|
1212
|
+
return take(output, {
|
|
1213
|
+
attribution: (_) => de_Attribution(_, context),
|
|
1214
|
+
bytes: context.base64Decoder,
|
|
1215
|
+
});
|
|
1216
|
+
};
|
|
1217
|
+
const de_InlineAgentTracePart = (output, context) => {
|
|
1218
|
+
return take(output, {
|
|
1219
|
+
sessionId: __expectString,
|
|
1220
|
+
trace: (_) => de_Trace(__expectUnion(_), context),
|
|
1221
|
+
});
|
|
1222
|
+
};
|
|
1018
1223
|
const de_KnowledgeBaseLookupOutput = (output, context) => {
|
|
1019
1224
|
return take(output, {
|
|
1020
1225
|
retrievedReferences: (_) => de_RetrievedReferences(_, context),
|
|
@@ -1186,6 +1391,11 @@ const de_RetrievedReferences = (output, context) => {
|
|
|
1186
1391
|
return retVal;
|
|
1187
1392
|
};
|
|
1188
1393
|
const de_Trace = (output, context) => {
|
|
1394
|
+
if (output.customOrchestrationTrace != null) {
|
|
1395
|
+
return {
|
|
1396
|
+
customOrchestrationTrace: _json(output.customOrchestrationTrace),
|
|
1397
|
+
};
|
|
1398
|
+
}
|
|
1189
1399
|
if (output.failureTrace != null) {
|
|
1190
1400
|
return {
|
|
1191
1401
|
failureTrace: _json(output.failureTrace),
|
|
@@ -4,6 +4,7 @@ import { DeleteAgentMemoryCommandInput, DeleteAgentMemoryCommandOutput } from ".
|
|
|
4
4
|
import { GetAgentMemoryCommandInput, GetAgentMemoryCommandOutput } from "./commands/GetAgentMemoryCommand";
|
|
5
5
|
import { InvokeAgentCommandInput, InvokeAgentCommandOutput } from "./commands/InvokeAgentCommand";
|
|
6
6
|
import { InvokeFlowCommandInput, InvokeFlowCommandOutput } from "./commands/InvokeFlowCommand";
|
|
7
|
+
import { InvokeInlineAgentCommandInput, InvokeInlineAgentCommandOutput } from "./commands/InvokeInlineAgentCommand";
|
|
7
8
|
import { OptimizePromptCommandInput, OptimizePromptCommandOutput } from "./commands/OptimizePromptCommand";
|
|
8
9
|
import { RetrieveAndGenerateCommandInput, RetrieveAndGenerateCommandOutput } from "./commands/RetrieveAndGenerateCommand";
|
|
9
10
|
import { RetrieveCommandInput, RetrieveCommandOutput } from "./commands/RetrieveCommand";
|
|
@@ -32,6 +33,12 @@ export interface BedrockAgentRuntime {
|
|
|
32
33
|
invokeFlow(args: InvokeFlowCommandInput, options?: __HttpHandlerOptions): Promise<InvokeFlowCommandOutput>;
|
|
33
34
|
invokeFlow(args: InvokeFlowCommandInput, cb: (err: any, data?: InvokeFlowCommandOutput) => void): void;
|
|
34
35
|
invokeFlow(args: InvokeFlowCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: InvokeFlowCommandOutput) => void): void;
|
|
36
|
+
/**
|
|
37
|
+
* @see {@link InvokeInlineAgentCommand}
|
|
38
|
+
*/
|
|
39
|
+
invokeInlineAgent(args: InvokeInlineAgentCommandInput, options?: __HttpHandlerOptions): Promise<InvokeInlineAgentCommandOutput>;
|
|
40
|
+
invokeInlineAgent(args: InvokeInlineAgentCommandInput, cb: (err: any, data?: InvokeInlineAgentCommandOutput) => void): void;
|
|
41
|
+
invokeInlineAgent(args: InvokeInlineAgentCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: InvokeInlineAgentCommandOutput) => void): void;
|
|
35
42
|
/**
|
|
36
43
|
* @see {@link OptimizePromptCommand}
|
|
37
44
|
*/
|
|
@@ -12,6 +12,7 @@ import { DeleteAgentMemoryCommandInput, DeleteAgentMemoryCommandOutput } from ".
|
|
|
12
12
|
import { GetAgentMemoryCommandInput, GetAgentMemoryCommandOutput } from "./commands/GetAgentMemoryCommand";
|
|
13
13
|
import { InvokeAgentCommandInput, InvokeAgentCommandOutput } from "./commands/InvokeAgentCommand";
|
|
14
14
|
import { InvokeFlowCommandInput, InvokeFlowCommandOutput } from "./commands/InvokeFlowCommand";
|
|
15
|
+
import { InvokeInlineAgentCommandInput, InvokeInlineAgentCommandOutput } from "./commands/InvokeInlineAgentCommand";
|
|
15
16
|
import { OptimizePromptCommandInput, OptimizePromptCommandOutput } from "./commands/OptimizePromptCommand";
|
|
16
17
|
import { RetrieveAndGenerateCommandInput, RetrieveAndGenerateCommandOutput } from "./commands/RetrieveAndGenerateCommand";
|
|
17
18
|
import { RetrieveCommandInput, RetrieveCommandOutput } from "./commands/RetrieveCommand";
|
|
@@ -21,11 +22,11 @@ export { __Client };
|
|
|
21
22
|
/**
|
|
22
23
|
* @public
|
|
23
24
|
*/
|
|
24
|
-
export type ServiceInputTypes = DeleteAgentMemoryCommandInput | GetAgentMemoryCommandInput | InvokeAgentCommandInput | InvokeFlowCommandInput | OptimizePromptCommandInput | RetrieveAndGenerateCommandInput | RetrieveCommandInput;
|
|
25
|
+
export type ServiceInputTypes = DeleteAgentMemoryCommandInput | GetAgentMemoryCommandInput | InvokeAgentCommandInput | InvokeFlowCommandInput | InvokeInlineAgentCommandInput | OptimizePromptCommandInput | RetrieveAndGenerateCommandInput | RetrieveCommandInput;
|
|
25
26
|
/**
|
|
26
27
|
* @public
|
|
27
28
|
*/
|
|
28
|
-
export type ServiceOutputTypes = DeleteAgentMemoryCommandOutput | GetAgentMemoryCommandOutput | InvokeAgentCommandOutput | InvokeFlowCommandOutput | OptimizePromptCommandOutput | RetrieveAndGenerateCommandOutput | RetrieveCommandOutput;
|
|
29
|
+
export type ServiceOutputTypes = DeleteAgentMemoryCommandOutput | GetAgentMemoryCommandOutput | InvokeAgentCommandOutput | InvokeFlowCommandOutput | InvokeInlineAgentCommandOutput | OptimizePromptCommandOutput | RetrieveAndGenerateCommandOutput | RetrieveCommandOutput;
|
|
29
30
|
/**
|
|
30
31
|
* @public
|
|
31
32
|
*/
|