@aws-sdk/client-bedrock-agent-runtime 3.751.0 → 3.758.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 +119 -7
- package/dist-cjs/index.js +1009 -55
- package/dist-es/BedrockAgentRuntime.js +28 -0
- package/dist-es/commands/CreateInvocationCommand.js +22 -0
- package/dist-es/commands/CreateSessionCommand.js +22 -0
- package/dist-es/commands/DeleteSessionCommand.js +22 -0
- package/dist-es/commands/EndSessionCommand.js +22 -0
- package/dist-es/commands/GetInvocationStepCommand.js +23 -0
- package/dist-es/commands/GetSessionCommand.js +22 -0
- package/dist-es/commands/InvokeAgentCommand.js +2 -1
- package/dist-es/commands/InvokeInlineAgentCommand.js +2 -1
- package/dist-es/commands/ListInvocationStepsCommand.js +22 -0
- package/dist-es/commands/ListInvocationsCommand.js +22 -0
- package/dist-es/commands/ListSessionsCommand.js +22 -0
- package/dist-es/commands/ListTagsForResourceCommand.js +22 -0
- package/dist-es/commands/PutInvocationStepCommand.js +23 -0
- package/dist-es/commands/RetrieveAndGenerateCommand.js +2 -1
- package/dist-es/commands/RetrieveAndGenerateStreamCommand.js +2 -1
- package/dist-es/commands/RetrieveCommand.js +2 -1
- package/dist-es/commands/TagResourceCommand.js +22 -0
- package/dist-es/commands/UntagResourceCommand.js +22 -0
- package/dist-es/commands/UpdateSessionCommand.js +22 -0
- package/dist-es/commands/index.js +14 -0
- package/dist-es/models/index.js +1 -0
- package/dist-es/models/models_0.js +78 -151
- package/dist-es/models/models_1.js +164 -0
- package/dist-es/pagination/ListInvocationStepsPaginator.js +4 -0
- package/dist-es/pagination/ListInvocationsPaginator.js +4 -0
- package/dist-es/pagination/ListSessionsPaginator.js +4 -0
- package/dist-es/pagination/index.js +3 -0
- package/dist-es/protocols/Aws_restJson1.js +574 -11
- package/dist-types/BedrockAgentRuntime.d.ts +100 -0
- package/dist-types/BedrockAgentRuntimeClient.d.ts +16 -2
- package/dist-types/commands/CreateInvocationCommand.d.ts +115 -0
- package/dist-types/commands/CreateSessionCommand.d.ts +133 -0
- package/dist-types/commands/DeleteSessionCommand.d.ts +89 -0
- package/dist-types/commands/EndSessionCommand.d.ts +93 -0
- package/dist-types/commands/GetInvocationStepCommand.d.ts +109 -0
- package/dist-types/commands/GetSessionCommand.d.ts +94 -0
- package/dist-types/commands/InvokeAgentCommand.d.ts +23 -1
- package/dist-types/commands/InvokeInlineAgentCommand.d.ts +23 -1
- package/dist-types/commands/ListInvocationStepsCommand.d.ts +97 -0
- package/dist-types/commands/ListInvocationsCommand.d.ts +95 -0
- package/dist-types/commands/ListSessionsCommand.d.ts +93 -0
- package/dist-types/commands/ListTagsForResourceCommand.d.ts +88 -0
- package/dist-types/commands/PutInvocationStepCommand.d.ts +134 -0
- package/dist-types/commands/RetrieveAndGenerateCommand.d.ts +2 -1
- package/dist-types/commands/RetrieveAndGenerateStreamCommand.d.ts +2 -1
- package/dist-types/commands/RetrieveCommand.d.ts +2 -1
- package/dist-types/commands/TagResourceCommand.d.ts +90 -0
- package/dist-types/commands/UntagResourceCommand.d.ts +87 -0
- package/dist-types/commands/UpdateSessionCommand.d.ts +96 -0
- package/dist-types/commands/index.d.ts +14 -0
- package/dist-types/models/index.d.ts +1 -0
- package/dist-types/models/models_0.d.ts +582 -635
- package/dist-types/models/models_1.d.ts +919 -0
- package/dist-types/pagination/ListInvocationStepsPaginator.d.ts +7 -0
- package/dist-types/pagination/ListInvocationsPaginator.d.ts +7 -0
- package/dist-types/pagination/ListSessionsPaginator.d.ts +7 -0
- package/dist-types/pagination/index.d.ts +3 -0
- package/dist-types/protocols/Aws_restJson1.d.ts +126 -0
- package/dist-types/ts3.4/BedrockAgentRuntime.d.ts +240 -0
- package/dist-types/ts3.4/BedrockAgentRuntimeClient.d.ts +86 -2
- package/dist-types/ts3.4/commands/CreateInvocationCommand.d.ts +50 -0
- package/dist-types/ts3.4/commands/CreateSessionCommand.d.ts +50 -0
- package/dist-types/ts3.4/commands/DeleteSessionCommand.d.ts +50 -0
- package/dist-types/ts3.4/commands/EndSessionCommand.d.ts +47 -0
- package/dist-types/ts3.4/commands/GetInvocationStepCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/GetSessionCommand.d.ts +47 -0
- package/dist-types/ts3.4/commands/InvokeAgentCommand.d.ts +2 -1
- package/dist-types/ts3.4/commands/InvokeInlineAgentCommand.d.ts +2 -4
- package/dist-types/ts3.4/commands/ListInvocationStepsCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/ListInvocationsCommand.d.ts +50 -0
- package/dist-types/ts3.4/commands/ListSessionsCommand.d.ts +47 -0
- package/dist-types/ts3.4/commands/ListTagsForResourceCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/PutInvocationStepCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/RetrieveAndGenerateCommand.d.ts +2 -4
- package/dist-types/ts3.4/commands/RetrieveAndGenerateStreamCommand.d.ts +2 -4
- package/dist-types/ts3.4/commands/RetrieveCommand.d.ts +2 -1
- package/dist-types/ts3.4/commands/TagResourceCommand.d.ts +47 -0
- package/dist-types/ts3.4/commands/UntagResourceCommand.d.ts +50 -0
- package/dist-types/ts3.4/commands/UpdateSessionCommand.d.ts +50 -0
- package/dist-types/ts3.4/commands/index.d.ts +14 -0
- package/dist-types/ts3.4/models/index.d.ts +1 -0
- package/dist-types/ts3.4/models/models_0.d.ts +262 -365
- package/dist-types/ts3.4/models/models_1.d.ts +416 -0
- package/dist-types/ts3.4/pagination/ListInvocationStepsPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/ListInvocationsPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/ListSessionsPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/index.d.ts +3 -0
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +168 -0
- package/package.json +12 -12
|
@@ -1,8 +1,39 @@
|
|
|
1
1
|
import { awsExpectUnion as __expectUnion, loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody, } from "@aws-sdk/core";
|
|
2
2
|
import { requestBuilder as rb } from "@smithy/core";
|
|
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, serializeFloat as __serializeFloat, take, withBaseException, } from "@smithy/smithy-client";
|
|
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, ConflictException, DependencyFailedException, FlowInputContent, InternalServerException, ModelNotReadyException, ResourceNotFoundException,
|
|
5
|
+
import { AccessDeniedException, BadGatewayException, BedrockSessionContentBlock, ConflictException, DependencyFailedException, FlowInputContent, ImageSource, InternalServerException, InvocationStepPayload, ModelNotReadyException, ResourceNotFoundException, ServiceQuotaExceededException, ThrottlingException, ValidationException, } from "../models/models_0";
|
|
6
|
+
import { RetrievalFilter, } from "../models/models_1";
|
|
7
|
+
export const se_CreateInvocationCommand = async (input, context) => {
|
|
8
|
+
const b = rb(input, context);
|
|
9
|
+
const headers = {
|
|
10
|
+
"content-type": "application/json",
|
|
11
|
+
};
|
|
12
|
+
b.bp("/sessions/{sessionIdentifier}/invocations");
|
|
13
|
+
b.p("sessionIdentifier", () => input.sessionIdentifier, "{sessionIdentifier}", false);
|
|
14
|
+
let body;
|
|
15
|
+
body = JSON.stringify(take(input, {
|
|
16
|
+
description: [],
|
|
17
|
+
invocationId: [],
|
|
18
|
+
}));
|
|
19
|
+
b.m("PUT").h(headers).b(body);
|
|
20
|
+
return b.build();
|
|
21
|
+
};
|
|
22
|
+
export const se_CreateSessionCommand = async (input, context) => {
|
|
23
|
+
const b = rb(input, context);
|
|
24
|
+
const headers = {
|
|
25
|
+
"content-type": "application/json",
|
|
26
|
+
};
|
|
27
|
+
b.bp("/sessions");
|
|
28
|
+
let body;
|
|
29
|
+
body = JSON.stringify(take(input, {
|
|
30
|
+
encryptionKeyArn: [],
|
|
31
|
+
sessionMetadata: (_) => _json(_),
|
|
32
|
+
tags: (_) => _json(_),
|
|
33
|
+
}));
|
|
34
|
+
b.m("PUT").h(headers).b(body);
|
|
35
|
+
return b.build();
|
|
36
|
+
};
|
|
6
37
|
export const se_DeleteAgentMemoryCommand = async (input, context) => {
|
|
7
38
|
const b = rb(input, context);
|
|
8
39
|
const headers = {};
|
|
@@ -17,6 +48,24 @@ export const se_DeleteAgentMemoryCommand = async (input, context) => {
|
|
|
17
48
|
b.m("DELETE").h(headers).q(query).b(body);
|
|
18
49
|
return b.build();
|
|
19
50
|
};
|
|
51
|
+
export const se_DeleteSessionCommand = async (input, context) => {
|
|
52
|
+
const b = rb(input, context);
|
|
53
|
+
const headers = {};
|
|
54
|
+
b.bp("/sessions/{sessionIdentifier}");
|
|
55
|
+
b.p("sessionIdentifier", () => input.sessionIdentifier, "{sessionIdentifier}", false);
|
|
56
|
+
let body;
|
|
57
|
+
b.m("DELETE").h(headers).b(body);
|
|
58
|
+
return b.build();
|
|
59
|
+
};
|
|
60
|
+
export const se_EndSessionCommand = async (input, context) => {
|
|
61
|
+
const b = rb(input, context);
|
|
62
|
+
const headers = {};
|
|
63
|
+
b.bp("/sessions/{sessionIdentifier}");
|
|
64
|
+
b.p("sessionIdentifier", () => input.sessionIdentifier, "{sessionIdentifier}", false);
|
|
65
|
+
let body;
|
|
66
|
+
b.m("PATCH").h(headers).b(body);
|
|
67
|
+
return b.build();
|
|
68
|
+
};
|
|
20
69
|
export const se_GenerateQueryCommand = async (input, context) => {
|
|
21
70
|
const b = rb(input, context);
|
|
22
71
|
const headers = {
|
|
@@ -47,6 +96,30 @@ export const se_GetAgentMemoryCommand = async (input, context) => {
|
|
|
47
96
|
b.m("GET").h(headers).q(query).b(body);
|
|
48
97
|
return b.build();
|
|
49
98
|
};
|
|
99
|
+
export const se_GetInvocationStepCommand = async (input, context) => {
|
|
100
|
+
const b = rb(input, context);
|
|
101
|
+
const headers = {
|
|
102
|
+
"content-type": "application/json",
|
|
103
|
+
};
|
|
104
|
+
b.bp("/sessions/{sessionIdentifier}/invocationSteps/{invocationStepId}");
|
|
105
|
+
b.p("invocationStepId", () => input.invocationStepId, "{invocationStepId}", false);
|
|
106
|
+
b.p("sessionIdentifier", () => input.sessionIdentifier, "{sessionIdentifier}", false);
|
|
107
|
+
let body;
|
|
108
|
+
body = JSON.stringify(take(input, {
|
|
109
|
+
invocationIdentifier: [],
|
|
110
|
+
}));
|
|
111
|
+
b.m("POST").h(headers).b(body);
|
|
112
|
+
return b.build();
|
|
113
|
+
};
|
|
114
|
+
export const se_GetSessionCommand = async (input, context) => {
|
|
115
|
+
const b = rb(input, context);
|
|
116
|
+
const headers = {};
|
|
117
|
+
b.bp("/sessions/{sessionIdentifier}");
|
|
118
|
+
b.p("sessionIdentifier", () => input.sessionIdentifier, "{sessionIdentifier}", false);
|
|
119
|
+
let body;
|
|
120
|
+
b.m("GET").h(headers).b(body);
|
|
121
|
+
return b.build();
|
|
122
|
+
};
|
|
50
123
|
export const se_InvokeAgentCommand = async (input, context) => {
|
|
51
124
|
const b = rb(input, context);
|
|
52
125
|
const headers = map({}, isSerializableHeaderValue, {
|
|
@@ -115,6 +188,58 @@ export const se_InvokeInlineAgentCommand = async (input, context) => {
|
|
|
115
188
|
b.m("POST").h(headers).b(body);
|
|
116
189
|
return b.build();
|
|
117
190
|
};
|
|
191
|
+
export const se_ListInvocationsCommand = async (input, context) => {
|
|
192
|
+
const b = rb(input, context);
|
|
193
|
+
const headers = {};
|
|
194
|
+
b.bp("/sessions/{sessionIdentifier}/invocations");
|
|
195
|
+
b.p("sessionIdentifier", () => input.sessionIdentifier, "{sessionIdentifier}", false);
|
|
196
|
+
const query = map({
|
|
197
|
+
[_nT]: [, input[_nT]],
|
|
198
|
+
[_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
|
|
199
|
+
});
|
|
200
|
+
let body;
|
|
201
|
+
b.m("POST").h(headers).q(query).b(body);
|
|
202
|
+
return b.build();
|
|
203
|
+
};
|
|
204
|
+
export const se_ListInvocationStepsCommand = async (input, context) => {
|
|
205
|
+
const b = rb(input, context);
|
|
206
|
+
const headers = {
|
|
207
|
+
"content-type": "application/json",
|
|
208
|
+
};
|
|
209
|
+
b.bp("/sessions/{sessionIdentifier}/invocationSteps");
|
|
210
|
+
b.p("sessionIdentifier", () => input.sessionIdentifier, "{sessionIdentifier}", false);
|
|
211
|
+
const query = map({
|
|
212
|
+
[_nT]: [, input[_nT]],
|
|
213
|
+
[_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
|
|
214
|
+
});
|
|
215
|
+
let body;
|
|
216
|
+
body = JSON.stringify(take(input, {
|
|
217
|
+
invocationIdentifier: [],
|
|
218
|
+
}));
|
|
219
|
+
b.m("POST").h(headers).q(query).b(body);
|
|
220
|
+
return b.build();
|
|
221
|
+
};
|
|
222
|
+
export const se_ListSessionsCommand = async (input, context) => {
|
|
223
|
+
const b = rb(input, context);
|
|
224
|
+
const headers = {};
|
|
225
|
+
b.bp("/sessions");
|
|
226
|
+
const query = map({
|
|
227
|
+
[_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
|
|
228
|
+
[_nT]: [, input[_nT]],
|
|
229
|
+
});
|
|
230
|
+
let body;
|
|
231
|
+
b.m("POST").h(headers).q(query).b(body);
|
|
232
|
+
return b.build();
|
|
233
|
+
};
|
|
234
|
+
export const se_ListTagsForResourceCommand = async (input, context) => {
|
|
235
|
+
const b = rb(input, context);
|
|
236
|
+
const headers = {};
|
|
237
|
+
b.bp("/tags/{resourceArn}");
|
|
238
|
+
b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
|
|
239
|
+
let body;
|
|
240
|
+
b.m("GET").h(headers).b(body);
|
|
241
|
+
return b.build();
|
|
242
|
+
};
|
|
118
243
|
export const se_OptimizePromptCommand = async (input, context) => {
|
|
119
244
|
const b = rb(input, context);
|
|
120
245
|
const headers = {
|
|
@@ -129,6 +254,23 @@ export const se_OptimizePromptCommand = async (input, context) => {
|
|
|
129
254
|
b.m("POST").h(headers).b(body);
|
|
130
255
|
return b.build();
|
|
131
256
|
};
|
|
257
|
+
export const se_PutInvocationStepCommand = async (input, context) => {
|
|
258
|
+
const b = rb(input, context);
|
|
259
|
+
const headers = {
|
|
260
|
+
"content-type": "application/json",
|
|
261
|
+
};
|
|
262
|
+
b.bp("/sessions/{sessionIdentifier}/invocationSteps");
|
|
263
|
+
b.p("sessionIdentifier", () => input.sessionIdentifier, "{sessionIdentifier}", false);
|
|
264
|
+
let body;
|
|
265
|
+
body = JSON.stringify(take(input, {
|
|
266
|
+
invocationIdentifier: [],
|
|
267
|
+
invocationStepId: [],
|
|
268
|
+
invocationStepTime: (_) => __serializeDateTime(_),
|
|
269
|
+
payload: (_) => se_InvocationStepPayload(_, context),
|
|
270
|
+
}));
|
|
271
|
+
b.m("PUT").h(headers).b(body);
|
|
272
|
+
return b.build();
|
|
273
|
+
};
|
|
132
274
|
export const se_RerankCommand = async (input, context) => {
|
|
133
275
|
const b = rb(input, context);
|
|
134
276
|
const headers = {
|
|
@@ -194,6 +336,79 @@ export const se_RetrieveAndGenerateStreamCommand = async (input, context) => {
|
|
|
194
336
|
b.m("POST").h(headers).b(body);
|
|
195
337
|
return b.build();
|
|
196
338
|
};
|
|
339
|
+
export const se_TagResourceCommand = async (input, context) => {
|
|
340
|
+
const b = rb(input, context);
|
|
341
|
+
const headers = {
|
|
342
|
+
"content-type": "application/json",
|
|
343
|
+
};
|
|
344
|
+
b.bp("/tags/{resourceArn}");
|
|
345
|
+
b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
|
|
346
|
+
let body;
|
|
347
|
+
body = JSON.stringify(take(input, {
|
|
348
|
+
tags: (_) => _json(_),
|
|
349
|
+
}));
|
|
350
|
+
b.m("POST").h(headers).b(body);
|
|
351
|
+
return b.build();
|
|
352
|
+
};
|
|
353
|
+
export const se_UntagResourceCommand = async (input, context) => {
|
|
354
|
+
const b = rb(input, context);
|
|
355
|
+
const headers = {};
|
|
356
|
+
b.bp("/tags/{resourceArn}");
|
|
357
|
+
b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
|
|
358
|
+
const query = map({
|
|
359
|
+
[_tK]: [__expectNonNull(input.tagKeys, `tagKeys`) != null, () => input[_tK] || []],
|
|
360
|
+
});
|
|
361
|
+
let body;
|
|
362
|
+
b.m("DELETE").h(headers).q(query).b(body);
|
|
363
|
+
return b.build();
|
|
364
|
+
};
|
|
365
|
+
export const se_UpdateSessionCommand = async (input, context) => {
|
|
366
|
+
const b = rb(input, context);
|
|
367
|
+
const headers = {
|
|
368
|
+
"content-type": "application/json",
|
|
369
|
+
};
|
|
370
|
+
b.bp("/sessions/{sessionIdentifier}");
|
|
371
|
+
b.p("sessionIdentifier", () => input.sessionIdentifier, "{sessionIdentifier}", false);
|
|
372
|
+
let body;
|
|
373
|
+
body = JSON.stringify(take(input, {
|
|
374
|
+
sessionMetadata: (_) => _json(_),
|
|
375
|
+
}));
|
|
376
|
+
b.m("PUT").h(headers).b(body);
|
|
377
|
+
return b.build();
|
|
378
|
+
};
|
|
379
|
+
export const de_CreateInvocationCommand = async (output, context) => {
|
|
380
|
+
if (output.statusCode !== 201 && output.statusCode >= 300) {
|
|
381
|
+
return de_CommandError(output, context);
|
|
382
|
+
}
|
|
383
|
+
const contents = map({
|
|
384
|
+
$metadata: deserializeMetadata(output),
|
|
385
|
+
});
|
|
386
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
387
|
+
const doc = take(data, {
|
|
388
|
+
createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
|
|
389
|
+
invocationId: __expectString,
|
|
390
|
+
sessionId: __expectString,
|
|
391
|
+
});
|
|
392
|
+
Object.assign(contents, doc);
|
|
393
|
+
return contents;
|
|
394
|
+
};
|
|
395
|
+
export const de_CreateSessionCommand = async (output, context) => {
|
|
396
|
+
if (output.statusCode !== 201 && output.statusCode >= 300) {
|
|
397
|
+
return de_CommandError(output, context);
|
|
398
|
+
}
|
|
399
|
+
const contents = map({
|
|
400
|
+
$metadata: deserializeMetadata(output),
|
|
401
|
+
});
|
|
402
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
403
|
+
const doc = take(data, {
|
|
404
|
+
createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
|
|
405
|
+
sessionArn: __expectString,
|
|
406
|
+
sessionId: __expectString,
|
|
407
|
+
sessionStatus: __expectString,
|
|
408
|
+
});
|
|
409
|
+
Object.assign(contents, doc);
|
|
410
|
+
return contents;
|
|
411
|
+
};
|
|
197
412
|
export const de_DeleteAgentMemoryCommand = async (output, context) => {
|
|
198
413
|
if (output.statusCode !== 202 && output.statusCode >= 300) {
|
|
199
414
|
return de_CommandError(output, context);
|
|
@@ -204,6 +419,32 @@ export const de_DeleteAgentMemoryCommand = async (output, context) => {
|
|
|
204
419
|
await collectBody(output.body, context);
|
|
205
420
|
return contents;
|
|
206
421
|
};
|
|
422
|
+
export const de_DeleteSessionCommand = async (output, context) => {
|
|
423
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
424
|
+
return de_CommandError(output, context);
|
|
425
|
+
}
|
|
426
|
+
const contents = map({
|
|
427
|
+
$metadata: deserializeMetadata(output),
|
|
428
|
+
});
|
|
429
|
+
await collectBody(output.body, context);
|
|
430
|
+
return contents;
|
|
431
|
+
};
|
|
432
|
+
export const de_EndSessionCommand = async (output, context) => {
|
|
433
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
434
|
+
return de_CommandError(output, context);
|
|
435
|
+
}
|
|
436
|
+
const contents = map({
|
|
437
|
+
$metadata: deserializeMetadata(output),
|
|
438
|
+
});
|
|
439
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
440
|
+
const doc = take(data, {
|
|
441
|
+
sessionArn: __expectString,
|
|
442
|
+
sessionId: __expectString,
|
|
443
|
+
sessionStatus: __expectString,
|
|
444
|
+
});
|
|
445
|
+
Object.assign(contents, doc);
|
|
446
|
+
return contents;
|
|
447
|
+
};
|
|
207
448
|
export const de_GenerateQueryCommand = async (output, context) => {
|
|
208
449
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
209
450
|
return de_CommandError(output, context);
|
|
@@ -233,6 +474,40 @@ export const de_GetAgentMemoryCommand = async (output, context) => {
|
|
|
233
474
|
Object.assign(contents, doc);
|
|
234
475
|
return contents;
|
|
235
476
|
};
|
|
477
|
+
export const de_GetInvocationStepCommand = async (output, context) => {
|
|
478
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
479
|
+
return de_CommandError(output, context);
|
|
480
|
+
}
|
|
481
|
+
const contents = map({
|
|
482
|
+
$metadata: deserializeMetadata(output),
|
|
483
|
+
});
|
|
484
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
485
|
+
const doc = take(data, {
|
|
486
|
+
invocationStep: (_) => de_InvocationStep(_, context),
|
|
487
|
+
});
|
|
488
|
+
Object.assign(contents, doc);
|
|
489
|
+
return contents;
|
|
490
|
+
};
|
|
491
|
+
export const de_GetSessionCommand = async (output, context) => {
|
|
492
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
493
|
+
return de_CommandError(output, context);
|
|
494
|
+
}
|
|
495
|
+
const contents = map({
|
|
496
|
+
$metadata: deserializeMetadata(output),
|
|
497
|
+
});
|
|
498
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
499
|
+
const doc = take(data, {
|
|
500
|
+
createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
|
|
501
|
+
encryptionKeyArn: __expectString,
|
|
502
|
+
lastUpdatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
|
|
503
|
+
sessionArn: __expectString,
|
|
504
|
+
sessionId: __expectString,
|
|
505
|
+
sessionMetadata: _json,
|
|
506
|
+
sessionStatus: __expectString,
|
|
507
|
+
});
|
|
508
|
+
Object.assign(contents, doc);
|
|
509
|
+
return contents;
|
|
510
|
+
};
|
|
236
511
|
export const de_InvokeAgentCommand = async (output, context) => {
|
|
237
512
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
238
513
|
return de_CommandError(output, context);
|
|
@@ -272,6 +547,65 @@ export const de_InvokeInlineAgentCommand = async (output, context) => {
|
|
|
272
547
|
contents.completion = de_InlineAgentResponseStream(data, context);
|
|
273
548
|
return contents;
|
|
274
549
|
};
|
|
550
|
+
export const de_ListInvocationsCommand = async (output, context) => {
|
|
551
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
552
|
+
return de_CommandError(output, context);
|
|
553
|
+
}
|
|
554
|
+
const contents = map({
|
|
555
|
+
$metadata: deserializeMetadata(output),
|
|
556
|
+
});
|
|
557
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
558
|
+
const doc = take(data, {
|
|
559
|
+
invocationSummaries: (_) => de_InvocationSummaries(_, context),
|
|
560
|
+
nextToken: __expectString,
|
|
561
|
+
});
|
|
562
|
+
Object.assign(contents, doc);
|
|
563
|
+
return contents;
|
|
564
|
+
};
|
|
565
|
+
export const de_ListInvocationStepsCommand = async (output, context) => {
|
|
566
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
567
|
+
return de_CommandError(output, context);
|
|
568
|
+
}
|
|
569
|
+
const contents = map({
|
|
570
|
+
$metadata: deserializeMetadata(output),
|
|
571
|
+
});
|
|
572
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
573
|
+
const doc = take(data, {
|
|
574
|
+
invocationStepSummaries: (_) => de_InvocationStepSummaries(_, context),
|
|
575
|
+
nextToken: __expectString,
|
|
576
|
+
});
|
|
577
|
+
Object.assign(contents, doc);
|
|
578
|
+
return contents;
|
|
579
|
+
};
|
|
580
|
+
export const de_ListSessionsCommand = async (output, context) => {
|
|
581
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
582
|
+
return de_CommandError(output, context);
|
|
583
|
+
}
|
|
584
|
+
const contents = map({
|
|
585
|
+
$metadata: deserializeMetadata(output),
|
|
586
|
+
});
|
|
587
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
588
|
+
const doc = take(data, {
|
|
589
|
+
nextToken: __expectString,
|
|
590
|
+
sessionSummaries: (_) => de_SessionSummaries(_, context),
|
|
591
|
+
});
|
|
592
|
+
Object.assign(contents, doc);
|
|
593
|
+
return contents;
|
|
594
|
+
};
|
|
595
|
+
export const de_ListTagsForResourceCommand = async (output, context) => {
|
|
596
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
597
|
+
return de_CommandError(output, context);
|
|
598
|
+
}
|
|
599
|
+
const contents = map({
|
|
600
|
+
$metadata: deserializeMetadata(output),
|
|
601
|
+
});
|
|
602
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
603
|
+
const doc = take(data, {
|
|
604
|
+
tags: _json,
|
|
605
|
+
});
|
|
606
|
+
Object.assign(contents, doc);
|
|
607
|
+
return contents;
|
|
608
|
+
};
|
|
275
609
|
export const de_OptimizePromptCommand = async (output, context) => {
|
|
276
610
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
277
611
|
return de_CommandError(output, context);
|
|
@@ -283,6 +617,20 @@ export const de_OptimizePromptCommand = async (output, context) => {
|
|
|
283
617
|
contents.optimizedPrompt = de_OptimizedPromptStream(data, context);
|
|
284
618
|
return contents;
|
|
285
619
|
};
|
|
620
|
+
export const de_PutInvocationStepCommand = async (output, context) => {
|
|
621
|
+
if (output.statusCode !== 201 && output.statusCode >= 300) {
|
|
622
|
+
return de_CommandError(output, context);
|
|
623
|
+
}
|
|
624
|
+
const contents = map({
|
|
625
|
+
$metadata: deserializeMetadata(output),
|
|
626
|
+
});
|
|
627
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
628
|
+
const doc = take(data, {
|
|
629
|
+
invocationStepId: __expectString,
|
|
630
|
+
});
|
|
631
|
+
Object.assign(contents, doc);
|
|
632
|
+
return contents;
|
|
633
|
+
};
|
|
286
634
|
export const de_RerankCommand = async (output, context) => {
|
|
287
635
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
288
636
|
return de_CommandError(output, context);
|
|
@@ -343,6 +691,44 @@ export const de_RetrieveAndGenerateStreamCommand = async (output, context) => {
|
|
|
343
691
|
contents.stream = de_RetrieveAndGenerateStreamResponseOutput(data, context);
|
|
344
692
|
return contents;
|
|
345
693
|
};
|
|
694
|
+
export const de_TagResourceCommand = async (output, context) => {
|
|
695
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
696
|
+
return de_CommandError(output, context);
|
|
697
|
+
}
|
|
698
|
+
const contents = map({
|
|
699
|
+
$metadata: deserializeMetadata(output),
|
|
700
|
+
});
|
|
701
|
+
await collectBody(output.body, context);
|
|
702
|
+
return contents;
|
|
703
|
+
};
|
|
704
|
+
export const de_UntagResourceCommand = async (output, context) => {
|
|
705
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
706
|
+
return de_CommandError(output, context);
|
|
707
|
+
}
|
|
708
|
+
const contents = map({
|
|
709
|
+
$metadata: deserializeMetadata(output),
|
|
710
|
+
});
|
|
711
|
+
await collectBody(output.body, context);
|
|
712
|
+
return contents;
|
|
713
|
+
};
|
|
714
|
+
export const de_UpdateSessionCommand = async (output, context) => {
|
|
715
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
716
|
+
return de_CommandError(output, context);
|
|
717
|
+
}
|
|
718
|
+
const contents = map({
|
|
719
|
+
$metadata: deserializeMetadata(output),
|
|
720
|
+
});
|
|
721
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
722
|
+
const doc = take(data, {
|
|
723
|
+
createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
|
|
724
|
+
lastUpdatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
|
|
725
|
+
sessionArn: __expectString,
|
|
726
|
+
sessionId: __expectString,
|
|
727
|
+
sessionStatus: __expectString,
|
|
728
|
+
});
|
|
729
|
+
Object.assign(contents, doc);
|
|
730
|
+
return contents;
|
|
731
|
+
};
|
|
346
732
|
const de_CommandError = async (output, context) => {
|
|
347
733
|
const parsedOutput = {
|
|
348
734
|
...output,
|
|
@@ -353,15 +739,9 @@ const de_CommandError = async (output, context) => {
|
|
|
353
739
|
case "AccessDeniedException":
|
|
354
740
|
case "com.amazonaws.bedrockagentruntime#AccessDeniedException":
|
|
355
741
|
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
356
|
-
case "BadGatewayException":
|
|
357
|
-
case "com.amazonaws.bedrockagentruntime#BadGatewayException":
|
|
358
|
-
throw await de_BadGatewayExceptionRes(parsedOutput, context);
|
|
359
742
|
case "ConflictException":
|
|
360
743
|
case "com.amazonaws.bedrockagentruntime#ConflictException":
|
|
361
744
|
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
362
|
-
case "DependencyFailedException":
|
|
363
|
-
case "com.amazonaws.bedrockagentruntime#DependencyFailedException":
|
|
364
|
-
throw await de_DependencyFailedExceptionRes(parsedOutput, context);
|
|
365
745
|
case "InternalServerException":
|
|
366
746
|
case "com.amazonaws.bedrockagentruntime#InternalServerException":
|
|
367
747
|
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
@@ -377,6 +757,12 @@ const de_CommandError = async (output, context) => {
|
|
|
377
757
|
case "ValidationException":
|
|
378
758
|
case "com.amazonaws.bedrockagentruntime#ValidationException":
|
|
379
759
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
760
|
+
case "BadGatewayException":
|
|
761
|
+
case "com.amazonaws.bedrockagentruntime#BadGatewayException":
|
|
762
|
+
throw await de_BadGatewayExceptionRes(parsedOutput, context);
|
|
763
|
+
case "DependencyFailedException":
|
|
764
|
+
case "com.amazonaws.bedrockagentruntime#DependencyFailedException":
|
|
765
|
+
throw await de_DependencyFailedExceptionRes(parsedOutput, context);
|
|
380
766
|
case "ModelNotReadyException":
|
|
381
767
|
case "com.amazonaws.bedrockagentruntime#ModelNotReadyException":
|
|
382
768
|
throw await de_ModelNotReadyExceptionRes(parsedOutput, context);
|
|
@@ -1044,6 +1430,20 @@ const se_BedrockRerankingModelConfiguration = (input, context) => {
|
|
|
1044
1430
|
modelArn: [],
|
|
1045
1431
|
});
|
|
1046
1432
|
};
|
|
1433
|
+
const se_BedrockSessionContentBlock = (input, context) => {
|
|
1434
|
+
return BedrockSessionContentBlock.visit(input, {
|
|
1435
|
+
image: (value) => ({ image: se_ImageBlock(value, context) }),
|
|
1436
|
+
text: (value) => ({ text: value }),
|
|
1437
|
+
_: (name, value) => ({ [name]: value }),
|
|
1438
|
+
});
|
|
1439
|
+
};
|
|
1440
|
+
const se_BedrockSessionContentBlocks = (input, context) => {
|
|
1441
|
+
return input
|
|
1442
|
+
.filter((e) => e != null)
|
|
1443
|
+
.map((entry) => {
|
|
1444
|
+
return se_BedrockSessionContentBlock(entry, context);
|
|
1445
|
+
});
|
|
1446
|
+
};
|
|
1047
1447
|
const se_ByteContentDoc = (input, context) => {
|
|
1048
1448
|
return take(input, {
|
|
1049
1449
|
contentType: [],
|
|
@@ -1133,6 +1533,19 @@ const se_GenerationConfiguration = (input, context) => {
|
|
|
1133
1533
|
promptTemplate: _json,
|
|
1134
1534
|
});
|
|
1135
1535
|
};
|
|
1536
|
+
const se_ImageBlock = (input, context) => {
|
|
1537
|
+
return take(input, {
|
|
1538
|
+
format: [],
|
|
1539
|
+
source: (_) => se_ImageSource(_, context),
|
|
1540
|
+
});
|
|
1541
|
+
};
|
|
1542
|
+
const se_ImageSource = (input, context) => {
|
|
1543
|
+
return ImageSource.visit(input, {
|
|
1544
|
+
bytes: (value) => ({ bytes: context.base64Encoder(value) }),
|
|
1545
|
+
s3Location: (value) => ({ s3Location: _json(value) }),
|
|
1546
|
+
_: (name, value) => ({ [name]: value }),
|
|
1547
|
+
});
|
|
1548
|
+
};
|
|
1136
1549
|
const se_InferenceConfig = (input, context) => {
|
|
1137
1550
|
return take(input, {
|
|
1138
1551
|
textInferenceConfig: (_) => se_TextInferenceConfig(_, context),
|
|
@@ -1170,6 +1583,12 @@ const se_InputFiles = (input, context) => {
|
|
|
1170
1583
|
return se_InputFile(entry, context);
|
|
1171
1584
|
});
|
|
1172
1585
|
};
|
|
1586
|
+
const se_InvocationStepPayload = (input, context) => {
|
|
1587
|
+
return InvocationStepPayload.visit(input, {
|
|
1588
|
+
contentBlocks: (value) => ({ contentBlocks: se_BedrockSessionContentBlocks(value, context) }),
|
|
1589
|
+
_: (name, value) => ({ [name]: value }),
|
|
1590
|
+
});
|
|
1591
|
+
};
|
|
1173
1592
|
const se_KnowledgeBase = (input, context) => {
|
|
1174
1593
|
return take(input, {
|
|
1175
1594
|
description: [],
|
|
@@ -1364,6 +1783,25 @@ const de_Attribution = (output, context) => {
|
|
|
1364
1783
|
citations: (_) => de_Citations(_, context),
|
|
1365
1784
|
});
|
|
1366
1785
|
};
|
|
1786
|
+
const de_BedrockSessionContentBlock = (output, context) => {
|
|
1787
|
+
if (output.image != null) {
|
|
1788
|
+
return {
|
|
1789
|
+
image: de_ImageBlock(output.image, context),
|
|
1790
|
+
};
|
|
1791
|
+
}
|
|
1792
|
+
if (__expectString(output.text) !== undefined) {
|
|
1793
|
+
return { text: __expectString(output.text) };
|
|
1794
|
+
}
|
|
1795
|
+
return { $unknown: Object.entries(output)[0] };
|
|
1796
|
+
};
|
|
1797
|
+
const de_BedrockSessionContentBlocks = (output, context) => {
|
|
1798
|
+
const retVal = (output || [])
|
|
1799
|
+
.filter((e) => e != null)
|
|
1800
|
+
.map((entry) => {
|
|
1801
|
+
return de_BedrockSessionContentBlock(__expectUnion(entry), context);
|
|
1802
|
+
});
|
|
1803
|
+
return retVal;
|
|
1804
|
+
};
|
|
1367
1805
|
const de_Citation = (output, context) => {
|
|
1368
1806
|
return take(output, {
|
|
1369
1807
|
generatedResponsePart: _json,
|
|
@@ -1508,6 +1946,25 @@ const de_FlowTraceNodeOutputFields = (output, context) => {
|
|
|
1508
1946
|
});
|
|
1509
1947
|
return retVal;
|
|
1510
1948
|
};
|
|
1949
|
+
const de_ImageBlock = (output, context) => {
|
|
1950
|
+
return take(output, {
|
|
1951
|
+
format: __expectString,
|
|
1952
|
+
source: (_) => de_ImageSource(__expectUnion(_), context),
|
|
1953
|
+
});
|
|
1954
|
+
};
|
|
1955
|
+
const de_ImageSource = (output, context) => {
|
|
1956
|
+
if (output.bytes != null) {
|
|
1957
|
+
return {
|
|
1958
|
+
bytes: context.base64Decoder(output.bytes),
|
|
1959
|
+
};
|
|
1960
|
+
}
|
|
1961
|
+
if (output.s3Location != null) {
|
|
1962
|
+
return {
|
|
1963
|
+
s3Location: _json(output.s3Location),
|
|
1964
|
+
};
|
|
1965
|
+
}
|
|
1966
|
+
return { $unknown: Object.entries(output)[0] };
|
|
1967
|
+
};
|
|
1511
1968
|
const de_InferenceConfiguration = (output, context) => {
|
|
1512
1969
|
return take(output, {
|
|
1513
1970
|
maximumLength: __expectInt32,
|
|
@@ -1534,6 +1991,54 @@ const de_InlineAgentTracePart = (output, context) => {
|
|
|
1534
1991
|
trace: (_) => de_Trace(__expectUnion(_), context),
|
|
1535
1992
|
});
|
|
1536
1993
|
};
|
|
1994
|
+
const de_InvocationStep = (output, context) => {
|
|
1995
|
+
return take(output, {
|
|
1996
|
+
invocationId: __expectString,
|
|
1997
|
+
invocationStepId: __expectString,
|
|
1998
|
+
invocationStepTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
|
|
1999
|
+
payload: (_) => de_InvocationStepPayload(__expectUnion(_), context),
|
|
2000
|
+
sessionId: __expectString,
|
|
2001
|
+
});
|
|
2002
|
+
};
|
|
2003
|
+
const de_InvocationStepPayload = (output, context) => {
|
|
2004
|
+
if (output.contentBlocks != null) {
|
|
2005
|
+
return {
|
|
2006
|
+
contentBlocks: de_BedrockSessionContentBlocks(output.contentBlocks, context),
|
|
2007
|
+
};
|
|
2008
|
+
}
|
|
2009
|
+
return { $unknown: Object.entries(output)[0] };
|
|
2010
|
+
};
|
|
2011
|
+
const de_InvocationStepSummaries = (output, context) => {
|
|
2012
|
+
const retVal = (output || [])
|
|
2013
|
+
.filter((e) => e != null)
|
|
2014
|
+
.map((entry) => {
|
|
2015
|
+
return de_InvocationStepSummary(entry, context);
|
|
2016
|
+
});
|
|
2017
|
+
return retVal;
|
|
2018
|
+
};
|
|
2019
|
+
const de_InvocationStepSummary = (output, context) => {
|
|
2020
|
+
return take(output, {
|
|
2021
|
+
invocationId: __expectString,
|
|
2022
|
+
invocationStepId: __expectString,
|
|
2023
|
+
invocationStepTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
|
|
2024
|
+
sessionId: __expectString,
|
|
2025
|
+
});
|
|
2026
|
+
};
|
|
2027
|
+
const de_InvocationSummaries = (output, context) => {
|
|
2028
|
+
const retVal = (output || [])
|
|
2029
|
+
.filter((e) => e != null)
|
|
2030
|
+
.map((entry) => {
|
|
2031
|
+
return de_InvocationSummary(entry, context);
|
|
2032
|
+
});
|
|
2033
|
+
return retVal;
|
|
2034
|
+
};
|
|
2035
|
+
const de_InvocationSummary = (output, context) => {
|
|
2036
|
+
return take(output, {
|
|
2037
|
+
createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
|
|
2038
|
+
invocationId: __expectString,
|
|
2039
|
+
sessionId: __expectString,
|
|
2040
|
+
});
|
|
2041
|
+
};
|
|
1537
2042
|
const de_KnowledgeBaseLookupOutput = (output, context) => {
|
|
1538
2043
|
return take(output, {
|
|
1539
2044
|
retrievedReferences: (_) => de_RetrievedReferences(_, context),
|
|
@@ -1604,6 +2109,14 @@ const de_Observation = (output, context) => {
|
|
|
1604
2109
|
type: __expectString,
|
|
1605
2110
|
});
|
|
1606
2111
|
};
|
|
2112
|
+
const de_OrchestrationModelInvocationOutput = (output, context) => {
|
|
2113
|
+
return take(output, {
|
|
2114
|
+
metadata: _json,
|
|
2115
|
+
rawResponse: _json,
|
|
2116
|
+
reasoningContent: (_) => de_ReasoningContentBlock(__expectUnion(_), context),
|
|
2117
|
+
traceId: __expectString,
|
|
2118
|
+
});
|
|
2119
|
+
};
|
|
1607
2120
|
const de_OrchestrationTrace = (output, context) => {
|
|
1608
2121
|
if (output.invocationInput != null) {
|
|
1609
2122
|
return {
|
|
@@ -1617,7 +2130,7 @@ const de_OrchestrationTrace = (output, context) => {
|
|
|
1617
2130
|
}
|
|
1618
2131
|
if (output.modelInvocationOutput != null) {
|
|
1619
2132
|
return {
|
|
1620
|
-
modelInvocationOutput:
|
|
2133
|
+
modelInvocationOutput: de_OrchestrationModelInvocationOutput(output.modelInvocationOutput, context),
|
|
1621
2134
|
};
|
|
1622
2135
|
}
|
|
1623
2136
|
if (output.observation != null) {
|
|
@@ -1653,6 +2166,15 @@ const de_PayloadPart = (output, context) => {
|
|
|
1653
2166
|
bytes: context.base64Decoder,
|
|
1654
2167
|
});
|
|
1655
2168
|
};
|
|
2169
|
+
const de_PostProcessingModelInvocationOutput = (output, context) => {
|
|
2170
|
+
return take(output, {
|
|
2171
|
+
metadata: _json,
|
|
2172
|
+
parsedResponse: _json,
|
|
2173
|
+
rawResponse: _json,
|
|
2174
|
+
reasoningContent: (_) => de_ReasoningContentBlock(__expectUnion(_), context),
|
|
2175
|
+
traceId: __expectString,
|
|
2176
|
+
});
|
|
2177
|
+
};
|
|
1656
2178
|
const de_PostProcessingTrace = (output, context) => {
|
|
1657
2179
|
if (output.modelInvocationInput != null) {
|
|
1658
2180
|
return {
|
|
@@ -1661,11 +2183,20 @@ const de_PostProcessingTrace = (output, context) => {
|
|
|
1661
2183
|
}
|
|
1662
2184
|
if (output.modelInvocationOutput != null) {
|
|
1663
2185
|
return {
|
|
1664
|
-
modelInvocationOutput:
|
|
2186
|
+
modelInvocationOutput: de_PostProcessingModelInvocationOutput(output.modelInvocationOutput, context),
|
|
1665
2187
|
};
|
|
1666
2188
|
}
|
|
1667
2189
|
return { $unknown: Object.entries(output)[0] };
|
|
1668
2190
|
};
|
|
2191
|
+
const de_PreProcessingModelInvocationOutput = (output, context) => {
|
|
2192
|
+
return take(output, {
|
|
2193
|
+
metadata: _json,
|
|
2194
|
+
parsedResponse: _json,
|
|
2195
|
+
rawResponse: _json,
|
|
2196
|
+
reasoningContent: (_) => de_ReasoningContentBlock(__expectUnion(_), context),
|
|
2197
|
+
traceId: __expectString,
|
|
2198
|
+
});
|
|
2199
|
+
};
|
|
1669
2200
|
const de_PreProcessingTrace = (output, context) => {
|
|
1670
2201
|
if (output.modelInvocationInput != null) {
|
|
1671
2202
|
return {
|
|
@@ -1674,7 +2205,20 @@ const de_PreProcessingTrace = (output, context) => {
|
|
|
1674
2205
|
}
|
|
1675
2206
|
if (output.modelInvocationOutput != null) {
|
|
1676
2207
|
return {
|
|
1677
|
-
modelInvocationOutput:
|
|
2208
|
+
modelInvocationOutput: de_PreProcessingModelInvocationOutput(output.modelInvocationOutput, context),
|
|
2209
|
+
};
|
|
2210
|
+
}
|
|
2211
|
+
return { $unknown: Object.entries(output)[0] };
|
|
2212
|
+
};
|
|
2213
|
+
const de_ReasoningContentBlock = (output, context) => {
|
|
2214
|
+
if (output.reasoningText != null) {
|
|
2215
|
+
return {
|
|
2216
|
+
reasoningText: _json(output.reasoningText),
|
|
2217
|
+
};
|
|
2218
|
+
}
|
|
2219
|
+
if (output.redactedContent != null) {
|
|
2220
|
+
return {
|
|
2221
|
+
redactedContent: context.base64Decoder(output.redactedContent),
|
|
1678
2222
|
};
|
|
1679
2223
|
}
|
|
1680
2224
|
return { $unknown: Object.entries(output)[0] };
|
|
@@ -1751,6 +2295,23 @@ const de_RoutingClassifierTrace = (output, context) => {
|
|
|
1751
2295
|
}
|
|
1752
2296
|
return { $unknown: Object.entries(output)[0] };
|
|
1753
2297
|
};
|
|
2298
|
+
const de_SessionSummaries = (output, context) => {
|
|
2299
|
+
const retVal = (output || [])
|
|
2300
|
+
.filter((e) => e != null)
|
|
2301
|
+
.map((entry) => {
|
|
2302
|
+
return de_SessionSummary(entry, context);
|
|
2303
|
+
});
|
|
2304
|
+
return retVal;
|
|
2305
|
+
};
|
|
2306
|
+
const de_SessionSummary = (output, context) => {
|
|
2307
|
+
return take(output, {
|
|
2308
|
+
createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
|
|
2309
|
+
lastUpdatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
|
|
2310
|
+
sessionArn: __expectString,
|
|
2311
|
+
sessionId: __expectString,
|
|
2312
|
+
sessionStatus: __expectString,
|
|
2313
|
+
});
|
|
2314
|
+
};
|
|
1754
2315
|
const de_Trace = (output, context) => {
|
|
1755
2316
|
if (output.customOrchestrationTrace != null) {
|
|
1756
2317
|
return {
|
|
@@ -1814,10 +2375,12 @@ const _cT = "contentType";
|
|
|
1814
2375
|
const _eI = "executionId";
|
|
1815
2376
|
const _mI = "memoryId";
|
|
1816
2377
|
const _mIa = "maxItems";
|
|
2378
|
+
const _mR = "maxResults";
|
|
1817
2379
|
const _mT = "memoryType";
|
|
1818
2380
|
const _nT = "nextToken";
|
|
1819
2381
|
const _sA = "sourceArn";
|
|
1820
2382
|
const _sI = "sessionId";
|
|
2383
|
+
const _tK = "tagKeys";
|
|
1821
2384
|
const _xabact = "x-amzn-bedrock-agent-content-type";
|
|
1822
2385
|
const _xabami = "x-amz-bedrock-agent-memory-id";
|
|
1823
2386
|
const _xabasi = "x-amz-bedrock-agent-session-id";
|