@aws-sdk/client-bedrock-agent-runtime 3.758.0 → 3.765.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 +295 -24
- package/dist-es/models/models_0.js +42 -5
- package/dist-es/models/models_1.js +21 -4
- package/dist-es/protocols/Aws_restJson1.js +213 -5
- package/dist-types/commands/CreateSessionCommand.d.ts +1 -1
- package/dist-types/commands/InvokeAgentCommand.d.ts +49 -0
- package/dist-types/commands/InvokeInlineAgentCommand.d.ts +269 -64
- 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/models/models_0.d.ts +244 -106
- package/dist-types/models/models_1.d.ts +256 -66
- 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/models/models_0.d.ts +69 -25
- package/dist-types/ts3.4/models/models_1.d.ts +46 -11
- package/package.json +1 -1
|
@@ -32,6 +32,9 @@ export const ExecutionType = {
|
|
|
32
32
|
export const ActionGroupSignature = {
|
|
33
33
|
AMAZON_CODEINTERPRETER: "AMAZON.CodeInterpreter",
|
|
34
34
|
AMAZON_USERINPUT: "AMAZON.UserInput",
|
|
35
|
+
ANTHROPIC_BASH: "ANTHROPIC.Bash",
|
|
36
|
+
ANTHROPIC_COMPUTER: "ANTHROPIC.Computer",
|
|
37
|
+
ANTHROPIC_TEXTEDITOR: "ANTHROPIC.TextEditor",
|
|
35
38
|
};
|
|
36
39
|
export const ActionInvocationType = {
|
|
37
40
|
RESULT: "RESULT",
|
|
@@ -67,10 +70,29 @@ export var FunctionSchema;
|
|
|
67
70
|
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
68
71
|
};
|
|
69
72
|
})(FunctionSchema || (FunctionSchema = {}));
|
|
73
|
+
export const AgentCollaboration = {
|
|
74
|
+
DISABLED: "DISABLED",
|
|
75
|
+
SUPERVISOR: "SUPERVISOR",
|
|
76
|
+
SUPERVISOR_ROUTER: "SUPERVISOR_ROUTER",
|
|
77
|
+
};
|
|
70
78
|
export const ConfirmationState = {
|
|
71
79
|
CONFIRM: "CONFIRM",
|
|
72
80
|
DENY: "DENY",
|
|
73
81
|
};
|
|
82
|
+
export const ImageInputFormat = {
|
|
83
|
+
GIF: "gif",
|
|
84
|
+
JPEG: "jpeg",
|
|
85
|
+
PNG: "png",
|
|
86
|
+
WEBP: "webp",
|
|
87
|
+
};
|
|
88
|
+
export var ImageInputSource;
|
|
89
|
+
(function (ImageInputSource) {
|
|
90
|
+
ImageInputSource.visit = (value, visitor) => {
|
|
91
|
+
if (value.bytes !== undefined)
|
|
92
|
+
return visitor.bytes(value.bytes);
|
|
93
|
+
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
94
|
+
};
|
|
95
|
+
})(ImageInputSource || (ImageInputSource = {}));
|
|
74
96
|
export const ResponseState = {
|
|
75
97
|
FAILURE: "FAILURE",
|
|
76
98
|
REPROMPT: "REPROMPT",
|
|
@@ -619,6 +641,10 @@ export var ResponseStream;
|
|
|
619
641
|
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
620
642
|
};
|
|
621
643
|
})(ResponseStream || (ResponseStream = {}));
|
|
644
|
+
export const RelayConversationHistory = {
|
|
645
|
+
DISABLED: "DISABLED",
|
|
646
|
+
TO_COLLABORATOR: "TO_COLLABORATOR",
|
|
647
|
+
};
|
|
622
648
|
export const PromptState = {
|
|
623
649
|
DISABLED: "DISABLED",
|
|
624
650
|
ENABLED: "ENABLED",
|
|
@@ -841,6 +867,9 @@ export const AgentActionGroupFilterSensitiveLog = (obj) => ({
|
|
|
841
867
|
export const ApiResultFilterSensitiveLog = (obj) => ({
|
|
842
868
|
...obj,
|
|
843
869
|
...(obj.apiPath && { apiPath: SENSITIVE_STRING }),
|
|
870
|
+
...(obj.responseBody && {
|
|
871
|
+
responseBody: Object.entries(obj.responseBody).reduce((acc, [key, value]) => ((acc[key] = value), acc), {}),
|
|
872
|
+
}),
|
|
844
873
|
});
|
|
845
874
|
export const InvocationResultMemberFilterSensitiveLog = (obj) => {
|
|
846
875
|
if (obj.apiResult !== undefined)
|
|
@@ -1391,12 +1420,10 @@ export const InvokeAgentResponseFilterSensitiveLog = (obj) => ({
|
|
|
1391
1420
|
...obj,
|
|
1392
1421
|
...(obj.completion && { completion: "STREAMING_CONTENT" }),
|
|
1393
1422
|
});
|
|
1394
|
-
export const
|
|
1423
|
+
export const CollaboratorConfigurationFilterSensitiveLog = (obj) => ({
|
|
1395
1424
|
...obj,
|
|
1396
|
-
...(obj.
|
|
1397
|
-
|
|
1398
|
-
}),
|
|
1399
|
-
...(obj.files && { files: obj.files.map((item) => InputFileFilterSensitiveLog(item)) }),
|
|
1425
|
+
...(obj.collaboratorName && { collaboratorName: SENSITIVE_STRING }),
|
|
1426
|
+
...(obj.collaboratorInstruction && { collaboratorInstruction: SENSITIVE_STRING }),
|
|
1400
1427
|
});
|
|
1401
1428
|
export const PromptConfigurationFilterSensitiveLog = (obj) => ({
|
|
1402
1429
|
...obj,
|
|
@@ -1408,6 +1435,16 @@ export const PromptOverrideConfigurationFilterSensitiveLog = (obj) => ({
|
|
|
1408
1435
|
promptConfigurations: obj.promptConfigurations.map((item) => PromptConfigurationFilterSensitiveLog(item)),
|
|
1409
1436
|
}),
|
|
1410
1437
|
});
|
|
1438
|
+
export const InlineSessionStateFilterSensitiveLog = (obj) => ({
|
|
1439
|
+
...obj,
|
|
1440
|
+
...(obj.returnControlInvocationResults && {
|
|
1441
|
+
returnControlInvocationResults: obj.returnControlInvocationResults.map((item) => InvocationResultMemberFilterSensitiveLog(item)),
|
|
1442
|
+
}),
|
|
1443
|
+
...(obj.files && { files: obj.files.map((item) => InputFileFilterSensitiveLog(item)) }),
|
|
1444
|
+
...(obj.conversationHistory && {
|
|
1445
|
+
conversationHistory: ConversationHistoryFilterSensitiveLog(obj.conversationHistory),
|
|
1446
|
+
}),
|
|
1447
|
+
});
|
|
1411
1448
|
export const InlineAgentPayloadPartFilterSensitiveLog = (obj) => ({
|
|
1412
1449
|
...obj,
|
|
1413
1450
|
...(obj.bytes && { bytes: SENSITIVE_STRING }),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SENSITIVE_STRING } from "@smithy/smithy-client";
|
|
2
|
-
import { AgentActionGroupFilterSensitiveLog, ConversationHistoryFilterSensitiveLog, ExternalSourcesRetrieveAndGenerateConfigurationFilterSensitiveLog, GenerationConfigurationFilterSensitiveLog, ImplicitFilterConfigurationFilterSensitiveLog, InlineSessionStateFilterSensitiveLog, InputFileFilterSensitiveLog, InvocationResultMemberFilterSensitiveLog, OrchestrationConfigurationFilterSensitiveLog, VectorSearchRerankingConfigurationFilterSensitiveLog, } from "./models_0";
|
|
2
|
+
import { AgentActionGroupFilterSensitiveLog, CollaboratorConfigurationFilterSensitiveLog, ConversationHistoryFilterSensitiveLog, ExternalSourcesRetrieveAndGenerateConfigurationFilterSensitiveLog, GenerationConfigurationFilterSensitiveLog, ImplicitFilterConfigurationFilterSensitiveLog, InlineSessionStateFilterSensitiveLog, InputFileFilterSensitiveLog, InvocationResultMemberFilterSensitiveLog, OrchestrationConfigurationFilterSensitiveLog, VectorSearchRerankingConfigurationFilterSensitiveLog, } from "./models_0";
|
|
3
3
|
export var RetrievalFilter;
|
|
4
4
|
(function (RetrievalFilter) {
|
|
5
5
|
RetrievalFilter.visit = (value, visitor) => {
|
|
@@ -119,16 +119,18 @@ export const RetrieveAndGenerateConfigurationFilterSensitiveLog = (obj) => ({
|
|
|
119
119
|
externalSourcesConfiguration: ExternalSourcesRetrieveAndGenerateConfigurationFilterSensitiveLog(obj.externalSourcesConfiguration),
|
|
120
120
|
}),
|
|
121
121
|
});
|
|
122
|
-
export const
|
|
122
|
+
export const CollaboratorFilterSensitiveLog = (obj) => ({
|
|
123
123
|
...obj,
|
|
124
|
-
...(obj.inputText && { inputText: SENSITIVE_STRING }),
|
|
125
|
-
...(obj.inlineSessionState && { inlineSessionState: InlineSessionStateFilterSensitiveLog(obj.inlineSessionState) }),
|
|
126
124
|
...(obj.instruction && { instruction: SENSITIVE_STRING }),
|
|
127
125
|
...(obj.actionGroups && { actionGroups: obj.actionGroups.map((item) => AgentActionGroupFilterSensitiveLog(item)) }),
|
|
128
126
|
...(obj.knowledgeBases && {
|
|
129
127
|
knowledgeBases: obj.knowledgeBases.map((item) => KnowledgeBaseFilterSensitiveLog(item)),
|
|
130
128
|
}),
|
|
131
129
|
...(obj.promptOverrideConfiguration && { promptOverrideConfiguration: SENSITIVE_STRING }),
|
|
130
|
+
...(obj.collaboratorConfigurations && {
|
|
131
|
+
collaboratorConfigurations: obj.collaboratorConfigurations.map((item) => CollaboratorConfigurationFilterSensitiveLog(item)),
|
|
132
|
+
}),
|
|
133
|
+
...(obj.agentName && { agentName: SENSITIVE_STRING }),
|
|
132
134
|
});
|
|
133
135
|
export const RetrieveAndGenerateRequestFilterSensitiveLog = (obj) => ({
|
|
134
136
|
...obj,
|
|
@@ -162,3 +164,18 @@ export const InvokeAgentRequestFilterSensitiveLog = (obj) => ({
|
|
|
162
164
|
...(obj.sessionState && { sessionState: SessionStateFilterSensitiveLog(obj.sessionState) }),
|
|
163
165
|
...(obj.inputText && { inputText: SENSITIVE_STRING }),
|
|
164
166
|
});
|
|
167
|
+
export const InvokeInlineAgentRequestFilterSensitiveLog = (obj) => ({
|
|
168
|
+
...obj,
|
|
169
|
+
...(obj.instruction && { instruction: SENSITIVE_STRING }),
|
|
170
|
+
...(obj.actionGroups && { actionGroups: obj.actionGroups.map((item) => AgentActionGroupFilterSensitiveLog(item)) }),
|
|
171
|
+
...(obj.knowledgeBases && {
|
|
172
|
+
knowledgeBases: obj.knowledgeBases.map((item) => KnowledgeBaseFilterSensitiveLog(item)),
|
|
173
|
+
}),
|
|
174
|
+
...(obj.promptOverrideConfiguration && { promptOverrideConfiguration: SENSITIVE_STRING }),
|
|
175
|
+
...(obj.collaboratorConfigurations && {
|
|
176
|
+
collaboratorConfigurations: obj.collaboratorConfigurations.map((item) => CollaboratorConfigurationFilterSensitiveLog(item)),
|
|
177
|
+
}),
|
|
178
|
+
...(obj.inputText && { inputText: SENSITIVE_STRING }),
|
|
179
|
+
...(obj.inlineSessionState && { inlineSessionState: InlineSessionStateFilterSensitiveLog(obj.inlineSessionState) }),
|
|
180
|
+
...(obj.collaborators && { collaborators: obj.collaborators.map((item) => CollaboratorFilterSensitiveLog(item)) }),
|
|
181
|
+
});
|
|
@@ -2,7 +2,7 @@ import { awsExpectUnion as __expectUnion, loadRestJsonErrorCode, parseJsonBody a
|
|
|
2
2
|
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, isSerializableHeaderValue, limitedParseDouble as __limitedParseDouble, limitedParseFloat32 as __limitedParseFloat32, map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, serializeDateTime as __serializeDateTime, serializeFloat as __serializeFloat, take, withBaseException, } from "@smithy/smithy-client";
|
|
4
4
|
import { BedrockAgentRuntimeServiceException as __BaseException } from "../models/BedrockAgentRuntimeServiceException";
|
|
5
|
-
import { AccessDeniedException, BadGatewayException, BedrockSessionContentBlock, ConflictException, DependencyFailedException, FlowInputContent, ImageSource, InternalServerException, InvocationStepPayload, ModelNotReadyException, ResourceNotFoundException, ServiceQuotaExceededException, ThrottlingException, ValidationException, } from "../models/models_0";
|
|
5
|
+
import { AccessDeniedException, BadGatewayException, BedrockSessionContentBlock, ConflictException, DependencyFailedException, FlowInputContent, ImageInputSource, ImageSource, InternalServerException, InvocationResultMember, InvocationStepPayload, ModelNotReadyException, ResourceNotFoundException, ServiceQuotaExceededException, ThrottlingException, ValidationException, } from "../models/models_0";
|
|
6
6
|
import { RetrievalFilter, } from "../models/models_1";
|
|
7
7
|
export const se_CreateInvocationCommand = async (input, context) => {
|
|
8
8
|
const b = rb(input, context);
|
|
@@ -171,7 +171,10 @@ export const se_InvokeInlineAgentCommand = async (input, context) => {
|
|
|
171
171
|
let body;
|
|
172
172
|
body = JSON.stringify(take(input, {
|
|
173
173
|
actionGroups: (_) => _json(_),
|
|
174
|
+
agentCollaboration: [],
|
|
174
175
|
bedrockModelConfigurations: (_) => _json(_),
|
|
176
|
+
collaboratorConfigurations: (_) => _json(_),
|
|
177
|
+
collaborators: (_) => se_Collaborators(_, context),
|
|
175
178
|
customerEncryptionKeyArn: [],
|
|
176
179
|
enableTrace: [],
|
|
177
180
|
endSession: [],
|
|
@@ -1418,6 +1421,18 @@ const se_AdditionalModelRequestFields = (input, context) => {
|
|
|
1418
1421
|
const se_AdditionalModelRequestFieldsValue = (input, context) => {
|
|
1419
1422
|
return input;
|
|
1420
1423
|
};
|
|
1424
|
+
const se_ApiResult = (input, context) => {
|
|
1425
|
+
return take(input, {
|
|
1426
|
+
actionGroup: [],
|
|
1427
|
+
agentId: [],
|
|
1428
|
+
apiPath: [],
|
|
1429
|
+
confirmationState: [],
|
|
1430
|
+
httpMethod: [],
|
|
1431
|
+
httpStatusCode: [],
|
|
1432
|
+
responseBody: (_) => se_ResponseBody(_, context),
|
|
1433
|
+
responseState: [],
|
|
1434
|
+
});
|
|
1435
|
+
};
|
|
1421
1436
|
const se_BedrockRerankingConfiguration = (input, context) => {
|
|
1422
1437
|
return take(input, {
|
|
1423
1438
|
modelConfiguration: (_) => se_BedrockRerankingModelConfiguration(_, context),
|
|
@@ -1457,6 +1472,34 @@ const se_ByteContentFile = (input, context) => {
|
|
|
1457
1472
|
mediaType: [],
|
|
1458
1473
|
});
|
|
1459
1474
|
};
|
|
1475
|
+
const se_Collaborator = (input, context) => {
|
|
1476
|
+
return take(input, {
|
|
1477
|
+
actionGroups: _json,
|
|
1478
|
+
agentCollaboration: [],
|
|
1479
|
+
agentName: [],
|
|
1480
|
+
collaboratorConfigurations: _json,
|
|
1481
|
+
customerEncryptionKeyArn: [],
|
|
1482
|
+
foundationModel: [],
|
|
1483
|
+
guardrailConfiguration: _json,
|
|
1484
|
+
idleSessionTTLInSeconds: [],
|
|
1485
|
+
instruction: [],
|
|
1486
|
+
knowledgeBases: (_) => se_KnowledgeBases(_, context),
|
|
1487
|
+
promptOverrideConfiguration: (_) => se_PromptOverrideConfiguration(_, context),
|
|
1488
|
+
});
|
|
1489
|
+
};
|
|
1490
|
+
const se_Collaborators = (input, context) => {
|
|
1491
|
+
return input
|
|
1492
|
+
.filter((e) => e != null)
|
|
1493
|
+
.map((entry) => {
|
|
1494
|
+
return se_Collaborator(entry, context);
|
|
1495
|
+
});
|
|
1496
|
+
};
|
|
1497
|
+
const se_ContentBody = (input, context) => {
|
|
1498
|
+
return take(input, {
|
|
1499
|
+
body: [],
|
|
1500
|
+
images: (_) => se_ImageInputs(_, context),
|
|
1501
|
+
});
|
|
1502
|
+
};
|
|
1460
1503
|
const se_ExternalSource = (input, context) => {
|
|
1461
1504
|
return take(input, {
|
|
1462
1505
|
byteContent: (_) => se_ByteContentDoc(_, context),
|
|
@@ -1524,6 +1567,16 @@ const se_FlowInputs = (input, context) => {
|
|
|
1524
1567
|
return se_FlowInput(entry, context);
|
|
1525
1568
|
});
|
|
1526
1569
|
};
|
|
1570
|
+
const se_FunctionResult = (input, context) => {
|
|
1571
|
+
return take(input, {
|
|
1572
|
+
actionGroup: [],
|
|
1573
|
+
agentId: [],
|
|
1574
|
+
confirmationState: [],
|
|
1575
|
+
function: [],
|
|
1576
|
+
responseBody: (_) => se_ResponseBody(_, context),
|
|
1577
|
+
responseState: [],
|
|
1578
|
+
});
|
|
1579
|
+
};
|
|
1527
1580
|
const se_GenerationConfiguration = (input, context) => {
|
|
1528
1581
|
return take(input, {
|
|
1529
1582
|
additionalModelRequestFields: (_) => se_AdditionalModelRequestFields(_, context),
|
|
@@ -1539,6 +1592,25 @@ const se_ImageBlock = (input, context) => {
|
|
|
1539
1592
|
source: (_) => se_ImageSource(_, context),
|
|
1540
1593
|
});
|
|
1541
1594
|
};
|
|
1595
|
+
const se_ImageInput = (input, context) => {
|
|
1596
|
+
return take(input, {
|
|
1597
|
+
format: [],
|
|
1598
|
+
source: (_) => se_ImageInputSource(_, context),
|
|
1599
|
+
});
|
|
1600
|
+
};
|
|
1601
|
+
const se_ImageInputs = (input, context) => {
|
|
1602
|
+
return input
|
|
1603
|
+
.filter((e) => e != null)
|
|
1604
|
+
.map((entry) => {
|
|
1605
|
+
return se_ImageInput(entry, context);
|
|
1606
|
+
});
|
|
1607
|
+
};
|
|
1608
|
+
const se_ImageInputSource = (input, context) => {
|
|
1609
|
+
return ImageInputSource.visit(input, {
|
|
1610
|
+
bytes: (value) => ({ bytes: context.base64Encoder(value) }),
|
|
1611
|
+
_: (name, value) => ({ [name]: value }),
|
|
1612
|
+
});
|
|
1613
|
+
};
|
|
1542
1614
|
const se_ImageSource = (input, context) => {
|
|
1543
1615
|
return ImageSource.visit(input, {
|
|
1544
1616
|
bytes: (value) => ({ bytes: context.base64Encoder(value) }),
|
|
@@ -1562,10 +1634,11 @@ const se_InferenceConfiguration = (input, context) => {
|
|
|
1562
1634
|
};
|
|
1563
1635
|
const se_InlineSessionState = (input, context) => {
|
|
1564
1636
|
return take(input, {
|
|
1637
|
+
conversationHistory: _json,
|
|
1565
1638
|
files: (_) => se_InputFiles(_, context),
|
|
1566
1639
|
invocationId: [],
|
|
1567
1640
|
promptSessionAttributes: _json,
|
|
1568
|
-
returnControlInvocationResults:
|
|
1641
|
+
returnControlInvocationResults: (_) => se_ReturnControlInvocationResults(_, context),
|
|
1569
1642
|
sessionAttributes: _json,
|
|
1570
1643
|
});
|
|
1571
1644
|
};
|
|
@@ -1583,6 +1656,13 @@ const se_InputFiles = (input, context) => {
|
|
|
1583
1656
|
return se_InputFile(entry, context);
|
|
1584
1657
|
});
|
|
1585
1658
|
};
|
|
1659
|
+
const se_InvocationResultMember = (input, context) => {
|
|
1660
|
+
return InvocationResultMember.visit(input, {
|
|
1661
|
+
apiResult: (value) => ({ apiResult: se_ApiResult(value, context) }),
|
|
1662
|
+
functionResult: (value) => ({ functionResult: se_FunctionResult(value, context) }),
|
|
1663
|
+
_: (name, value) => ({ [name]: value }),
|
|
1664
|
+
});
|
|
1665
|
+
};
|
|
1586
1666
|
const se_InvocationStepPayload = (input, context) => {
|
|
1587
1667
|
return InvocationStepPayload.visit(input, {
|
|
1588
1668
|
contentBlocks: (value) => ({ contentBlocks: se_BedrockSessionContentBlocks(value, context) }),
|
|
@@ -1652,6 +1732,7 @@ const se_PromptConfiguration = (input, context) => {
|
|
|
1652
1732
|
return take(input, {
|
|
1653
1733
|
additionalModelRequestFields: (_) => se_Document(_, context),
|
|
1654
1734
|
basePromptTemplate: [],
|
|
1735
|
+
foundationModel: [],
|
|
1655
1736
|
inferenceConfiguration: (_) => se_InferenceConfiguration(_, context),
|
|
1656
1737
|
parserMode: [],
|
|
1657
1738
|
promptCreationMode: [],
|
|
@@ -1698,6 +1779,15 @@ const se_RerankSourcesList = (input, context) => {
|
|
|
1698
1779
|
return se_RerankSource(entry, context);
|
|
1699
1780
|
});
|
|
1700
1781
|
};
|
|
1782
|
+
const se_ResponseBody = (input, context) => {
|
|
1783
|
+
return Object.entries(input).reduce((acc, [key, value]) => {
|
|
1784
|
+
if (value === null) {
|
|
1785
|
+
return acc;
|
|
1786
|
+
}
|
|
1787
|
+
acc[key] = se_ContentBody(value, context);
|
|
1788
|
+
return acc;
|
|
1789
|
+
}, {});
|
|
1790
|
+
};
|
|
1701
1791
|
const se_RetrievalFilter = (input, context) => {
|
|
1702
1792
|
return RetrievalFilter.visit(input, {
|
|
1703
1793
|
andAll: (value) => ({ andAll: se_RetrievalFilterList(value, context) }),
|
|
@@ -1730,6 +1820,13 @@ const se_RetrieveAndGenerateConfiguration = (input, context) => {
|
|
|
1730
1820
|
type: [],
|
|
1731
1821
|
});
|
|
1732
1822
|
};
|
|
1823
|
+
const se_ReturnControlInvocationResults = (input, context) => {
|
|
1824
|
+
return input
|
|
1825
|
+
.filter((e) => e != null)
|
|
1826
|
+
.map((entry) => {
|
|
1827
|
+
return se_InvocationResultMember(entry, context);
|
|
1828
|
+
});
|
|
1829
|
+
};
|
|
1733
1830
|
const se_SessionState = (input, context) => {
|
|
1734
1831
|
return take(input, {
|
|
1735
1832
|
conversationHistory: _json,
|
|
@@ -1737,7 +1834,7 @@ const se_SessionState = (input, context) => {
|
|
|
1737
1834
|
invocationId: [],
|
|
1738
1835
|
knowledgeBaseConfigurations: (_) => se_KnowledgeBaseConfigurations(_, context),
|
|
1739
1836
|
promptSessionAttributes: _json,
|
|
1740
|
-
returnControlInvocationResults:
|
|
1837
|
+
returnControlInvocationResults: (_) => se_ReturnControlInvocationResults(_, context),
|
|
1741
1838
|
sessionAttributes: _json,
|
|
1742
1839
|
});
|
|
1743
1840
|
};
|
|
@@ -1771,6 +1868,20 @@ const se_VectorSearchRerankingConfiguration = (input, context) => {
|
|
|
1771
1868
|
const se_Document = (input, context) => {
|
|
1772
1869
|
return input;
|
|
1773
1870
|
};
|
|
1871
|
+
const de_AgentCollaboratorInputPayload = (output, context) => {
|
|
1872
|
+
return take(output, {
|
|
1873
|
+
returnControlResults: (_) => de_ReturnControlResults(_, context),
|
|
1874
|
+
text: __expectString,
|
|
1875
|
+
type: __expectString,
|
|
1876
|
+
});
|
|
1877
|
+
};
|
|
1878
|
+
const de_AgentCollaboratorInvocationInput = (output, context) => {
|
|
1879
|
+
return take(output, {
|
|
1880
|
+
agentCollaboratorAliasArn: __expectString,
|
|
1881
|
+
agentCollaboratorName: __expectString,
|
|
1882
|
+
input: (_) => de_AgentCollaboratorInputPayload(_, context),
|
|
1883
|
+
});
|
|
1884
|
+
};
|
|
1774
1885
|
const de_AgentCollaboratorInvocationOutput = (output, context) => {
|
|
1775
1886
|
return take(output, {
|
|
1776
1887
|
agentCollaboratorAliasArn: __expectString,
|
|
@@ -1778,6 +1889,18 @@ const de_AgentCollaboratorInvocationOutput = (output, context) => {
|
|
|
1778
1889
|
output: _json,
|
|
1779
1890
|
});
|
|
1780
1891
|
};
|
|
1892
|
+
const de_ApiResult = (output, context) => {
|
|
1893
|
+
return take(output, {
|
|
1894
|
+
actionGroup: __expectString,
|
|
1895
|
+
agentId: __expectString,
|
|
1896
|
+
apiPath: __expectString,
|
|
1897
|
+
confirmationState: __expectString,
|
|
1898
|
+
httpMethod: __expectString,
|
|
1899
|
+
httpStatusCode: __expectInt32,
|
|
1900
|
+
responseBody: (_) => de_ResponseBody(_, context),
|
|
1901
|
+
responseState: __expectString,
|
|
1902
|
+
});
|
|
1903
|
+
};
|
|
1781
1904
|
const de_Attribution = (output, context) => {
|
|
1782
1905
|
return take(output, {
|
|
1783
1906
|
citations: (_) => de_Citations(_, context),
|
|
@@ -1823,6 +1946,12 @@ const de_Citations = (output, context) => {
|
|
|
1823
1946
|
});
|
|
1824
1947
|
return retVal;
|
|
1825
1948
|
};
|
|
1949
|
+
const de_ContentBody = (output, context) => {
|
|
1950
|
+
return take(output, {
|
|
1951
|
+
body: __expectString,
|
|
1952
|
+
images: (_) => de_ImageInputs(_, context),
|
|
1953
|
+
});
|
|
1954
|
+
};
|
|
1826
1955
|
const de_FilePart = (output, context) => {
|
|
1827
1956
|
return take(output, {
|
|
1828
1957
|
files: (_) => de_OutputFiles(_, context),
|
|
@@ -1946,12 +2075,44 @@ const de_FlowTraceNodeOutputFields = (output, context) => {
|
|
|
1946
2075
|
});
|
|
1947
2076
|
return retVal;
|
|
1948
2077
|
};
|
|
2078
|
+
const de_FunctionResult = (output, context) => {
|
|
2079
|
+
return take(output, {
|
|
2080
|
+
actionGroup: __expectString,
|
|
2081
|
+
agentId: __expectString,
|
|
2082
|
+
confirmationState: __expectString,
|
|
2083
|
+
function: __expectString,
|
|
2084
|
+
responseBody: (_) => de_ResponseBody(_, context),
|
|
2085
|
+
responseState: __expectString,
|
|
2086
|
+
});
|
|
2087
|
+
};
|
|
1949
2088
|
const de_ImageBlock = (output, context) => {
|
|
1950
2089
|
return take(output, {
|
|
1951
2090
|
format: __expectString,
|
|
1952
2091
|
source: (_) => de_ImageSource(__expectUnion(_), context),
|
|
1953
2092
|
});
|
|
1954
2093
|
};
|
|
2094
|
+
const de_ImageInput = (output, context) => {
|
|
2095
|
+
return take(output, {
|
|
2096
|
+
format: __expectString,
|
|
2097
|
+
source: (_) => de_ImageInputSource(__expectUnion(_), context),
|
|
2098
|
+
});
|
|
2099
|
+
};
|
|
2100
|
+
const de_ImageInputs = (output, context) => {
|
|
2101
|
+
const retVal = (output || [])
|
|
2102
|
+
.filter((e) => e != null)
|
|
2103
|
+
.map((entry) => {
|
|
2104
|
+
return de_ImageInput(entry, context);
|
|
2105
|
+
});
|
|
2106
|
+
return retVal;
|
|
2107
|
+
};
|
|
2108
|
+
const de_ImageInputSource = (output, context) => {
|
|
2109
|
+
if (output.bytes != null) {
|
|
2110
|
+
return {
|
|
2111
|
+
bytes: context.base64Decoder(output.bytes),
|
|
2112
|
+
};
|
|
2113
|
+
}
|
|
2114
|
+
return { $unknown: Object.entries(output)[0] };
|
|
2115
|
+
};
|
|
1955
2116
|
const de_ImageSource = (output, context) => {
|
|
1956
2117
|
if (output.bytes != null) {
|
|
1957
2118
|
return {
|
|
@@ -1991,6 +2152,29 @@ const de_InlineAgentTracePart = (output, context) => {
|
|
|
1991
2152
|
trace: (_) => de_Trace(__expectUnion(_), context),
|
|
1992
2153
|
});
|
|
1993
2154
|
};
|
|
2155
|
+
const de_InvocationInput = (output, context) => {
|
|
2156
|
+
return take(output, {
|
|
2157
|
+
actionGroupInvocationInput: _json,
|
|
2158
|
+
agentCollaboratorInvocationInput: (_) => de_AgentCollaboratorInvocationInput(_, context),
|
|
2159
|
+
codeInterpreterInvocationInput: _json,
|
|
2160
|
+
invocationType: __expectString,
|
|
2161
|
+
knowledgeBaseLookupInput: _json,
|
|
2162
|
+
traceId: __expectString,
|
|
2163
|
+
});
|
|
2164
|
+
};
|
|
2165
|
+
const de_InvocationResultMember = (output, context) => {
|
|
2166
|
+
if (output.apiResult != null) {
|
|
2167
|
+
return {
|
|
2168
|
+
apiResult: de_ApiResult(output.apiResult, context),
|
|
2169
|
+
};
|
|
2170
|
+
}
|
|
2171
|
+
if (output.functionResult != null) {
|
|
2172
|
+
return {
|
|
2173
|
+
functionResult: de_FunctionResult(output.functionResult, context),
|
|
2174
|
+
};
|
|
2175
|
+
}
|
|
2176
|
+
return { $unknown: Object.entries(output)[0] };
|
|
2177
|
+
};
|
|
1994
2178
|
const de_InvocationStep = (output, context) => {
|
|
1995
2179
|
return take(output, {
|
|
1996
2180
|
invocationId: __expectString,
|
|
@@ -2120,7 +2304,7 @@ const de_OrchestrationModelInvocationOutput = (output, context) => {
|
|
|
2120
2304
|
const de_OrchestrationTrace = (output, context) => {
|
|
2121
2305
|
if (output.invocationInput != null) {
|
|
2122
2306
|
return {
|
|
2123
|
-
invocationInput:
|
|
2307
|
+
invocationInput: de_InvocationInput(output.invocationInput, context),
|
|
2124
2308
|
};
|
|
2125
2309
|
}
|
|
2126
2310
|
if (output.modelInvocationInput != null) {
|
|
@@ -2245,6 +2429,15 @@ const de_RerankResultsList = (output, context) => {
|
|
|
2245
2429
|
});
|
|
2246
2430
|
return retVal;
|
|
2247
2431
|
};
|
|
2432
|
+
const de_ResponseBody = (output, context) => {
|
|
2433
|
+
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
2434
|
+
if (value === null) {
|
|
2435
|
+
return acc;
|
|
2436
|
+
}
|
|
2437
|
+
acc[key] = de_ContentBody(value, context);
|
|
2438
|
+
return acc;
|
|
2439
|
+
}, {});
|
|
2440
|
+
};
|
|
2248
2441
|
const de_RetrievalResultMetadata = (output, context) => {
|
|
2249
2442
|
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
2250
2443
|
if (value === null) {
|
|
@@ -2272,10 +2465,24 @@ const de_RetrievedReferences = (output, context) => {
|
|
|
2272
2465
|
});
|
|
2273
2466
|
return retVal;
|
|
2274
2467
|
};
|
|
2468
|
+
const de_ReturnControlInvocationResults = (output, context) => {
|
|
2469
|
+
const retVal = (output || [])
|
|
2470
|
+
.filter((e) => e != null)
|
|
2471
|
+
.map((entry) => {
|
|
2472
|
+
return de_InvocationResultMember(__expectUnion(entry), context);
|
|
2473
|
+
});
|
|
2474
|
+
return retVal;
|
|
2475
|
+
};
|
|
2476
|
+
const de_ReturnControlResults = (output, context) => {
|
|
2477
|
+
return take(output, {
|
|
2478
|
+
invocationId: __expectString,
|
|
2479
|
+
returnControlInvocationResults: (_) => de_ReturnControlInvocationResults(_, context),
|
|
2480
|
+
});
|
|
2481
|
+
};
|
|
2275
2482
|
const de_RoutingClassifierTrace = (output, context) => {
|
|
2276
2483
|
if (output.invocationInput != null) {
|
|
2277
2484
|
return {
|
|
2278
|
-
invocationInput:
|
|
2485
|
+
invocationInput: de_InvocationInput(output.invocationInput, context),
|
|
2279
2486
|
};
|
|
2280
2487
|
}
|
|
2281
2488
|
if (output.modelInvocationInput != null) {
|
|
@@ -2357,6 +2564,7 @@ const de_TracePart = (output, context) => {
|
|
|
2357
2564
|
agentVersion: __expectString,
|
|
2358
2565
|
callerChain: _json,
|
|
2359
2566
|
collaboratorName: __expectString,
|
|
2567
|
+
eventTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
|
|
2360
2568
|
sessionId: __expectString,
|
|
2361
2569
|
trace: (_) => de_Trace(__expectUnion(_), context),
|
|
2362
2570
|
});
|
|
@@ -37,7 +37,7 @@ declare const CreateSessionCommand_base: {
|
|
|
37
37
|
* <p>
|
|
38
38
|
* You use a session to store state and conversation history for generative AI applications built with open-source frameworks.
|
|
39
39
|
* For Amazon Bedrock Agents, the service automatically manages conversation context and associates them with the agent-specific sessionId you specify in the
|
|
40
|
-
* <a href="https://docs.aws.amazon.com/bedrock/latest/API_agent-runtime_InvokeAgent.html">InvokeAgent</a> API operation.
|
|
40
|
+
* <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_InvokeAgent.html">InvokeAgent</a> API operation.
|
|
41
41
|
* </p>
|
|
42
42
|
* </note>
|
|
43
43
|
* <p>Related APIs:</p>
|
|
@@ -106,6 +106,14 @@ declare const InvokeAgentCommand_base: {
|
|
|
106
106
|
* responseBody: { // ResponseBody
|
|
107
107
|
* "<keys>": { // ContentBody
|
|
108
108
|
* body: "STRING_VALUE",
|
|
109
|
+
* images: [ // ImageInputs
|
|
110
|
+
* { // ImageInput
|
|
111
|
+
* format: "png" || "jpeg" || "gif" || "webp", // required
|
|
112
|
+
* source: { // ImageInputSource Union: only one key present
|
|
113
|
+
* bytes: new Uint8Array(), // e.g. Buffer.from("") or new TextEncoder().encode("")
|
|
114
|
+
* },
|
|
115
|
+
* },
|
|
116
|
+
* ],
|
|
109
117
|
* },
|
|
110
118
|
* },
|
|
111
119
|
* agentId: "STRING_VALUE",
|
|
@@ -117,6 +125,14 @@ declare const InvokeAgentCommand_base: {
|
|
|
117
125
|
* responseBody: {
|
|
118
126
|
* "<keys>": {
|
|
119
127
|
* body: "STRING_VALUE",
|
|
128
|
+
* images: [
|
|
129
|
+
* {
|
|
130
|
+
* format: "png" || "jpeg" || "gif" || "webp", // required
|
|
131
|
+
* source: {// Union: only one key present
|
|
132
|
+
* bytes: new Uint8Array(), // e.g. Buffer.from("") or new TextEncoder().encode("")
|
|
133
|
+
* },
|
|
134
|
+
* },
|
|
135
|
+
* ],
|
|
120
136
|
* },
|
|
121
137
|
* },
|
|
122
138
|
* responseState: "FAILURE" || "REPROMPT",
|
|
@@ -562,6 +578,14 @@ declare const InvokeAgentCommand_base: {
|
|
|
562
578
|
* // responseBody: { // ResponseBody
|
|
563
579
|
* // "<keys>": { // ContentBody
|
|
564
580
|
* // body: "STRING_VALUE",
|
|
581
|
+
* // images: [ // ImageInputs
|
|
582
|
+
* // { // ImageInput
|
|
583
|
+
* // format: "png" || "jpeg" || "gif" || "webp", // required
|
|
584
|
+
* // source: { // ImageInputSource Union: only one key present
|
|
585
|
+
* // bytes: new Uint8Array(),
|
|
586
|
+
* // },
|
|
587
|
+
* // },
|
|
588
|
+
* // ],
|
|
565
589
|
* // },
|
|
566
590
|
* // },
|
|
567
591
|
* // agentId: "STRING_VALUE",
|
|
@@ -573,6 +597,14 @@ declare const InvokeAgentCommand_base: {
|
|
|
573
597
|
* // responseBody: {
|
|
574
598
|
* // "<keys>": {
|
|
575
599
|
* // body: "STRING_VALUE",
|
|
600
|
+
* // images: [
|
|
601
|
+
* // {
|
|
602
|
+
* // format: "png" || "jpeg" || "gif" || "webp", // required
|
|
603
|
+
* // source: {// Union: only one key present
|
|
604
|
+
* // bytes: new Uint8Array(),
|
|
605
|
+
* // },
|
|
606
|
+
* // },
|
|
607
|
+
* // ],
|
|
576
608
|
* // },
|
|
577
609
|
* // },
|
|
578
610
|
* // responseState: "FAILURE" || "REPROMPT",
|
|
@@ -839,6 +871,14 @@ declare const InvokeAgentCommand_base: {
|
|
|
839
871
|
* // responseBody: {
|
|
840
872
|
* // "<keys>": {
|
|
841
873
|
* // body: "STRING_VALUE",
|
|
874
|
+
* // images: [
|
|
875
|
+
* // {
|
|
876
|
+
* // format: "png" || "jpeg" || "gif" || "webp", // required
|
|
877
|
+
* // source: {// Union: only one key present
|
|
878
|
+
* // bytes: new Uint8Array(),
|
|
879
|
+
* // },
|
|
880
|
+
* // },
|
|
881
|
+
* // ],
|
|
842
882
|
* // },
|
|
843
883
|
* // },
|
|
844
884
|
* // agentId: "STRING_VALUE",
|
|
@@ -850,6 +890,14 @@ declare const InvokeAgentCommand_base: {
|
|
|
850
890
|
* // responseBody: {
|
|
851
891
|
* // "<keys>": {
|
|
852
892
|
* // body: "STRING_VALUE",
|
|
893
|
+
* // images: [
|
|
894
|
+
* // {
|
|
895
|
+
* // format: "png" || "jpeg" || "gif" || "webp", // required
|
|
896
|
+
* // source: {// Union: only one key present
|
|
897
|
+
* // bytes: new Uint8Array(),
|
|
898
|
+
* // },
|
|
899
|
+
* // },
|
|
900
|
+
* // ],
|
|
853
901
|
* // },
|
|
854
902
|
* // },
|
|
855
903
|
* // responseState: "FAILURE" || "REPROMPT",
|
|
@@ -1034,6 +1082,7 @@ declare const InvokeAgentCommand_base: {
|
|
|
1034
1082
|
* // agentAliasArn: "STRING_VALUE",
|
|
1035
1083
|
* // },
|
|
1036
1084
|
* // ],
|
|
1085
|
+
* // eventTime: new Date("TIMESTAMP"),
|
|
1037
1086
|
* // collaboratorName: "STRING_VALUE",
|
|
1038
1087
|
* // },
|
|
1039
1088
|
* // returnControl: {
|