@aws-sdk/client-bedrock-runtime 3.705.0 → 3.706.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 +248 -24
- package/dist-es/commands/ApplyGuardrailCommand.js +2 -1
- package/dist-es/commands/ConverseCommand.js +2 -2
- package/dist-es/models/models_0.js +112 -4
- package/dist-es/protocols/Aws_restJson1.js +94 -6
- package/dist-types/commands/ApplyGuardrailCommand.d.ts +14 -0
- package/dist-types/commands/ConverseCommand.d.ts +29 -0
- package/dist-types/commands/ConverseStreamCommand.d.ts +23 -0
- package/dist-types/models/models_0.d.ts +232 -2
- package/dist-types/ts3.4/models/models_0.d.ts +119 -0
- package/package.json +1 -1
|
@@ -116,6 +116,18 @@ export class ServiceUnavailableException extends __BaseException {
|
|
|
116
116
|
Object.setPrototypeOf(this, ServiceUnavailableException.prototype);
|
|
117
117
|
}
|
|
118
118
|
}
|
|
119
|
+
export const GuardrailImageFormat = {
|
|
120
|
+
JPEG: "jpeg",
|
|
121
|
+
PNG: "png",
|
|
122
|
+
};
|
|
123
|
+
export var GuardrailImageSource;
|
|
124
|
+
(function (GuardrailImageSource) {
|
|
125
|
+
GuardrailImageSource.visit = (value, visitor) => {
|
|
126
|
+
if (value.bytes !== undefined)
|
|
127
|
+
return visitor.bytes(value.bytes);
|
|
128
|
+
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
129
|
+
};
|
|
130
|
+
})(GuardrailImageSource || (GuardrailImageSource = {}));
|
|
119
131
|
export const GuardrailContentQualifier = {
|
|
120
132
|
GROUNDING_SOURCE: "grounding_source",
|
|
121
133
|
GUARD_CONTENT: "guard_content",
|
|
@@ -126,6 +138,8 @@ export var GuardrailContentBlock;
|
|
|
126
138
|
GuardrailContentBlock.visit = (value, visitor) => {
|
|
127
139
|
if (value.text !== undefined)
|
|
128
140
|
return visitor.text(value.text);
|
|
141
|
+
if (value.image !== undefined)
|
|
142
|
+
return visitor.image(value.image);
|
|
129
143
|
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
130
144
|
};
|
|
131
145
|
})(GuardrailContentBlock || (GuardrailContentBlock = {}));
|
|
@@ -240,6 +254,18 @@ export var DocumentSource;
|
|
|
240
254
|
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
241
255
|
};
|
|
242
256
|
})(DocumentSource || (DocumentSource = {}));
|
|
257
|
+
export const GuardrailConverseImageFormat = {
|
|
258
|
+
JPEG: "jpeg",
|
|
259
|
+
PNG: "png",
|
|
260
|
+
};
|
|
261
|
+
export var GuardrailConverseImageSource;
|
|
262
|
+
(function (GuardrailConverseImageSource) {
|
|
263
|
+
GuardrailConverseImageSource.visit = (value, visitor) => {
|
|
264
|
+
if (value.bytes !== undefined)
|
|
265
|
+
return visitor.bytes(value.bytes);
|
|
266
|
+
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
267
|
+
};
|
|
268
|
+
})(GuardrailConverseImageSource || (GuardrailConverseImageSource = {}));
|
|
243
269
|
export const GuardrailConverseContentQualifier = {
|
|
244
270
|
GROUNDING_SOURCE: "grounding_source",
|
|
245
271
|
GUARD_CONTENT: "guard_content",
|
|
@@ -250,6 +276,8 @@ export var GuardrailConverseContentBlock;
|
|
|
250
276
|
GuardrailConverseContentBlock.visit = (value, visitor) => {
|
|
251
277
|
if (value.text !== undefined)
|
|
252
278
|
return visitor.text(value.text);
|
|
279
|
+
if (value.image !== undefined)
|
|
280
|
+
return visitor.image(value.image);
|
|
253
281
|
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
254
282
|
};
|
|
255
283
|
})(GuardrailConverseContentBlock || (GuardrailConverseContentBlock = {}));
|
|
@@ -546,18 +574,98 @@ export const StartAsyncInvokeRequestFilterSensitiveLog = (obj) => ({
|
|
|
546
574
|
...(obj.modelInput && { modelInput: SENSITIVE_STRING }),
|
|
547
575
|
...(obj.outputDataConfig && { outputDataConfig: obj.outputDataConfig }),
|
|
548
576
|
});
|
|
577
|
+
export const GuardrailImageSourceFilterSensitiveLog = (obj) => {
|
|
578
|
+
if (obj.bytes !== undefined)
|
|
579
|
+
return { bytes: obj.bytes };
|
|
580
|
+
if (obj.$unknown !== undefined)
|
|
581
|
+
return { [obj.$unknown[0]]: "UNKNOWN" };
|
|
582
|
+
};
|
|
583
|
+
export const GuardrailImageBlockFilterSensitiveLog = (obj) => ({
|
|
584
|
+
...obj,
|
|
585
|
+
...(obj.source && { source: SENSITIVE_STRING }),
|
|
586
|
+
});
|
|
587
|
+
export const GuardrailContentBlockFilterSensitiveLog = (obj) => {
|
|
588
|
+
if (obj.text !== undefined)
|
|
589
|
+
return { text: obj.text };
|
|
590
|
+
if (obj.image !== undefined)
|
|
591
|
+
return { image: SENSITIVE_STRING };
|
|
592
|
+
if (obj.$unknown !== undefined)
|
|
593
|
+
return { [obj.$unknown[0]]: "UNKNOWN" };
|
|
594
|
+
};
|
|
595
|
+
export const ApplyGuardrailRequestFilterSensitiveLog = (obj) => ({
|
|
596
|
+
...obj,
|
|
597
|
+
...(obj.content && { content: obj.content.map((item) => GuardrailContentBlockFilterSensitiveLog(item)) }),
|
|
598
|
+
});
|
|
599
|
+
export const GuardrailConverseImageSourceFilterSensitiveLog = (obj) => {
|
|
600
|
+
if (obj.bytes !== undefined)
|
|
601
|
+
return { bytes: obj.bytes };
|
|
602
|
+
if (obj.$unknown !== undefined)
|
|
603
|
+
return { [obj.$unknown[0]]: "UNKNOWN" };
|
|
604
|
+
};
|
|
605
|
+
export const GuardrailConverseImageBlockFilterSensitiveLog = (obj) => ({
|
|
606
|
+
...obj,
|
|
607
|
+
...(obj.source && { source: SENSITIVE_STRING }),
|
|
608
|
+
});
|
|
609
|
+
export const GuardrailConverseContentBlockFilterSensitiveLog = (obj) => {
|
|
610
|
+
if (obj.text !== undefined)
|
|
611
|
+
return { text: obj.text };
|
|
612
|
+
if (obj.image !== undefined)
|
|
613
|
+
return { image: SENSITIVE_STRING };
|
|
614
|
+
if (obj.$unknown !== undefined)
|
|
615
|
+
return { [obj.$unknown[0]]: "UNKNOWN" };
|
|
616
|
+
};
|
|
617
|
+
export const ContentBlockFilterSensitiveLog = (obj) => {
|
|
618
|
+
if (obj.text !== undefined)
|
|
619
|
+
return { text: obj.text };
|
|
620
|
+
if (obj.image !== undefined)
|
|
621
|
+
return { image: obj.image };
|
|
622
|
+
if (obj.document !== undefined)
|
|
623
|
+
return { document: obj.document };
|
|
624
|
+
if (obj.video !== undefined)
|
|
625
|
+
return { video: obj.video };
|
|
626
|
+
if (obj.toolUse !== undefined)
|
|
627
|
+
return { toolUse: obj.toolUse };
|
|
628
|
+
if (obj.toolResult !== undefined)
|
|
629
|
+
return { toolResult: obj.toolResult };
|
|
630
|
+
if (obj.guardContent !== undefined)
|
|
631
|
+
return { guardContent: GuardrailConverseContentBlockFilterSensitiveLog(obj.guardContent) };
|
|
632
|
+
if (obj.$unknown !== undefined)
|
|
633
|
+
return { [obj.$unknown[0]]: "UNKNOWN" };
|
|
634
|
+
};
|
|
635
|
+
export const MessageFilterSensitiveLog = (obj) => ({
|
|
636
|
+
...obj,
|
|
637
|
+
...(obj.content && { content: obj.content.map((item) => ContentBlockFilterSensitiveLog(item)) }),
|
|
638
|
+
});
|
|
639
|
+
export const SystemContentBlockFilterSensitiveLog = (obj) => {
|
|
640
|
+
if (obj.text !== undefined)
|
|
641
|
+
return { text: obj.text };
|
|
642
|
+
if (obj.guardContent !== undefined)
|
|
643
|
+
return { guardContent: GuardrailConverseContentBlockFilterSensitiveLog(obj.guardContent) };
|
|
644
|
+
if (obj.$unknown !== undefined)
|
|
645
|
+
return { [obj.$unknown[0]]: "UNKNOWN" };
|
|
646
|
+
};
|
|
549
647
|
export const ConverseRequestFilterSensitiveLog = (obj) => ({
|
|
550
648
|
...obj,
|
|
551
|
-
...(obj.messages && { messages: obj.messages.map((item) => item) }),
|
|
552
|
-
...(obj.system && { system: obj.system.map((item) => item) }),
|
|
649
|
+
...(obj.messages && { messages: obj.messages.map((item) => MessageFilterSensitiveLog(item)) }),
|
|
650
|
+
...(obj.system && { system: obj.system.map((item) => SystemContentBlockFilterSensitiveLog(item)) }),
|
|
553
651
|
...(obj.toolConfig && { toolConfig: obj.toolConfig }),
|
|
554
652
|
...(obj.promptVariables && { promptVariables: SENSITIVE_STRING }),
|
|
555
653
|
...(obj.requestMetadata && { requestMetadata: SENSITIVE_STRING }),
|
|
556
654
|
});
|
|
655
|
+
export const ConverseOutputFilterSensitiveLog = (obj) => {
|
|
656
|
+
if (obj.message !== undefined)
|
|
657
|
+
return { message: MessageFilterSensitiveLog(obj.message) };
|
|
658
|
+
if (obj.$unknown !== undefined)
|
|
659
|
+
return { [obj.$unknown[0]]: "UNKNOWN" };
|
|
660
|
+
};
|
|
661
|
+
export const ConverseResponseFilterSensitiveLog = (obj) => ({
|
|
662
|
+
...obj,
|
|
663
|
+
...(obj.output && { output: ConverseOutputFilterSensitiveLog(obj.output) }),
|
|
664
|
+
});
|
|
557
665
|
export const ConverseStreamRequestFilterSensitiveLog = (obj) => ({
|
|
558
666
|
...obj,
|
|
559
|
-
...(obj.messages && { messages: obj.messages.map((item) => item) }),
|
|
560
|
-
...(obj.system && { system: obj.system.map((item) => item) }),
|
|
667
|
+
...(obj.messages && { messages: obj.messages.map((item) => MessageFilterSensitiveLog(item)) }),
|
|
668
|
+
...(obj.system && { system: obj.system.map((item) => SystemContentBlockFilterSensitiveLog(item)) }),
|
|
561
669
|
...(obj.toolConfig && { toolConfig: obj.toolConfig }),
|
|
562
670
|
...(obj.promptVariables && { promptVariables: SENSITIVE_STRING }),
|
|
563
671
|
...(obj.requestMetadata && { requestMetadata: SENSITIVE_STRING }),
|
|
@@ -3,7 +3,7 @@ import { requestBuilder as rb } from "@smithy/core";
|
|
|
3
3
|
import { _json, collectBody, decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, isSerializableHeaderValue, limitedParseDouble as __limitedParseDouble, map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, serializeDateTime as __serializeDateTime, serializeFloat as __serializeFloat, take, withBaseException, } from "@smithy/smithy-client";
|
|
4
4
|
import { v4 as generateIdempotencyToken } from "uuid";
|
|
5
5
|
import { BedrockRuntimeServiceException as __BaseException } from "../models/BedrockRuntimeServiceException";
|
|
6
|
-
import { AccessDeniedException, ConflictException, ContentBlock, DocumentSource, ImageSource, InternalServerException, ModelErrorException, ModelNotReadyException, ModelStreamErrorException, ModelTimeoutException, ResourceNotFoundException, ServiceQuotaExceededException, ServiceUnavailableException, ThrottlingException, Tool, ToolInputSchema, ToolResultContentBlock, ValidationException, VideoSource, } from "../models/models_0";
|
|
6
|
+
import { AccessDeniedException, ConflictException, ContentBlock, DocumentSource, GuardrailContentBlock, GuardrailConverseContentBlock, GuardrailConverseImageSource, GuardrailImageSource, ImageSource, InternalServerException, ModelErrorException, ModelNotReadyException, ModelStreamErrorException, ModelTimeoutException, ResourceNotFoundException, ServiceQuotaExceededException, ServiceUnavailableException, SystemContentBlock, ThrottlingException, Tool, ToolInputSchema, ToolResultContentBlock, ValidationException, VideoSource, } from "../models/models_0";
|
|
7
7
|
export const se_ApplyGuardrailCommand = async (input, context) => {
|
|
8
8
|
const b = rb(input, context);
|
|
9
9
|
const headers = {
|
|
@@ -14,7 +14,7 @@ export const se_ApplyGuardrailCommand = async (input, context) => {
|
|
|
14
14
|
b.p("guardrailVersion", () => input.guardrailVersion, "{guardrailVersion}", false);
|
|
15
15
|
let body;
|
|
16
16
|
body = JSON.stringify(take(input, {
|
|
17
|
-
content: (_) =>
|
|
17
|
+
content: (_) => se_GuardrailContentBlockList(_, context),
|
|
18
18
|
source: [],
|
|
19
19
|
}));
|
|
20
20
|
b.m("POST").h(headers).b(body);
|
|
@@ -37,7 +37,7 @@ export const se_ConverseCommand = async (input, context) => {
|
|
|
37
37
|
performanceConfig: (_) => _json(_),
|
|
38
38
|
promptVariables: (_) => _json(_),
|
|
39
39
|
requestMetadata: (_) => _json(_),
|
|
40
|
-
system: (_) =>
|
|
40
|
+
system: (_) => se_SystemContentBlocks(_, context),
|
|
41
41
|
toolConfig: (_) => se_ToolConfiguration(_, context),
|
|
42
42
|
}));
|
|
43
43
|
b.m("POST").h(headers).b(body);
|
|
@@ -60,7 +60,7 @@ export const se_ConverseStreamCommand = async (input, context) => {
|
|
|
60
60
|
performanceConfig: (_) => _json(_),
|
|
61
61
|
promptVariables: (_) => _json(_),
|
|
62
62
|
requestMetadata: (_) => _json(_),
|
|
63
|
-
system: (_) =>
|
|
63
|
+
system: (_) => se_SystemContentBlocks(_, context),
|
|
64
64
|
toolConfig: (_) => se_ToolConfiguration(_, context),
|
|
65
65
|
}));
|
|
66
66
|
b.m("POST").h(headers).b(body);
|
|
@@ -673,7 +673,7 @@ const de_ValidationException_event = async (output, context) => {
|
|
|
673
673
|
const se_ContentBlock = (input, context) => {
|
|
674
674
|
return ContentBlock.visit(input, {
|
|
675
675
|
document: (value) => ({ document: se_DocumentBlock(value, context) }),
|
|
676
|
-
guardContent: (value) => ({ guardContent:
|
|
676
|
+
guardContent: (value) => ({ guardContent: se_GuardrailConverseContentBlock(value, context) }),
|
|
677
677
|
image: (value) => ({ image: se_ImageBlock(value, context) }),
|
|
678
678
|
text: (value) => ({ text: value }),
|
|
679
679
|
toolResult: (value) => ({ toolResult: se_ToolResultBlock(value, context) }),
|
|
@@ -702,6 +702,51 @@ const se_DocumentSource = (input, context) => {
|
|
|
702
702
|
_: (name, value) => ({ name: value }),
|
|
703
703
|
});
|
|
704
704
|
};
|
|
705
|
+
const se_GuardrailContentBlock = (input, context) => {
|
|
706
|
+
return GuardrailContentBlock.visit(input, {
|
|
707
|
+
image: (value) => ({ image: se_GuardrailImageBlock(value, context) }),
|
|
708
|
+
text: (value) => ({ text: _json(value) }),
|
|
709
|
+
_: (name, value) => ({ name: value }),
|
|
710
|
+
});
|
|
711
|
+
};
|
|
712
|
+
const se_GuardrailContentBlockList = (input, context) => {
|
|
713
|
+
return input
|
|
714
|
+
.filter((e) => e != null)
|
|
715
|
+
.map((entry) => {
|
|
716
|
+
return se_GuardrailContentBlock(entry, context);
|
|
717
|
+
});
|
|
718
|
+
};
|
|
719
|
+
const se_GuardrailConverseContentBlock = (input, context) => {
|
|
720
|
+
return GuardrailConverseContentBlock.visit(input, {
|
|
721
|
+
image: (value) => ({ image: se_GuardrailConverseImageBlock(value, context) }),
|
|
722
|
+
text: (value) => ({ text: _json(value) }),
|
|
723
|
+
_: (name, value) => ({ name: value }),
|
|
724
|
+
});
|
|
725
|
+
};
|
|
726
|
+
const se_GuardrailConverseImageBlock = (input, context) => {
|
|
727
|
+
return take(input, {
|
|
728
|
+
format: [],
|
|
729
|
+
source: (_) => se_GuardrailConverseImageSource(_, context),
|
|
730
|
+
});
|
|
731
|
+
};
|
|
732
|
+
const se_GuardrailConverseImageSource = (input, context) => {
|
|
733
|
+
return GuardrailConverseImageSource.visit(input, {
|
|
734
|
+
bytes: (value) => ({ bytes: context.base64Encoder(value) }),
|
|
735
|
+
_: (name, value) => ({ name: value }),
|
|
736
|
+
});
|
|
737
|
+
};
|
|
738
|
+
const se_GuardrailImageBlock = (input, context) => {
|
|
739
|
+
return take(input, {
|
|
740
|
+
format: [],
|
|
741
|
+
source: (_) => se_GuardrailImageSource(_, context),
|
|
742
|
+
});
|
|
743
|
+
};
|
|
744
|
+
const se_GuardrailImageSource = (input, context) => {
|
|
745
|
+
return GuardrailImageSource.visit(input, {
|
|
746
|
+
bytes: (value) => ({ bytes: context.base64Encoder(value) }),
|
|
747
|
+
_: (name, value) => ({ name: value }),
|
|
748
|
+
});
|
|
749
|
+
};
|
|
705
750
|
const se_ImageBlock = (input, context) => {
|
|
706
751
|
return take(input, {
|
|
707
752
|
format: [],
|
|
@@ -738,6 +783,20 @@ const se_Messages = (input, context) => {
|
|
|
738
783
|
const se_ModelInputPayload = (input, context) => {
|
|
739
784
|
return input;
|
|
740
785
|
};
|
|
786
|
+
const se_SystemContentBlock = (input, context) => {
|
|
787
|
+
return SystemContentBlock.visit(input, {
|
|
788
|
+
guardContent: (value) => ({ guardContent: se_GuardrailConverseContentBlock(value, context) }),
|
|
789
|
+
text: (value) => ({ text: value }),
|
|
790
|
+
_: (name, value) => ({ name: value }),
|
|
791
|
+
});
|
|
792
|
+
};
|
|
793
|
+
const se_SystemContentBlocks = (input, context) => {
|
|
794
|
+
return input
|
|
795
|
+
.filter((e) => e != null)
|
|
796
|
+
.map((entry) => {
|
|
797
|
+
return se_SystemContentBlock(entry, context);
|
|
798
|
+
});
|
|
799
|
+
};
|
|
741
800
|
const se_Tool = (input, context) => {
|
|
742
801
|
return Tool.visit(input, {
|
|
743
802
|
toolSpec: (value) => ({ toolSpec: se_ToolSpecification(value, context) }),
|
|
@@ -846,7 +905,7 @@ const de_ContentBlock = (output, context) => {
|
|
|
846
905
|
}
|
|
847
906
|
if (output.guardContent != null) {
|
|
848
907
|
return {
|
|
849
|
-
guardContent:
|
|
908
|
+
guardContent: de_GuardrailConverseContentBlock(__expectUnion(output.guardContent), context),
|
|
850
909
|
};
|
|
851
910
|
}
|
|
852
911
|
if (output.image != null) {
|
|
@@ -901,11 +960,13 @@ const de_ConverseStreamMetadataEvent = (output, context) => {
|
|
|
901
960
|
const de_ConverseStreamTrace = (output, context) => {
|
|
902
961
|
return take(output, {
|
|
903
962
|
guardrail: (_) => de_GuardrailTraceAssessment(_, context),
|
|
963
|
+
promptRouter: _json,
|
|
904
964
|
});
|
|
905
965
|
};
|
|
906
966
|
const de_ConverseTrace = (output, context) => {
|
|
907
967
|
return take(output, {
|
|
908
968
|
guardrail: (_) => de_GuardrailTraceAssessment(_, context),
|
|
969
|
+
promptRouter: _json,
|
|
909
970
|
});
|
|
910
971
|
};
|
|
911
972
|
const de_DocumentBlock = (output, context) => {
|
|
@@ -980,6 +1041,33 @@ const de_GuardrailContextualGroundingPolicyAssessment = (output, context) => {
|
|
|
980
1041
|
filters: (_) => de_GuardrailContextualGroundingFilters(_, context),
|
|
981
1042
|
});
|
|
982
1043
|
};
|
|
1044
|
+
const de_GuardrailConverseContentBlock = (output, context) => {
|
|
1045
|
+
if (output.image != null) {
|
|
1046
|
+
return {
|
|
1047
|
+
image: de_GuardrailConverseImageBlock(output.image, context),
|
|
1048
|
+
};
|
|
1049
|
+
}
|
|
1050
|
+
if (output.text != null) {
|
|
1051
|
+
return {
|
|
1052
|
+
text: _json(output.text),
|
|
1053
|
+
};
|
|
1054
|
+
}
|
|
1055
|
+
return { $unknown: Object.entries(output)[0] };
|
|
1056
|
+
};
|
|
1057
|
+
const de_GuardrailConverseImageBlock = (output, context) => {
|
|
1058
|
+
return take(output, {
|
|
1059
|
+
format: __expectString,
|
|
1060
|
+
source: (_) => de_GuardrailConverseImageSource(__expectUnion(_), context),
|
|
1061
|
+
});
|
|
1062
|
+
};
|
|
1063
|
+
const de_GuardrailConverseImageSource = (output, context) => {
|
|
1064
|
+
if (output.bytes != null) {
|
|
1065
|
+
return {
|
|
1066
|
+
bytes: context.base64Decoder(output.bytes),
|
|
1067
|
+
};
|
|
1068
|
+
}
|
|
1069
|
+
return { $unknown: Object.entries(output)[0] };
|
|
1070
|
+
};
|
|
983
1071
|
const de_GuardrailTraceAssessment = (output, context) => {
|
|
984
1072
|
return take(output, {
|
|
985
1073
|
inputAssessment: (_) => de_GuardrailAssessmentMap(_, context),
|
|
@@ -48,6 +48,12 @@ declare const ApplyGuardrailCommand_base: {
|
|
|
48
48
|
* "grounding_source" || "query" || "guard_content",
|
|
49
49
|
* ],
|
|
50
50
|
* },
|
|
51
|
+
* image: { // GuardrailImageBlock
|
|
52
|
+
* format: "png" || "jpeg", // required
|
|
53
|
+
* source: { // GuardrailImageSource Union: only one key present
|
|
54
|
+
* bytes: new Uint8Array(), // e.g. Buffer.from("") or new TextEncoder().encode("")
|
|
55
|
+
* },
|
|
56
|
+
* },
|
|
51
57
|
* },
|
|
52
58
|
* ],
|
|
53
59
|
* };
|
|
@@ -146,6 +152,10 @@ declare const ApplyGuardrailCommand_base: {
|
|
|
146
152
|
* // guarded: Number("int"),
|
|
147
153
|
* // total: Number("int"),
|
|
148
154
|
* // },
|
|
155
|
+
* // images: { // GuardrailImageCoverage
|
|
156
|
+
* // guarded: Number("int"),
|
|
157
|
+
* // total: Number("int"),
|
|
158
|
+
* // },
|
|
149
159
|
* // },
|
|
150
160
|
* // },
|
|
151
161
|
* // },
|
|
@@ -155,6 +165,10 @@ declare const ApplyGuardrailCommand_base: {
|
|
|
155
165
|
* // guarded: Number("int"),
|
|
156
166
|
* // total: Number("int"),
|
|
157
167
|
* // },
|
|
168
|
+
* // images: {
|
|
169
|
+
* // guarded: Number("int"),
|
|
170
|
+
* // total: Number("int"),
|
|
171
|
+
* // },
|
|
158
172
|
* // },
|
|
159
173
|
* // };
|
|
160
174
|
*
|
|
@@ -133,6 +133,12 @@ declare const ConverseCommand_base: {
|
|
|
133
133
|
* "grounding_source" || "query" || "guard_content",
|
|
134
134
|
* ],
|
|
135
135
|
* },
|
|
136
|
+
* image: { // GuardrailConverseImageBlock
|
|
137
|
+
* format: "png" || "jpeg", // required
|
|
138
|
+
* source: { // GuardrailConverseImageSource Union: only one key present
|
|
139
|
+
* bytes: new Uint8Array(), // e.g. Buffer.from("") or new TextEncoder().encode("")
|
|
140
|
+
* },
|
|
141
|
+
* },
|
|
136
142
|
* },
|
|
137
143
|
* },
|
|
138
144
|
* ],
|
|
@@ -148,6 +154,12 @@ declare const ConverseCommand_base: {
|
|
|
148
154
|
* "grounding_source" || "query" || "guard_content",
|
|
149
155
|
* ],
|
|
150
156
|
* },
|
|
157
|
+
* image: {
|
|
158
|
+
* format: "png" || "jpeg", // required
|
|
159
|
+
* source: {// Union: only one key present
|
|
160
|
+
* bytes: new Uint8Array(), // e.g. Buffer.from("") or new TextEncoder().encode("")
|
|
161
|
+
* },
|
|
162
|
+
* },
|
|
151
163
|
* },
|
|
152
164
|
* },
|
|
153
165
|
* ],
|
|
@@ -277,6 +289,12 @@ declare const ConverseCommand_base: {
|
|
|
277
289
|
* // "grounding_source" || "query" || "guard_content",
|
|
278
290
|
* // ],
|
|
279
291
|
* // },
|
|
292
|
+
* // image: { // GuardrailConverseImageBlock
|
|
293
|
+
* // format: "png" || "jpeg", // required
|
|
294
|
+
* // source: { // GuardrailConverseImageSource Union: only one key present
|
|
295
|
+
* // bytes: new Uint8Array(),
|
|
296
|
+
* // },
|
|
297
|
+
* // },
|
|
280
298
|
* // },
|
|
281
299
|
* // },
|
|
282
300
|
* // ],
|
|
@@ -375,6 +393,10 @@ declare const ConverseCommand_base: {
|
|
|
375
393
|
* // guarded: Number("int"),
|
|
376
394
|
* // total: Number("int"),
|
|
377
395
|
* // },
|
|
396
|
+
* // images: { // GuardrailImageCoverage
|
|
397
|
+
* // guarded: Number("int"),
|
|
398
|
+
* // total: Number("int"),
|
|
399
|
+
* // },
|
|
378
400
|
* // },
|
|
379
401
|
* // },
|
|
380
402
|
* // },
|
|
@@ -458,12 +480,19 @@ declare const ConverseCommand_base: {
|
|
|
458
480
|
* // guarded: Number("int"),
|
|
459
481
|
* // total: Number("int"),
|
|
460
482
|
* // },
|
|
483
|
+
* // images: {
|
|
484
|
+
* // guarded: Number("int"),
|
|
485
|
+
* // total: Number("int"),
|
|
486
|
+
* // },
|
|
461
487
|
* // },
|
|
462
488
|
* // },
|
|
463
489
|
* // },
|
|
464
490
|
* // ],
|
|
465
491
|
* // },
|
|
466
492
|
* // },
|
|
493
|
+
* // promptRouter: { // PromptRouterTrace
|
|
494
|
+
* // invokedModelId: "STRING_VALUE",
|
|
495
|
+
* // },
|
|
467
496
|
* // },
|
|
468
497
|
* // performanceConfig: { // PerformanceConfiguration
|
|
469
498
|
* // latency: "standard" || "optimized",
|
|
@@ -139,6 +139,12 @@ declare const ConverseStreamCommand_base: {
|
|
|
139
139
|
* "grounding_source" || "query" || "guard_content",
|
|
140
140
|
* ],
|
|
141
141
|
* },
|
|
142
|
+
* image: { // GuardrailConverseImageBlock
|
|
143
|
+
* format: "png" || "jpeg", // required
|
|
144
|
+
* source: { // GuardrailConverseImageSource Union: only one key present
|
|
145
|
+
* bytes: new Uint8Array(), // e.g. Buffer.from("") or new TextEncoder().encode("")
|
|
146
|
+
* },
|
|
147
|
+
* },
|
|
142
148
|
* },
|
|
143
149
|
* },
|
|
144
150
|
* ],
|
|
@@ -154,6 +160,12 @@ declare const ConverseStreamCommand_base: {
|
|
|
154
160
|
* "grounding_source" || "query" || "guard_content",
|
|
155
161
|
* ],
|
|
156
162
|
* },
|
|
163
|
+
* image: {
|
|
164
|
+
* format: "png" || "jpeg", // required
|
|
165
|
+
* source: {// Union: only one key present
|
|
166
|
+
* bytes: new Uint8Array(), // e.g. Buffer.from("") or new TextEncoder().encode("")
|
|
167
|
+
* },
|
|
168
|
+
* },
|
|
157
169
|
* },
|
|
158
170
|
* },
|
|
159
171
|
* ],
|
|
@@ -331,6 +343,10 @@ declare const ConverseStreamCommand_base: {
|
|
|
331
343
|
* // guarded: Number("int"),
|
|
332
344
|
* // total: Number("int"),
|
|
333
345
|
* // },
|
|
346
|
+
* // images: { // GuardrailImageCoverage
|
|
347
|
+
* // guarded: Number("int"),
|
|
348
|
+
* // total: Number("int"),
|
|
349
|
+
* // },
|
|
334
350
|
* // },
|
|
335
351
|
* // },
|
|
336
352
|
* // },
|
|
@@ -414,12 +430,19 @@ declare const ConverseStreamCommand_base: {
|
|
|
414
430
|
* // guarded: Number("int"),
|
|
415
431
|
* // total: Number("int"),
|
|
416
432
|
* // },
|
|
433
|
+
* // images: {
|
|
434
|
+
* // guarded: Number("int"),
|
|
435
|
+
* // total: Number("int"),
|
|
436
|
+
* // },
|
|
417
437
|
* // },
|
|
418
438
|
* // },
|
|
419
439
|
* // },
|
|
420
440
|
* // ],
|
|
421
441
|
* // },
|
|
422
442
|
* // },
|
|
443
|
+
* // promptRouter: { // PromptRouterTrace
|
|
444
|
+
* // invokedModelId: "STRING_VALUE",
|
|
445
|
+
* // },
|
|
423
446
|
* // },
|
|
424
447
|
* // performanceConfig: { // PerformanceConfiguration
|
|
425
448
|
* // latency: "standard" || "optimized",
|