@aws-sdk/client-bedrock-runtime 3.750.0 → 3.755.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 +155 -16
- package/dist-es/models/models_0.js +64 -1
- package/dist-es/protocols/Aws_restJson1.js +76 -14
- package/dist-types/commands/ConverseCommand.d.ts +14 -0
- package/dist-types/commands/ConverseStreamCommand.d.ts +12 -0
- package/dist-types/models/models_0.d.ts +175 -3
- package/dist-types/ts3.4/models/models_0.d.ts +116 -0
- package/package.json +1 -1
package/dist-cjs/index.js
CHANGED
|
@@ -33,6 +33,8 @@ __export(src_exports, {
|
|
|
33
33
|
ConflictException: () => ConflictException,
|
|
34
34
|
ContentBlock: () => ContentBlock,
|
|
35
35
|
ContentBlockDelta: () => ContentBlockDelta,
|
|
36
|
+
ContentBlockDeltaEventFilterSensitiveLog: () => ContentBlockDeltaEventFilterSensitiveLog,
|
|
37
|
+
ContentBlockDeltaFilterSensitiveLog: () => ContentBlockDeltaFilterSensitiveLog,
|
|
36
38
|
ContentBlockFilterSensitiveLog: () => ContentBlockFilterSensitiveLog,
|
|
37
39
|
ContentBlockStart: () => ContentBlockStart,
|
|
38
40
|
ConversationRole: () => ConversationRole,
|
|
@@ -99,6 +101,11 @@ __export(src_exports, {
|
|
|
99
101
|
PayloadPartFilterSensitiveLog: () => PayloadPartFilterSensitiveLog,
|
|
100
102
|
PerformanceConfigLatency: () => PerformanceConfigLatency,
|
|
101
103
|
PromptVariableValues: () => PromptVariableValues,
|
|
104
|
+
ReasoningContentBlock: () => ReasoningContentBlock,
|
|
105
|
+
ReasoningContentBlockDelta: () => ReasoningContentBlockDelta,
|
|
106
|
+
ReasoningContentBlockDeltaFilterSensitiveLog: () => ReasoningContentBlockDeltaFilterSensitiveLog,
|
|
107
|
+
ReasoningContentBlockFilterSensitiveLog: () => ReasoningContentBlockFilterSensitiveLog,
|
|
108
|
+
ReasoningTextBlockFilterSensitiveLog: () => ReasoningTextBlockFilterSensitiveLog,
|
|
102
109
|
ResourceNotFoundException: () => ResourceNotFoundException,
|
|
103
110
|
ResponseStream: () => ResponseStream,
|
|
104
111
|
ResponseStreamFilterSensitiveLog: () => ResponseStreamFilterSensitiveLog,
|
|
@@ -640,6 +647,16 @@ var ImageSource;
|
|
|
640
647
|
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
641
648
|
}, "visit");
|
|
642
649
|
})(ImageSource || (ImageSource = {}));
|
|
650
|
+
var ReasoningContentBlock;
|
|
651
|
+
((ReasoningContentBlock2) => {
|
|
652
|
+
ReasoningContentBlock2.visit = /* @__PURE__ */ __name((value, visitor) => {
|
|
653
|
+
if (value.reasoningText !== void 0)
|
|
654
|
+
return visitor.reasoningText(value.reasoningText);
|
|
655
|
+
if (value.redactedContent !== void 0)
|
|
656
|
+
return visitor.redactedContent(value.redactedContent);
|
|
657
|
+
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
658
|
+
}, "visit");
|
|
659
|
+
})(ReasoningContentBlock || (ReasoningContentBlock = {}));
|
|
643
660
|
var VideoFormat = {
|
|
644
661
|
FLV: "flv",
|
|
645
662
|
MKV: "mkv",
|
|
@@ -698,6 +715,8 @@ var ContentBlock;
|
|
|
698
715
|
return visitor.toolResult(value.toolResult);
|
|
699
716
|
if (value.guardContent !== void 0)
|
|
700
717
|
return visitor.guardContent(value.guardContent);
|
|
718
|
+
if (value.reasoningContent !== void 0)
|
|
719
|
+
return visitor.reasoningContent(value.reasoningContent);
|
|
701
720
|
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
702
721
|
}, "visit");
|
|
703
722
|
})(ContentBlock || (ContentBlock = {}));
|
|
@@ -842,13 +861,27 @@ var GuardrailStreamProcessingMode = {
|
|
|
842
861
|
ASYNC: "async",
|
|
843
862
|
SYNC: "sync"
|
|
844
863
|
};
|
|
864
|
+
var ReasoningContentBlockDelta;
|
|
865
|
+
((ReasoningContentBlockDelta3) => {
|
|
866
|
+
ReasoningContentBlockDelta3.visit = /* @__PURE__ */ __name((value, visitor) => {
|
|
867
|
+
if (value.text !== void 0)
|
|
868
|
+
return visitor.text(value.text);
|
|
869
|
+
if (value.redactedContent !== void 0)
|
|
870
|
+
return visitor.redactedContent(value.redactedContent);
|
|
871
|
+
if (value.signature !== void 0)
|
|
872
|
+
return visitor.signature(value.signature);
|
|
873
|
+
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
874
|
+
}, "visit");
|
|
875
|
+
})(ReasoningContentBlockDelta || (ReasoningContentBlockDelta = {}));
|
|
845
876
|
var ContentBlockDelta;
|
|
846
|
-
((
|
|
847
|
-
|
|
877
|
+
((ContentBlockDelta3) => {
|
|
878
|
+
ContentBlockDelta3.visit = /* @__PURE__ */ __name((value, visitor) => {
|
|
848
879
|
if (value.text !== void 0)
|
|
849
880
|
return visitor.text(value.text);
|
|
850
881
|
if (value.toolUse !== void 0)
|
|
851
882
|
return visitor.toolUse(value.toolUse);
|
|
883
|
+
if (value.reasoningContent !== void 0)
|
|
884
|
+
return visitor.reasoningContent(value.reasoningContent);
|
|
852
885
|
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
853
886
|
}, "visit");
|
|
854
887
|
})(ContentBlockDelta || (ContentBlockDelta = {}));
|
|
@@ -1003,6 +1036,17 @@ var GuardrailConverseContentBlockFilterSensitiveLog = /* @__PURE__ */ __name((ob
|
|
|
1003
1036
|
if (obj.$unknown !== void 0)
|
|
1004
1037
|
return { [obj.$unknown[0]]: "UNKNOWN" };
|
|
1005
1038
|
}, "GuardrailConverseContentBlockFilterSensitiveLog");
|
|
1039
|
+
var ReasoningTextBlockFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
|
|
1040
|
+
...obj
|
|
1041
|
+
}), "ReasoningTextBlockFilterSensitiveLog");
|
|
1042
|
+
var ReasoningContentBlockFilterSensitiveLog = /* @__PURE__ */ __name((obj) => {
|
|
1043
|
+
if (obj.reasoningText !== void 0)
|
|
1044
|
+
return { reasoningText: import_smithy_client.SENSITIVE_STRING };
|
|
1045
|
+
if (obj.redactedContent !== void 0)
|
|
1046
|
+
return { redactedContent: obj.redactedContent };
|
|
1047
|
+
if (obj.$unknown !== void 0)
|
|
1048
|
+
return { [obj.$unknown[0]]: "UNKNOWN" };
|
|
1049
|
+
}, "ReasoningContentBlockFilterSensitiveLog");
|
|
1006
1050
|
var ContentBlockFilterSensitiveLog = /* @__PURE__ */ __name((obj) => {
|
|
1007
1051
|
if (obj.text !== void 0)
|
|
1008
1052
|
return { text: obj.text };
|
|
@@ -1018,6 +1062,8 @@ var ContentBlockFilterSensitiveLog = /* @__PURE__ */ __name((obj) => {
|
|
|
1018
1062
|
return { toolResult: obj.toolResult };
|
|
1019
1063
|
if (obj.guardContent !== void 0)
|
|
1020
1064
|
return { guardContent: GuardrailConverseContentBlockFilterSensitiveLog(obj.guardContent) };
|
|
1065
|
+
if (obj.reasoningContent !== void 0)
|
|
1066
|
+
return { reasoningContent: import_smithy_client.SENSITIVE_STRING };
|
|
1021
1067
|
if (obj.$unknown !== void 0)
|
|
1022
1068
|
return { [obj.$unknown[0]]: "UNKNOWN" };
|
|
1023
1069
|
}, "ContentBlockFilterSensitiveLog");
|
|
@@ -1059,13 +1105,37 @@ var ConverseStreamRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
|
|
|
1059
1105
|
...obj.promptVariables && { promptVariables: import_smithy_client.SENSITIVE_STRING },
|
|
1060
1106
|
...obj.requestMetadata && { requestMetadata: import_smithy_client.SENSITIVE_STRING }
|
|
1061
1107
|
}), "ConverseStreamRequestFilterSensitiveLog");
|
|
1108
|
+
var ReasoningContentBlockDeltaFilterSensitiveLog = /* @__PURE__ */ __name((obj) => {
|
|
1109
|
+
if (obj.text !== void 0)
|
|
1110
|
+
return { text: obj.text };
|
|
1111
|
+
if (obj.redactedContent !== void 0)
|
|
1112
|
+
return { redactedContent: obj.redactedContent };
|
|
1113
|
+
if (obj.signature !== void 0)
|
|
1114
|
+
return { signature: obj.signature };
|
|
1115
|
+
if (obj.$unknown !== void 0)
|
|
1116
|
+
return { [obj.$unknown[0]]: "UNKNOWN" };
|
|
1117
|
+
}, "ReasoningContentBlockDeltaFilterSensitiveLog");
|
|
1118
|
+
var ContentBlockDeltaFilterSensitiveLog = /* @__PURE__ */ __name((obj) => {
|
|
1119
|
+
if (obj.text !== void 0)
|
|
1120
|
+
return { text: obj.text };
|
|
1121
|
+
if (obj.toolUse !== void 0)
|
|
1122
|
+
return { toolUse: obj.toolUse };
|
|
1123
|
+
if (obj.reasoningContent !== void 0)
|
|
1124
|
+
return { reasoningContent: import_smithy_client.SENSITIVE_STRING };
|
|
1125
|
+
if (obj.$unknown !== void 0)
|
|
1126
|
+
return { [obj.$unknown[0]]: "UNKNOWN" };
|
|
1127
|
+
}, "ContentBlockDeltaFilterSensitiveLog");
|
|
1128
|
+
var ContentBlockDeltaEventFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
|
|
1129
|
+
...obj,
|
|
1130
|
+
...obj.delta && { delta: ContentBlockDeltaFilterSensitiveLog(obj.delta) }
|
|
1131
|
+
}), "ContentBlockDeltaEventFilterSensitiveLog");
|
|
1062
1132
|
var ConverseStreamOutputFilterSensitiveLog = /* @__PURE__ */ __name((obj) => {
|
|
1063
1133
|
if (obj.messageStart !== void 0)
|
|
1064
1134
|
return { messageStart: obj.messageStart };
|
|
1065
1135
|
if (obj.contentBlockStart !== void 0)
|
|
1066
1136
|
return { contentBlockStart: obj.contentBlockStart };
|
|
1067
1137
|
if (obj.contentBlockDelta !== void 0)
|
|
1068
|
-
return { contentBlockDelta: obj.contentBlockDelta };
|
|
1138
|
+
return { contentBlockDelta: ContentBlockDeltaEventFilterSensitiveLog(obj.contentBlockDelta) };
|
|
1069
1139
|
if (obj.contentBlockStop !== void 0)
|
|
1070
1140
|
return { contentBlockStop: obj.contentBlockStop };
|
|
1071
1141
|
if (obj.messageStop !== void 0)
|
|
@@ -1738,7 +1808,7 @@ var de_ResponseStream = /* @__PURE__ */ __name((output, context) => {
|
|
|
1738
1808
|
var de_ContentBlockDeltaEvent_event = /* @__PURE__ */ __name(async (output, context) => {
|
|
1739
1809
|
const contents = {};
|
|
1740
1810
|
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
1741
|
-
Object.assign(contents, (
|
|
1811
|
+
Object.assign(contents, de_ContentBlockDeltaEvent(data, context));
|
|
1742
1812
|
return contents;
|
|
1743
1813
|
}, "de_ContentBlockDeltaEvent_event");
|
|
1744
1814
|
var de_ContentBlockStartEvent_event = /* @__PURE__ */ __name(async (output, context) => {
|
|
@@ -1824,11 +1894,12 @@ var se_ContentBlock = /* @__PURE__ */ __name((input, context) => {
|
|
|
1824
1894
|
document: (value) => ({ document: se_DocumentBlock(value, context) }),
|
|
1825
1895
|
guardContent: (value) => ({ guardContent: se_GuardrailConverseContentBlock(value, context) }),
|
|
1826
1896
|
image: (value) => ({ image: se_ImageBlock(value, context) }),
|
|
1897
|
+
reasoningContent: (value) => ({ reasoningContent: se_ReasoningContentBlock(value, context) }),
|
|
1827
1898
|
text: (value) => ({ text: value }),
|
|
1828
1899
|
toolResult: (value) => ({ toolResult: se_ToolResultBlock(value, context) }),
|
|
1829
1900
|
toolUse: (value) => ({ toolUse: se_ToolUseBlock(value, context) }),
|
|
1830
1901
|
video: (value) => ({ video: se_VideoBlock(value, context) }),
|
|
1831
|
-
_: (name, value) => ({ name: value })
|
|
1902
|
+
_: (name, value) => ({ [name]: value })
|
|
1832
1903
|
});
|
|
1833
1904
|
}, "se_ContentBlock");
|
|
1834
1905
|
var se_ContentBlocks = /* @__PURE__ */ __name((input, context) => {
|
|
@@ -1846,14 +1917,14 @@ var se_DocumentBlock = /* @__PURE__ */ __name((input, context) => {
|
|
|
1846
1917
|
var se_DocumentSource = /* @__PURE__ */ __name((input, context) => {
|
|
1847
1918
|
return DocumentSource.visit(input, {
|
|
1848
1919
|
bytes: (value) => ({ bytes: context.base64Encoder(value) }),
|
|
1849
|
-
_: (name, value) => ({ name: value })
|
|
1920
|
+
_: (name, value) => ({ [name]: value })
|
|
1850
1921
|
});
|
|
1851
1922
|
}, "se_DocumentSource");
|
|
1852
1923
|
var se_GuardrailContentBlock = /* @__PURE__ */ __name((input, context) => {
|
|
1853
1924
|
return GuardrailContentBlock.visit(input, {
|
|
1854
1925
|
image: (value) => ({ image: se_GuardrailImageBlock(value, context) }),
|
|
1855
1926
|
text: (value) => ({ text: (0, import_smithy_client._json)(value) }),
|
|
1856
|
-
_: (name, value) => ({ name: value })
|
|
1927
|
+
_: (name, value) => ({ [name]: value })
|
|
1857
1928
|
});
|
|
1858
1929
|
}, "se_GuardrailContentBlock");
|
|
1859
1930
|
var se_GuardrailContentBlockList = /* @__PURE__ */ __name((input, context) => {
|
|
@@ -1865,7 +1936,7 @@ var se_GuardrailConverseContentBlock = /* @__PURE__ */ __name((input, context) =
|
|
|
1865
1936
|
return GuardrailConverseContentBlock.visit(input, {
|
|
1866
1937
|
image: (value) => ({ image: se_GuardrailConverseImageBlock(value, context) }),
|
|
1867
1938
|
text: (value) => ({ text: (0, import_smithy_client._json)(value) }),
|
|
1868
|
-
_: (name, value) => ({ name: value })
|
|
1939
|
+
_: (name, value) => ({ [name]: value })
|
|
1869
1940
|
});
|
|
1870
1941
|
}, "se_GuardrailConverseContentBlock");
|
|
1871
1942
|
var se_GuardrailConverseImageBlock = /* @__PURE__ */ __name((input, context) => {
|
|
@@ -1877,7 +1948,7 @@ var se_GuardrailConverseImageBlock = /* @__PURE__ */ __name((input, context) =>
|
|
|
1877
1948
|
var se_GuardrailConverseImageSource = /* @__PURE__ */ __name((input, context) => {
|
|
1878
1949
|
return GuardrailConverseImageSource.visit(input, {
|
|
1879
1950
|
bytes: (value) => ({ bytes: context.base64Encoder(value) }),
|
|
1880
|
-
_: (name, value) => ({ name: value })
|
|
1951
|
+
_: (name, value) => ({ [name]: value })
|
|
1881
1952
|
});
|
|
1882
1953
|
}, "se_GuardrailConverseImageSource");
|
|
1883
1954
|
var se_GuardrailImageBlock = /* @__PURE__ */ __name((input, context) => {
|
|
@@ -1889,7 +1960,7 @@ var se_GuardrailImageBlock = /* @__PURE__ */ __name((input, context) => {
|
|
|
1889
1960
|
var se_GuardrailImageSource = /* @__PURE__ */ __name((input, context) => {
|
|
1890
1961
|
return GuardrailImageSource.visit(input, {
|
|
1891
1962
|
bytes: (value) => ({ bytes: context.base64Encoder(value) }),
|
|
1892
|
-
_: (name, value) => ({ name: value })
|
|
1963
|
+
_: (name, value) => ({ [name]: value })
|
|
1893
1964
|
});
|
|
1894
1965
|
}, "se_GuardrailImageSource");
|
|
1895
1966
|
var se_ImageBlock = /* @__PURE__ */ __name((input, context) => {
|
|
@@ -1901,7 +1972,7 @@ var se_ImageBlock = /* @__PURE__ */ __name((input, context) => {
|
|
|
1901
1972
|
var se_ImageSource = /* @__PURE__ */ __name((input, context) => {
|
|
1902
1973
|
return ImageSource.visit(input, {
|
|
1903
1974
|
bytes: (value) => ({ bytes: context.base64Encoder(value) }),
|
|
1904
|
-
_: (name, value) => ({ name: value })
|
|
1975
|
+
_: (name, value) => ({ [name]: value })
|
|
1905
1976
|
});
|
|
1906
1977
|
}, "se_ImageSource");
|
|
1907
1978
|
var se_InferenceConfiguration = /* @__PURE__ */ __name((input, context) => {
|
|
@@ -1926,11 +1997,18 @@ var se_Messages = /* @__PURE__ */ __name((input, context) => {
|
|
|
1926
1997
|
var se_ModelInputPayload = /* @__PURE__ */ __name((input, context) => {
|
|
1927
1998
|
return input;
|
|
1928
1999
|
}, "se_ModelInputPayload");
|
|
2000
|
+
var se_ReasoningContentBlock = /* @__PURE__ */ __name((input, context) => {
|
|
2001
|
+
return ReasoningContentBlock.visit(input, {
|
|
2002
|
+
reasoningText: (value) => ({ reasoningText: (0, import_smithy_client._json)(value) }),
|
|
2003
|
+
redactedContent: (value) => ({ redactedContent: context.base64Encoder(value) }),
|
|
2004
|
+
_: (name, value) => ({ [name]: value })
|
|
2005
|
+
});
|
|
2006
|
+
}, "se_ReasoningContentBlock");
|
|
1929
2007
|
var se_SystemContentBlock = /* @__PURE__ */ __name((input, context) => {
|
|
1930
2008
|
return SystemContentBlock.visit(input, {
|
|
1931
2009
|
guardContent: (value) => ({ guardContent: se_GuardrailConverseContentBlock(value, context) }),
|
|
1932
2010
|
text: (value) => ({ text: value }),
|
|
1933
|
-
_: (name, value) => ({ name: value })
|
|
2011
|
+
_: (name, value) => ({ [name]: value })
|
|
1934
2012
|
});
|
|
1935
2013
|
}, "se_SystemContentBlock");
|
|
1936
2014
|
var se_SystemContentBlocks = /* @__PURE__ */ __name((input, context) => {
|
|
@@ -1941,7 +2019,7 @@ var se_SystemContentBlocks = /* @__PURE__ */ __name((input, context) => {
|
|
|
1941
2019
|
var se_Tool = /* @__PURE__ */ __name((input, context) => {
|
|
1942
2020
|
return Tool.visit(input, {
|
|
1943
2021
|
toolSpec: (value) => ({ toolSpec: se_ToolSpecification(value, context) }),
|
|
1944
|
-
_: (name, value) => ({ name: value })
|
|
2022
|
+
_: (name, value) => ({ [name]: value })
|
|
1945
2023
|
});
|
|
1946
2024
|
}, "se_Tool");
|
|
1947
2025
|
var se_ToolConfiguration = /* @__PURE__ */ __name((input, context) => {
|
|
@@ -1953,7 +2031,7 @@ var se_ToolConfiguration = /* @__PURE__ */ __name((input, context) => {
|
|
|
1953
2031
|
var se_ToolInputSchema = /* @__PURE__ */ __name((input, context) => {
|
|
1954
2032
|
return ToolInputSchema.visit(input, {
|
|
1955
2033
|
json: (value) => ({ json: se_Document(value, context) }),
|
|
1956
|
-
_: (name, value) => ({ name: value })
|
|
2034
|
+
_: (name, value) => ({ [name]: value })
|
|
1957
2035
|
});
|
|
1958
2036
|
}, "se_ToolInputSchema");
|
|
1959
2037
|
var se_ToolResultBlock = /* @__PURE__ */ __name((input, context) => {
|
|
@@ -1970,7 +2048,7 @@ var se_ToolResultContentBlock = /* @__PURE__ */ __name((input, context) => {
|
|
|
1970
2048
|
json: (value) => ({ json: se_Document(value, context) }),
|
|
1971
2049
|
text: (value) => ({ text: value }),
|
|
1972
2050
|
video: (value) => ({ video: se_VideoBlock(value, context) }),
|
|
1973
|
-
_: (name, value) => ({ name: value })
|
|
2051
|
+
_: (name, value) => ({ [name]: value })
|
|
1974
2052
|
});
|
|
1975
2053
|
}, "se_ToolResultContentBlock");
|
|
1976
2054
|
var se_ToolResultContentBlocks = /* @__PURE__ */ __name((input, context) => {
|
|
@@ -2007,7 +2085,7 @@ var se_VideoSource = /* @__PURE__ */ __name((input, context) => {
|
|
|
2007
2085
|
return VideoSource.visit(input, {
|
|
2008
2086
|
bytes: (value) => ({ bytes: context.base64Encoder(value) }),
|
|
2009
2087
|
s3Location: (value) => ({ s3Location: (0, import_smithy_client._json)(value) }),
|
|
2010
|
-
_: (name, value) => ({ name: value })
|
|
2088
|
+
_: (name, value) => ({ [name]: value })
|
|
2011
2089
|
});
|
|
2012
2090
|
}, "se_VideoSource");
|
|
2013
2091
|
var se_Document = /* @__PURE__ */ __name((input, context) => {
|
|
@@ -2048,6 +2126,11 @@ var de_ContentBlock = /* @__PURE__ */ __name((output, context) => {
|
|
|
2048
2126
|
image: de_ImageBlock(output.image, context)
|
|
2049
2127
|
};
|
|
2050
2128
|
}
|
|
2129
|
+
if (output.reasoningContent != null) {
|
|
2130
|
+
return {
|
|
2131
|
+
reasoningContent: de_ReasoningContentBlock((0, import_core2.awsExpectUnion)(output.reasoningContent), context)
|
|
2132
|
+
};
|
|
2133
|
+
}
|
|
2051
2134
|
if ((0, import_smithy_client.expectString)(output.text) !== void 0) {
|
|
2052
2135
|
return { text: (0, import_smithy_client.expectString)(output.text) };
|
|
2053
2136
|
}
|
|
@@ -2068,6 +2151,28 @@ var de_ContentBlock = /* @__PURE__ */ __name((output, context) => {
|
|
|
2068
2151
|
}
|
|
2069
2152
|
return { $unknown: Object.entries(output)[0] };
|
|
2070
2153
|
}, "de_ContentBlock");
|
|
2154
|
+
var de_ContentBlockDelta = /* @__PURE__ */ __name((output, context) => {
|
|
2155
|
+
if (output.reasoningContent != null) {
|
|
2156
|
+
return {
|
|
2157
|
+
reasoningContent: de_ReasoningContentBlockDelta((0, import_core2.awsExpectUnion)(output.reasoningContent), context)
|
|
2158
|
+
};
|
|
2159
|
+
}
|
|
2160
|
+
if ((0, import_smithy_client.expectString)(output.text) !== void 0) {
|
|
2161
|
+
return { text: (0, import_smithy_client.expectString)(output.text) };
|
|
2162
|
+
}
|
|
2163
|
+
if (output.toolUse != null) {
|
|
2164
|
+
return {
|
|
2165
|
+
toolUse: (0, import_smithy_client._json)(output.toolUse)
|
|
2166
|
+
};
|
|
2167
|
+
}
|
|
2168
|
+
return { $unknown: Object.entries(output)[0] };
|
|
2169
|
+
}, "de_ContentBlockDelta");
|
|
2170
|
+
var de_ContentBlockDeltaEvent = /* @__PURE__ */ __name((output, context) => {
|
|
2171
|
+
return (0, import_smithy_client.take)(output, {
|
|
2172
|
+
contentBlockIndex: import_smithy_client.expectInt32,
|
|
2173
|
+
delta: (_) => de_ContentBlockDelta((0, import_core2.awsExpectUnion)(_), context)
|
|
2174
|
+
});
|
|
2175
|
+
}, "de_ContentBlockDeltaEvent");
|
|
2071
2176
|
var de_ContentBlocks = /* @__PURE__ */ __name((output, context) => {
|
|
2072
2177
|
const retVal = (output || []).filter((e) => e != null).map((entry) => {
|
|
2073
2178
|
return de_ContentBlock((0, import_core2.awsExpectUnion)(entry), context);
|
|
@@ -2235,6 +2340,33 @@ var de_PayloadPart = /* @__PURE__ */ __name((output, context) => {
|
|
|
2235
2340
|
bytes: context.base64Decoder
|
|
2236
2341
|
});
|
|
2237
2342
|
}, "de_PayloadPart");
|
|
2343
|
+
var de_ReasoningContentBlock = /* @__PURE__ */ __name((output, context) => {
|
|
2344
|
+
if (output.reasoningText != null) {
|
|
2345
|
+
return {
|
|
2346
|
+
reasoningText: (0, import_smithy_client._json)(output.reasoningText)
|
|
2347
|
+
};
|
|
2348
|
+
}
|
|
2349
|
+
if (output.redactedContent != null) {
|
|
2350
|
+
return {
|
|
2351
|
+
redactedContent: context.base64Decoder(output.redactedContent)
|
|
2352
|
+
};
|
|
2353
|
+
}
|
|
2354
|
+
return { $unknown: Object.entries(output)[0] };
|
|
2355
|
+
}, "de_ReasoningContentBlock");
|
|
2356
|
+
var de_ReasoningContentBlockDelta = /* @__PURE__ */ __name((output, context) => {
|
|
2357
|
+
if (output.redactedContent != null) {
|
|
2358
|
+
return {
|
|
2359
|
+
redactedContent: context.base64Decoder(output.redactedContent)
|
|
2360
|
+
};
|
|
2361
|
+
}
|
|
2362
|
+
if ((0, import_smithy_client.expectString)(output.signature) !== void 0) {
|
|
2363
|
+
return { signature: (0, import_smithy_client.expectString)(output.signature) };
|
|
2364
|
+
}
|
|
2365
|
+
if ((0, import_smithy_client.expectString)(output.text) !== void 0) {
|
|
2366
|
+
return { text: (0, import_smithy_client.expectString)(output.text) };
|
|
2367
|
+
}
|
|
2368
|
+
return { $unknown: Object.entries(output)[0] };
|
|
2369
|
+
}, "de_ReasoningContentBlockDelta");
|
|
2238
2370
|
var de_ToolResultBlock = /* @__PURE__ */ __name((output, context) => {
|
|
2239
2371
|
return (0, import_smithy_client.take)(output, {
|
|
2240
2372
|
content: (_) => de_ToolResultContentBlocks(_, context),
|
|
@@ -2538,6 +2670,7 @@ var paginateListAsyncInvokes = (0, import_core.createPaginator)(BedrockRuntimeCl
|
|
|
2538
2670
|
GuardrailConverseContentBlock,
|
|
2539
2671
|
ImageFormat,
|
|
2540
2672
|
ImageSource,
|
|
2673
|
+
ReasoningContentBlock,
|
|
2541
2674
|
VideoFormat,
|
|
2542
2675
|
VideoSource,
|
|
2543
2676
|
ToolResultContentBlock,
|
|
@@ -2556,6 +2689,7 @@ var paginateListAsyncInvokes = (0, import_core.createPaginator)(BedrockRuntimeCl
|
|
|
2556
2689
|
ModelNotReadyException,
|
|
2557
2690
|
ModelTimeoutException,
|
|
2558
2691
|
GuardrailStreamProcessingMode,
|
|
2692
|
+
ReasoningContentBlockDelta,
|
|
2559
2693
|
ContentBlockDelta,
|
|
2560
2694
|
ContentBlockStart,
|
|
2561
2695
|
ModelStreamErrorException,
|
|
@@ -2573,6 +2707,8 @@ var paginateListAsyncInvokes = (0, import_core.createPaginator)(BedrockRuntimeCl
|
|
|
2573
2707
|
GuardrailConverseImageSourceFilterSensitiveLog,
|
|
2574
2708
|
GuardrailConverseImageBlockFilterSensitiveLog,
|
|
2575
2709
|
GuardrailConverseContentBlockFilterSensitiveLog,
|
|
2710
|
+
ReasoningTextBlockFilterSensitiveLog,
|
|
2711
|
+
ReasoningContentBlockFilterSensitiveLog,
|
|
2576
2712
|
ContentBlockFilterSensitiveLog,
|
|
2577
2713
|
MessageFilterSensitiveLog,
|
|
2578
2714
|
SystemContentBlockFilterSensitiveLog,
|
|
@@ -2580,6 +2716,9 @@ var paginateListAsyncInvokes = (0, import_core.createPaginator)(BedrockRuntimeCl
|
|
|
2580
2716
|
ConverseOutputFilterSensitiveLog,
|
|
2581
2717
|
ConverseResponseFilterSensitiveLog,
|
|
2582
2718
|
ConverseStreamRequestFilterSensitiveLog,
|
|
2719
|
+
ReasoningContentBlockDeltaFilterSensitiveLog,
|
|
2720
|
+
ContentBlockDeltaFilterSensitiveLog,
|
|
2721
|
+
ContentBlockDeltaEventFilterSensitiveLog,
|
|
2583
2722
|
ConverseStreamOutputFilterSensitiveLog,
|
|
2584
2723
|
ConverseStreamResponseFilterSensitiveLog,
|
|
2585
2724
|
InvokeModelRequestFilterSensitiveLog,
|
|
@@ -295,6 +295,16 @@ export var ImageSource;
|
|
|
295
295
|
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
296
296
|
};
|
|
297
297
|
})(ImageSource || (ImageSource = {}));
|
|
298
|
+
export var ReasoningContentBlock;
|
|
299
|
+
(function (ReasoningContentBlock) {
|
|
300
|
+
ReasoningContentBlock.visit = (value, visitor) => {
|
|
301
|
+
if (value.reasoningText !== undefined)
|
|
302
|
+
return visitor.reasoningText(value.reasoningText);
|
|
303
|
+
if (value.redactedContent !== undefined)
|
|
304
|
+
return visitor.redactedContent(value.redactedContent);
|
|
305
|
+
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
306
|
+
};
|
|
307
|
+
})(ReasoningContentBlock || (ReasoningContentBlock = {}));
|
|
298
308
|
export const VideoFormat = {
|
|
299
309
|
FLV: "flv",
|
|
300
310
|
MKV: "mkv",
|
|
@@ -353,6 +363,8 @@ export var ContentBlock;
|
|
|
353
363
|
return visitor.toolResult(value.toolResult);
|
|
354
364
|
if (value.guardContent !== undefined)
|
|
355
365
|
return visitor.guardContent(value.guardContent);
|
|
366
|
+
if (value.reasoningContent !== undefined)
|
|
367
|
+
return visitor.reasoningContent(value.reasoningContent);
|
|
356
368
|
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
357
369
|
};
|
|
358
370
|
})(ContentBlock || (ContentBlock = {}));
|
|
@@ -471,6 +483,18 @@ export const GuardrailStreamProcessingMode = {
|
|
|
471
483
|
ASYNC: "async",
|
|
472
484
|
SYNC: "sync",
|
|
473
485
|
};
|
|
486
|
+
export var ReasoningContentBlockDelta;
|
|
487
|
+
(function (ReasoningContentBlockDelta) {
|
|
488
|
+
ReasoningContentBlockDelta.visit = (value, visitor) => {
|
|
489
|
+
if (value.text !== undefined)
|
|
490
|
+
return visitor.text(value.text);
|
|
491
|
+
if (value.redactedContent !== undefined)
|
|
492
|
+
return visitor.redactedContent(value.redactedContent);
|
|
493
|
+
if (value.signature !== undefined)
|
|
494
|
+
return visitor.signature(value.signature);
|
|
495
|
+
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
496
|
+
};
|
|
497
|
+
})(ReasoningContentBlockDelta || (ReasoningContentBlockDelta = {}));
|
|
474
498
|
export var ContentBlockDelta;
|
|
475
499
|
(function (ContentBlockDelta) {
|
|
476
500
|
ContentBlockDelta.visit = (value, visitor) => {
|
|
@@ -478,6 +502,8 @@ export var ContentBlockDelta;
|
|
|
478
502
|
return visitor.text(value.text);
|
|
479
503
|
if (value.toolUse !== undefined)
|
|
480
504
|
return visitor.toolUse(value.toolUse);
|
|
505
|
+
if (value.reasoningContent !== undefined)
|
|
506
|
+
return visitor.reasoningContent(value.reasoningContent);
|
|
481
507
|
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
482
508
|
};
|
|
483
509
|
})(ContentBlockDelta || (ContentBlockDelta = {}));
|
|
@@ -618,6 +644,17 @@ export const GuardrailConverseContentBlockFilterSensitiveLog = (obj) => {
|
|
|
618
644
|
if (obj.$unknown !== undefined)
|
|
619
645
|
return { [obj.$unknown[0]]: "UNKNOWN" };
|
|
620
646
|
};
|
|
647
|
+
export const ReasoningTextBlockFilterSensitiveLog = (obj) => ({
|
|
648
|
+
...obj,
|
|
649
|
+
});
|
|
650
|
+
export const ReasoningContentBlockFilterSensitiveLog = (obj) => {
|
|
651
|
+
if (obj.reasoningText !== undefined)
|
|
652
|
+
return { reasoningText: SENSITIVE_STRING };
|
|
653
|
+
if (obj.redactedContent !== undefined)
|
|
654
|
+
return { redactedContent: obj.redactedContent };
|
|
655
|
+
if (obj.$unknown !== undefined)
|
|
656
|
+
return { [obj.$unknown[0]]: "UNKNOWN" };
|
|
657
|
+
};
|
|
621
658
|
export const ContentBlockFilterSensitiveLog = (obj) => {
|
|
622
659
|
if (obj.text !== undefined)
|
|
623
660
|
return { text: obj.text };
|
|
@@ -633,6 +670,8 @@ export const ContentBlockFilterSensitiveLog = (obj) => {
|
|
|
633
670
|
return { toolResult: obj.toolResult };
|
|
634
671
|
if (obj.guardContent !== undefined)
|
|
635
672
|
return { guardContent: GuardrailConverseContentBlockFilterSensitiveLog(obj.guardContent) };
|
|
673
|
+
if (obj.reasoningContent !== undefined)
|
|
674
|
+
return { reasoningContent: SENSITIVE_STRING };
|
|
636
675
|
if (obj.$unknown !== undefined)
|
|
637
676
|
return { [obj.$unknown[0]]: "UNKNOWN" };
|
|
638
677
|
};
|
|
@@ -674,13 +713,37 @@ export const ConverseStreamRequestFilterSensitiveLog = (obj) => ({
|
|
|
674
713
|
...(obj.promptVariables && { promptVariables: SENSITIVE_STRING }),
|
|
675
714
|
...(obj.requestMetadata && { requestMetadata: SENSITIVE_STRING }),
|
|
676
715
|
});
|
|
716
|
+
export const ReasoningContentBlockDeltaFilterSensitiveLog = (obj) => {
|
|
717
|
+
if (obj.text !== undefined)
|
|
718
|
+
return { text: obj.text };
|
|
719
|
+
if (obj.redactedContent !== undefined)
|
|
720
|
+
return { redactedContent: obj.redactedContent };
|
|
721
|
+
if (obj.signature !== undefined)
|
|
722
|
+
return { signature: obj.signature };
|
|
723
|
+
if (obj.$unknown !== undefined)
|
|
724
|
+
return { [obj.$unknown[0]]: "UNKNOWN" };
|
|
725
|
+
};
|
|
726
|
+
export const ContentBlockDeltaFilterSensitiveLog = (obj) => {
|
|
727
|
+
if (obj.text !== undefined)
|
|
728
|
+
return { text: obj.text };
|
|
729
|
+
if (obj.toolUse !== undefined)
|
|
730
|
+
return { toolUse: obj.toolUse };
|
|
731
|
+
if (obj.reasoningContent !== undefined)
|
|
732
|
+
return { reasoningContent: SENSITIVE_STRING };
|
|
733
|
+
if (obj.$unknown !== undefined)
|
|
734
|
+
return { [obj.$unknown[0]]: "UNKNOWN" };
|
|
735
|
+
};
|
|
736
|
+
export const ContentBlockDeltaEventFilterSensitiveLog = (obj) => ({
|
|
737
|
+
...obj,
|
|
738
|
+
...(obj.delta && { delta: ContentBlockDeltaFilterSensitiveLog(obj.delta) }),
|
|
739
|
+
});
|
|
677
740
|
export const ConverseStreamOutputFilterSensitiveLog = (obj) => {
|
|
678
741
|
if (obj.messageStart !== undefined)
|
|
679
742
|
return { messageStart: obj.messageStart };
|
|
680
743
|
if (obj.contentBlockStart !== undefined)
|
|
681
744
|
return { contentBlockStart: obj.contentBlockStart };
|
|
682
745
|
if (obj.contentBlockDelta !== undefined)
|
|
683
|
-
return { contentBlockDelta: obj.contentBlockDelta };
|
|
746
|
+
return { contentBlockDelta: ContentBlockDeltaEventFilterSensitiveLog(obj.contentBlockDelta) };
|
|
684
747
|
if (obj.contentBlockStop !== undefined)
|
|
685
748
|
return { contentBlockStop: obj.contentBlockStop };
|
|
686
749
|
if (obj.messageStop !== undefined)
|
|
@@ -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, GuardrailContentBlock, GuardrailConverseContentBlock, GuardrailConverseImageSource, GuardrailImageSource, ImageSource, InternalServerException, ModelErrorException, ModelNotReadyException, ModelStreamErrorException, ModelTimeoutException, ResourceNotFoundException, ServiceQuotaExceededException, ServiceUnavailableException, SystemContentBlock, 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, ReasoningContentBlock, 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 = {
|
|
@@ -589,7 +589,7 @@ const de_ResponseStream = (output, context) => {
|
|
|
589
589
|
const de_ContentBlockDeltaEvent_event = async (output, context) => {
|
|
590
590
|
const contents = {};
|
|
591
591
|
const data = await parseBody(output.body, context);
|
|
592
|
-
Object.assign(contents,
|
|
592
|
+
Object.assign(contents, de_ContentBlockDeltaEvent(data, context));
|
|
593
593
|
return contents;
|
|
594
594
|
};
|
|
595
595
|
const de_ContentBlockStartEvent_event = async (output, context) => {
|
|
@@ -675,11 +675,12 @@ const se_ContentBlock = (input, context) => {
|
|
|
675
675
|
document: (value) => ({ document: se_DocumentBlock(value, context) }),
|
|
676
676
|
guardContent: (value) => ({ guardContent: se_GuardrailConverseContentBlock(value, context) }),
|
|
677
677
|
image: (value) => ({ image: se_ImageBlock(value, context) }),
|
|
678
|
+
reasoningContent: (value) => ({ reasoningContent: se_ReasoningContentBlock(value, context) }),
|
|
678
679
|
text: (value) => ({ text: value }),
|
|
679
680
|
toolResult: (value) => ({ toolResult: se_ToolResultBlock(value, context) }),
|
|
680
681
|
toolUse: (value) => ({ toolUse: se_ToolUseBlock(value, context) }),
|
|
681
682
|
video: (value) => ({ video: se_VideoBlock(value, context) }),
|
|
682
|
-
_: (name, value) => ({ name: value }),
|
|
683
|
+
_: (name, value) => ({ [name]: value }),
|
|
683
684
|
});
|
|
684
685
|
};
|
|
685
686
|
const se_ContentBlocks = (input, context) => {
|
|
@@ -699,14 +700,14 @@ const se_DocumentBlock = (input, context) => {
|
|
|
699
700
|
const se_DocumentSource = (input, context) => {
|
|
700
701
|
return DocumentSource.visit(input, {
|
|
701
702
|
bytes: (value) => ({ bytes: context.base64Encoder(value) }),
|
|
702
|
-
_: (name, value) => ({ name: value }),
|
|
703
|
+
_: (name, value) => ({ [name]: value }),
|
|
703
704
|
});
|
|
704
705
|
};
|
|
705
706
|
const se_GuardrailContentBlock = (input, context) => {
|
|
706
707
|
return GuardrailContentBlock.visit(input, {
|
|
707
708
|
image: (value) => ({ image: se_GuardrailImageBlock(value, context) }),
|
|
708
709
|
text: (value) => ({ text: _json(value) }),
|
|
709
|
-
_: (name, value) => ({ name: value }),
|
|
710
|
+
_: (name, value) => ({ [name]: value }),
|
|
710
711
|
});
|
|
711
712
|
};
|
|
712
713
|
const se_GuardrailContentBlockList = (input, context) => {
|
|
@@ -720,7 +721,7 @@ const se_GuardrailConverseContentBlock = (input, context) => {
|
|
|
720
721
|
return GuardrailConverseContentBlock.visit(input, {
|
|
721
722
|
image: (value) => ({ image: se_GuardrailConverseImageBlock(value, context) }),
|
|
722
723
|
text: (value) => ({ text: _json(value) }),
|
|
723
|
-
_: (name, value) => ({ name: value }),
|
|
724
|
+
_: (name, value) => ({ [name]: value }),
|
|
724
725
|
});
|
|
725
726
|
};
|
|
726
727
|
const se_GuardrailConverseImageBlock = (input, context) => {
|
|
@@ -732,7 +733,7 @@ const se_GuardrailConverseImageBlock = (input, context) => {
|
|
|
732
733
|
const se_GuardrailConverseImageSource = (input, context) => {
|
|
733
734
|
return GuardrailConverseImageSource.visit(input, {
|
|
734
735
|
bytes: (value) => ({ bytes: context.base64Encoder(value) }),
|
|
735
|
-
_: (name, value) => ({ name: value }),
|
|
736
|
+
_: (name, value) => ({ [name]: value }),
|
|
736
737
|
});
|
|
737
738
|
};
|
|
738
739
|
const se_GuardrailImageBlock = (input, context) => {
|
|
@@ -744,7 +745,7 @@ const se_GuardrailImageBlock = (input, context) => {
|
|
|
744
745
|
const se_GuardrailImageSource = (input, context) => {
|
|
745
746
|
return GuardrailImageSource.visit(input, {
|
|
746
747
|
bytes: (value) => ({ bytes: context.base64Encoder(value) }),
|
|
747
|
-
_: (name, value) => ({ name: value }),
|
|
748
|
+
_: (name, value) => ({ [name]: value }),
|
|
748
749
|
});
|
|
749
750
|
};
|
|
750
751
|
const se_ImageBlock = (input, context) => {
|
|
@@ -756,7 +757,7 @@ const se_ImageBlock = (input, context) => {
|
|
|
756
757
|
const se_ImageSource = (input, context) => {
|
|
757
758
|
return ImageSource.visit(input, {
|
|
758
759
|
bytes: (value) => ({ bytes: context.base64Encoder(value) }),
|
|
759
|
-
_: (name, value) => ({ name: value }),
|
|
760
|
+
_: (name, value) => ({ [name]: value }),
|
|
760
761
|
});
|
|
761
762
|
};
|
|
762
763
|
const se_InferenceConfiguration = (input, context) => {
|
|
@@ -783,11 +784,18 @@ const se_Messages = (input, context) => {
|
|
|
783
784
|
const se_ModelInputPayload = (input, context) => {
|
|
784
785
|
return input;
|
|
785
786
|
};
|
|
787
|
+
const se_ReasoningContentBlock = (input, context) => {
|
|
788
|
+
return ReasoningContentBlock.visit(input, {
|
|
789
|
+
reasoningText: (value) => ({ reasoningText: _json(value) }),
|
|
790
|
+
redactedContent: (value) => ({ redactedContent: context.base64Encoder(value) }),
|
|
791
|
+
_: (name, value) => ({ [name]: value }),
|
|
792
|
+
});
|
|
793
|
+
};
|
|
786
794
|
const se_SystemContentBlock = (input, context) => {
|
|
787
795
|
return SystemContentBlock.visit(input, {
|
|
788
796
|
guardContent: (value) => ({ guardContent: se_GuardrailConverseContentBlock(value, context) }),
|
|
789
797
|
text: (value) => ({ text: value }),
|
|
790
|
-
_: (name, value) => ({ name: value }),
|
|
798
|
+
_: (name, value) => ({ [name]: value }),
|
|
791
799
|
});
|
|
792
800
|
};
|
|
793
801
|
const se_SystemContentBlocks = (input, context) => {
|
|
@@ -800,7 +808,7 @@ const se_SystemContentBlocks = (input, context) => {
|
|
|
800
808
|
const se_Tool = (input, context) => {
|
|
801
809
|
return Tool.visit(input, {
|
|
802
810
|
toolSpec: (value) => ({ toolSpec: se_ToolSpecification(value, context) }),
|
|
803
|
-
_: (name, value) => ({ name: value }),
|
|
811
|
+
_: (name, value) => ({ [name]: value }),
|
|
804
812
|
});
|
|
805
813
|
};
|
|
806
814
|
const se_ToolConfiguration = (input, context) => {
|
|
@@ -812,7 +820,7 @@ const se_ToolConfiguration = (input, context) => {
|
|
|
812
820
|
const se_ToolInputSchema = (input, context) => {
|
|
813
821
|
return ToolInputSchema.visit(input, {
|
|
814
822
|
json: (value) => ({ json: se_Document(value, context) }),
|
|
815
|
-
_: (name, value) => ({ name: value }),
|
|
823
|
+
_: (name, value) => ({ [name]: value }),
|
|
816
824
|
});
|
|
817
825
|
};
|
|
818
826
|
const se_ToolResultBlock = (input, context) => {
|
|
@@ -829,7 +837,7 @@ const se_ToolResultContentBlock = (input, context) => {
|
|
|
829
837
|
json: (value) => ({ json: se_Document(value, context) }),
|
|
830
838
|
text: (value) => ({ text: value }),
|
|
831
839
|
video: (value) => ({ video: se_VideoBlock(value, context) }),
|
|
832
|
-
_: (name, value) => ({ name: value }),
|
|
840
|
+
_: (name, value) => ({ [name]: value }),
|
|
833
841
|
});
|
|
834
842
|
};
|
|
835
843
|
const se_ToolResultContentBlocks = (input, context) => {
|
|
@@ -870,7 +878,7 @@ const se_VideoSource = (input, context) => {
|
|
|
870
878
|
return VideoSource.visit(input, {
|
|
871
879
|
bytes: (value) => ({ bytes: context.base64Encoder(value) }),
|
|
872
880
|
s3Location: (value) => ({ s3Location: _json(value) }),
|
|
873
|
-
_: (name, value) => ({ name: value }),
|
|
881
|
+
_: (name, value) => ({ [name]: value }),
|
|
874
882
|
});
|
|
875
883
|
};
|
|
876
884
|
const se_Document = (input, context) => {
|
|
@@ -913,6 +921,11 @@ const de_ContentBlock = (output, context) => {
|
|
|
913
921
|
image: de_ImageBlock(output.image, context),
|
|
914
922
|
};
|
|
915
923
|
}
|
|
924
|
+
if (output.reasoningContent != null) {
|
|
925
|
+
return {
|
|
926
|
+
reasoningContent: de_ReasoningContentBlock(__expectUnion(output.reasoningContent), context),
|
|
927
|
+
};
|
|
928
|
+
}
|
|
916
929
|
if (__expectString(output.text) !== undefined) {
|
|
917
930
|
return { text: __expectString(output.text) };
|
|
918
931
|
}
|
|
@@ -933,6 +946,28 @@ const de_ContentBlock = (output, context) => {
|
|
|
933
946
|
}
|
|
934
947
|
return { $unknown: Object.entries(output)[0] };
|
|
935
948
|
};
|
|
949
|
+
const de_ContentBlockDelta = (output, context) => {
|
|
950
|
+
if (output.reasoningContent != null) {
|
|
951
|
+
return {
|
|
952
|
+
reasoningContent: de_ReasoningContentBlockDelta(__expectUnion(output.reasoningContent), context),
|
|
953
|
+
};
|
|
954
|
+
}
|
|
955
|
+
if (__expectString(output.text) !== undefined) {
|
|
956
|
+
return { text: __expectString(output.text) };
|
|
957
|
+
}
|
|
958
|
+
if (output.toolUse != null) {
|
|
959
|
+
return {
|
|
960
|
+
toolUse: _json(output.toolUse),
|
|
961
|
+
};
|
|
962
|
+
}
|
|
963
|
+
return { $unknown: Object.entries(output)[0] };
|
|
964
|
+
};
|
|
965
|
+
const de_ContentBlockDeltaEvent = (output, context) => {
|
|
966
|
+
return take(output, {
|
|
967
|
+
contentBlockIndex: __expectInt32,
|
|
968
|
+
delta: (_) => de_ContentBlockDelta(__expectUnion(_), context),
|
|
969
|
+
});
|
|
970
|
+
};
|
|
936
971
|
const de_ContentBlocks = (output, context) => {
|
|
937
972
|
const retVal = (output || [])
|
|
938
973
|
.filter((e) => e != null)
|
|
@@ -1106,6 +1141,33 @@ const de_PayloadPart = (output, context) => {
|
|
|
1106
1141
|
bytes: context.base64Decoder,
|
|
1107
1142
|
});
|
|
1108
1143
|
};
|
|
1144
|
+
const de_ReasoningContentBlock = (output, context) => {
|
|
1145
|
+
if (output.reasoningText != null) {
|
|
1146
|
+
return {
|
|
1147
|
+
reasoningText: _json(output.reasoningText),
|
|
1148
|
+
};
|
|
1149
|
+
}
|
|
1150
|
+
if (output.redactedContent != null) {
|
|
1151
|
+
return {
|
|
1152
|
+
redactedContent: context.base64Decoder(output.redactedContent),
|
|
1153
|
+
};
|
|
1154
|
+
}
|
|
1155
|
+
return { $unknown: Object.entries(output)[0] };
|
|
1156
|
+
};
|
|
1157
|
+
const de_ReasoningContentBlockDelta = (output, context) => {
|
|
1158
|
+
if (output.redactedContent != null) {
|
|
1159
|
+
return {
|
|
1160
|
+
redactedContent: context.base64Decoder(output.redactedContent),
|
|
1161
|
+
};
|
|
1162
|
+
}
|
|
1163
|
+
if (__expectString(output.signature) !== undefined) {
|
|
1164
|
+
return { signature: __expectString(output.signature) };
|
|
1165
|
+
}
|
|
1166
|
+
if (__expectString(output.text) !== undefined) {
|
|
1167
|
+
return { text: __expectString(output.text) };
|
|
1168
|
+
}
|
|
1169
|
+
return { $unknown: Object.entries(output)[0] };
|
|
1170
|
+
};
|
|
1109
1171
|
const de_ToolResultBlock = (output, context) => {
|
|
1110
1172
|
return take(output, {
|
|
1111
1173
|
content: (_) => de_ToolResultContentBlocks(_, context),
|
|
@@ -140,6 +140,13 @@ declare const ConverseCommand_base: {
|
|
|
140
140
|
* },
|
|
141
141
|
* },
|
|
142
142
|
* },
|
|
143
|
+
* reasoningContent: { // ReasoningContentBlock Union: only one key present
|
|
144
|
+
* reasoningText: { // ReasoningTextBlock
|
|
145
|
+
* text: "STRING_VALUE", // required
|
|
146
|
+
* signature: "STRING_VALUE",
|
|
147
|
+
* },
|
|
148
|
+
* redactedContent: new Uint8Array(), // e.g. Buffer.from("") or new TextEncoder().encode("")
|
|
149
|
+
* },
|
|
143
150
|
* },
|
|
144
151
|
* ],
|
|
145
152
|
* },
|
|
@@ -296,6 +303,13 @@ declare const ConverseCommand_base: {
|
|
|
296
303
|
* // },
|
|
297
304
|
* // },
|
|
298
305
|
* // },
|
|
306
|
+
* // reasoningContent: { // ReasoningContentBlock Union: only one key present
|
|
307
|
+
* // reasoningText: { // ReasoningTextBlock
|
|
308
|
+
* // text: "STRING_VALUE", // required
|
|
309
|
+
* // signature: "STRING_VALUE",
|
|
310
|
+
* // },
|
|
311
|
+
* // redactedContent: new Uint8Array(),
|
|
312
|
+
* // },
|
|
299
313
|
* // },
|
|
300
314
|
* // ],
|
|
301
315
|
* // },
|
|
@@ -146,6 +146,13 @@ declare const ConverseStreamCommand_base: {
|
|
|
146
146
|
* },
|
|
147
147
|
* },
|
|
148
148
|
* },
|
|
149
|
+
* reasoningContent: { // ReasoningContentBlock Union: only one key present
|
|
150
|
+
* reasoningText: { // ReasoningTextBlock
|
|
151
|
+
* text: "STRING_VALUE", // required
|
|
152
|
+
* signature: "STRING_VALUE",
|
|
153
|
+
* },
|
|
154
|
+
* redactedContent: new Uint8Array(), // e.g. Buffer.from("") or new TextEncoder().encode("")
|
|
155
|
+
* },
|
|
149
156
|
* },
|
|
150
157
|
* ],
|
|
151
158
|
* },
|
|
@@ -241,6 +248,11 @@ declare const ConverseStreamCommand_base: {
|
|
|
241
248
|
* // toolUse: { // ToolUseBlockDelta
|
|
242
249
|
* // input: "STRING_VALUE", // required
|
|
243
250
|
* // },
|
|
251
|
+
* // reasoningContent: { // ReasoningContentBlockDelta Union: only one key present
|
|
252
|
+
* // text: "STRING_VALUE",
|
|
253
|
+
* // redactedContent: new Uint8Array(),
|
|
254
|
+
* // signature: "STRING_VALUE",
|
|
255
|
+
* // },
|
|
244
256
|
* // },
|
|
245
257
|
* // contentBlockIndex: Number("int"), // required
|
|
246
258
|
* // },
|
|
@@ -1528,6 +1528,64 @@ export interface ImageBlock {
|
|
|
1528
1528
|
*/
|
|
1529
1529
|
source: ImageSource | undefined;
|
|
1530
1530
|
}
|
|
1531
|
+
/**
|
|
1532
|
+
* <p>Contains the reasoning that the model used to return the output.</p>
|
|
1533
|
+
* @public
|
|
1534
|
+
*/
|
|
1535
|
+
export interface ReasoningTextBlock {
|
|
1536
|
+
/**
|
|
1537
|
+
* <p>The reasoning that the model used to return the output.</p>
|
|
1538
|
+
* @public
|
|
1539
|
+
*/
|
|
1540
|
+
text: string | undefined;
|
|
1541
|
+
/**
|
|
1542
|
+
* <p>A token that verifies that the reasoning text was generated by the model. If you pass a reasoning block back to the API in a multi-turn conversation, include the text and its signature unmodified.</p>
|
|
1543
|
+
* @public
|
|
1544
|
+
*/
|
|
1545
|
+
signature?: string | undefined;
|
|
1546
|
+
}
|
|
1547
|
+
/**
|
|
1548
|
+
* <p>Contains content regarding the reasoning that is carried out by the model with respect to the content in the content block. Reasoning refers to a Chain of Thought (CoT) that the model generates to enhance the accuracy of its final response.</p>
|
|
1549
|
+
* @public
|
|
1550
|
+
*/
|
|
1551
|
+
export type ReasoningContentBlock = ReasoningContentBlock.ReasoningTextMember | ReasoningContentBlock.RedactedContentMember | ReasoningContentBlock.$UnknownMember;
|
|
1552
|
+
/**
|
|
1553
|
+
* @public
|
|
1554
|
+
*/
|
|
1555
|
+
export declare namespace ReasoningContentBlock {
|
|
1556
|
+
/**
|
|
1557
|
+
* <p>The reasoning that the model used to return the output.</p>
|
|
1558
|
+
* @public
|
|
1559
|
+
*/
|
|
1560
|
+
interface ReasoningTextMember {
|
|
1561
|
+
reasoningText: ReasoningTextBlock;
|
|
1562
|
+
redactedContent?: never;
|
|
1563
|
+
$unknown?: never;
|
|
1564
|
+
}
|
|
1565
|
+
/**
|
|
1566
|
+
* <p>The content in the reasoning that was encrypted by the model provider for safety reasons. The encryption doesn't affect the quality of responses.</p>
|
|
1567
|
+
* @public
|
|
1568
|
+
*/
|
|
1569
|
+
interface RedactedContentMember {
|
|
1570
|
+
reasoningText?: never;
|
|
1571
|
+
redactedContent: Uint8Array;
|
|
1572
|
+
$unknown?: never;
|
|
1573
|
+
}
|
|
1574
|
+
/**
|
|
1575
|
+
* @public
|
|
1576
|
+
*/
|
|
1577
|
+
interface $UnknownMember {
|
|
1578
|
+
reasoningText?: never;
|
|
1579
|
+
redactedContent?: never;
|
|
1580
|
+
$unknown: [string, any];
|
|
1581
|
+
}
|
|
1582
|
+
interface Visitor<T> {
|
|
1583
|
+
reasoningText: (value: ReasoningTextBlock) => T;
|
|
1584
|
+
redactedContent: (value: Uint8Array) => T;
|
|
1585
|
+
_: (name: string, value: any) => T;
|
|
1586
|
+
}
|
|
1587
|
+
const visit: <T>(value: ReasoningContentBlock, visitor: Visitor<T>) => T;
|
|
1588
|
+
}
|
|
1531
1589
|
/**
|
|
1532
1590
|
* @public
|
|
1533
1591
|
* @enum
|
|
@@ -1779,7 +1837,7 @@ export interface ToolUseBlock {
|
|
|
1779
1837
|
* <p>A block of content for a message that you pass to, or receive from, a model with the <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_Converse.html">Converse</a> or <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_ConverseStream.html">ConverseStream</a> API operations.</p>
|
|
1780
1838
|
* @public
|
|
1781
1839
|
*/
|
|
1782
|
-
export type ContentBlock = ContentBlock.DocumentMember | ContentBlock.GuardContentMember | ContentBlock.ImageMember | ContentBlock.TextMember | ContentBlock.ToolResultMember | ContentBlock.ToolUseMember | ContentBlock.VideoMember | ContentBlock.$UnknownMember;
|
|
1840
|
+
export type ContentBlock = ContentBlock.DocumentMember | ContentBlock.GuardContentMember | ContentBlock.ImageMember | ContentBlock.ReasoningContentMember | ContentBlock.TextMember | ContentBlock.ToolResultMember | ContentBlock.ToolUseMember | ContentBlock.VideoMember | ContentBlock.$UnknownMember;
|
|
1783
1841
|
/**
|
|
1784
1842
|
* @public
|
|
1785
1843
|
*/
|
|
@@ -1796,6 +1854,7 @@ export declare namespace ContentBlock {
|
|
|
1796
1854
|
toolUse?: never;
|
|
1797
1855
|
toolResult?: never;
|
|
1798
1856
|
guardContent?: never;
|
|
1857
|
+
reasoningContent?: never;
|
|
1799
1858
|
$unknown?: never;
|
|
1800
1859
|
}
|
|
1801
1860
|
/**
|
|
@@ -1813,6 +1872,7 @@ export declare namespace ContentBlock {
|
|
|
1813
1872
|
toolUse?: never;
|
|
1814
1873
|
toolResult?: never;
|
|
1815
1874
|
guardContent?: never;
|
|
1875
|
+
reasoningContent?: never;
|
|
1816
1876
|
$unknown?: never;
|
|
1817
1877
|
}
|
|
1818
1878
|
/**
|
|
@@ -1827,6 +1887,7 @@ export declare namespace ContentBlock {
|
|
|
1827
1887
|
toolUse?: never;
|
|
1828
1888
|
toolResult?: never;
|
|
1829
1889
|
guardContent?: never;
|
|
1890
|
+
reasoningContent?: never;
|
|
1830
1891
|
$unknown?: never;
|
|
1831
1892
|
}
|
|
1832
1893
|
/**
|
|
@@ -1841,6 +1902,7 @@ export declare namespace ContentBlock {
|
|
|
1841
1902
|
toolUse?: never;
|
|
1842
1903
|
toolResult?: never;
|
|
1843
1904
|
guardContent?: never;
|
|
1905
|
+
reasoningContent?: never;
|
|
1844
1906
|
$unknown?: never;
|
|
1845
1907
|
}
|
|
1846
1908
|
/**
|
|
@@ -1855,6 +1917,7 @@ export declare namespace ContentBlock {
|
|
|
1855
1917
|
toolUse: ToolUseBlock;
|
|
1856
1918
|
toolResult?: never;
|
|
1857
1919
|
guardContent?: never;
|
|
1920
|
+
reasoningContent?: never;
|
|
1858
1921
|
$unknown?: never;
|
|
1859
1922
|
}
|
|
1860
1923
|
/**
|
|
@@ -1869,6 +1932,7 @@ export declare namespace ContentBlock {
|
|
|
1869
1932
|
toolUse?: never;
|
|
1870
1933
|
toolResult: ToolResultBlock;
|
|
1871
1934
|
guardContent?: never;
|
|
1935
|
+
reasoningContent?: never;
|
|
1872
1936
|
$unknown?: never;
|
|
1873
1937
|
}
|
|
1874
1938
|
/**
|
|
@@ -1888,6 +1952,22 @@ export declare namespace ContentBlock {
|
|
|
1888
1952
|
toolUse?: never;
|
|
1889
1953
|
toolResult?: never;
|
|
1890
1954
|
guardContent: GuardrailConverseContentBlock;
|
|
1955
|
+
reasoningContent?: never;
|
|
1956
|
+
$unknown?: never;
|
|
1957
|
+
}
|
|
1958
|
+
/**
|
|
1959
|
+
* <p>Contains content regarding the reasoning that is carried out by the model. Reasoning refers to a Chain of Thought (CoT) that the model generates to enhance the accuracy of its final response.</p>
|
|
1960
|
+
* @public
|
|
1961
|
+
*/
|
|
1962
|
+
interface ReasoningContentMember {
|
|
1963
|
+
text?: never;
|
|
1964
|
+
image?: never;
|
|
1965
|
+
document?: never;
|
|
1966
|
+
video?: never;
|
|
1967
|
+
toolUse?: never;
|
|
1968
|
+
toolResult?: never;
|
|
1969
|
+
guardContent?: never;
|
|
1970
|
+
reasoningContent: ReasoningContentBlock;
|
|
1891
1971
|
$unknown?: never;
|
|
1892
1972
|
}
|
|
1893
1973
|
/**
|
|
@@ -1901,6 +1981,7 @@ export declare namespace ContentBlock {
|
|
|
1901
1981
|
toolUse?: never;
|
|
1902
1982
|
toolResult?: never;
|
|
1903
1983
|
guardContent?: never;
|
|
1984
|
+
reasoningContent?: never;
|
|
1904
1985
|
$unknown: [string, any];
|
|
1905
1986
|
}
|
|
1906
1987
|
interface Visitor<T> {
|
|
@@ -1911,6 +1992,7 @@ export declare namespace ContentBlock {
|
|
|
1911
1992
|
toolUse: (value: ToolUseBlock) => T;
|
|
1912
1993
|
toolResult: (value: ToolResultBlock) => T;
|
|
1913
1994
|
guardContent: (value: GuardrailConverseContentBlock) => T;
|
|
1995
|
+
reasoningContent: (value: ReasoningContentBlock) => T;
|
|
1914
1996
|
_: (name: string, value: any) => T;
|
|
1915
1997
|
}
|
|
1916
1998
|
const visit: <T>(value: ContentBlock, visitor: Visitor<T>) => T;
|
|
@@ -2689,6 +2771,62 @@ export interface ConverseStreamRequest {
|
|
|
2689
2771
|
*/
|
|
2690
2772
|
performanceConfig?: PerformanceConfiguration | undefined;
|
|
2691
2773
|
}
|
|
2774
|
+
/**
|
|
2775
|
+
* <p>Contains content regarding the reasoning that is carried out by the model with respect to the content in the content block. Reasoning refers to a Chain of Thought (CoT) that the model generates to enhance the accuracy of its final response.</p>
|
|
2776
|
+
* @public
|
|
2777
|
+
*/
|
|
2778
|
+
export type ReasoningContentBlockDelta = ReasoningContentBlockDelta.RedactedContentMember | ReasoningContentBlockDelta.SignatureMember | ReasoningContentBlockDelta.TextMember | ReasoningContentBlockDelta.$UnknownMember;
|
|
2779
|
+
/**
|
|
2780
|
+
* @public
|
|
2781
|
+
*/
|
|
2782
|
+
export declare namespace ReasoningContentBlockDelta {
|
|
2783
|
+
/**
|
|
2784
|
+
* <p>The reasoning that the model used to return the output.</p>
|
|
2785
|
+
* @public
|
|
2786
|
+
*/
|
|
2787
|
+
interface TextMember {
|
|
2788
|
+
text: string;
|
|
2789
|
+
redactedContent?: never;
|
|
2790
|
+
signature?: never;
|
|
2791
|
+
$unknown?: never;
|
|
2792
|
+
}
|
|
2793
|
+
/**
|
|
2794
|
+
* <p>The content in the reasoning that was encrypted by the model provider for safety reasons. The encryption doesn't affect the quality of responses.</p>
|
|
2795
|
+
* @public
|
|
2796
|
+
*/
|
|
2797
|
+
interface RedactedContentMember {
|
|
2798
|
+
text?: never;
|
|
2799
|
+
redactedContent: Uint8Array;
|
|
2800
|
+
signature?: never;
|
|
2801
|
+
$unknown?: never;
|
|
2802
|
+
}
|
|
2803
|
+
/**
|
|
2804
|
+
* <p>A token that verifies that the reasoning text was generated by the model. If you pass a reasoning block back to the API in a multi-turn conversation, include the text and its signature unmodified.</p>
|
|
2805
|
+
* @public
|
|
2806
|
+
*/
|
|
2807
|
+
interface SignatureMember {
|
|
2808
|
+
text?: never;
|
|
2809
|
+
redactedContent?: never;
|
|
2810
|
+
signature: string;
|
|
2811
|
+
$unknown?: never;
|
|
2812
|
+
}
|
|
2813
|
+
/**
|
|
2814
|
+
* @public
|
|
2815
|
+
*/
|
|
2816
|
+
interface $UnknownMember {
|
|
2817
|
+
text?: never;
|
|
2818
|
+
redactedContent?: never;
|
|
2819
|
+
signature?: never;
|
|
2820
|
+
$unknown: [string, any];
|
|
2821
|
+
}
|
|
2822
|
+
interface Visitor<T> {
|
|
2823
|
+
text: (value: string) => T;
|
|
2824
|
+
redactedContent: (value: Uint8Array) => T;
|
|
2825
|
+
signature: (value: string) => T;
|
|
2826
|
+
_: (name: string, value: any) => T;
|
|
2827
|
+
}
|
|
2828
|
+
const visit: <T>(value: ReasoningContentBlockDelta, visitor: Visitor<T>) => T;
|
|
2829
|
+
}
|
|
2692
2830
|
/**
|
|
2693
2831
|
* <p>The delta for a tool use block.</p>
|
|
2694
2832
|
* @public
|
|
@@ -2701,10 +2839,10 @@ export interface ToolUseBlockDelta {
|
|
|
2701
2839
|
input: string | undefined;
|
|
2702
2840
|
}
|
|
2703
2841
|
/**
|
|
2704
|
-
* <p>A
|
|
2842
|
+
* <p>A block of content in a streaming response.</p>
|
|
2705
2843
|
* @public
|
|
2706
2844
|
*/
|
|
2707
|
-
export type ContentBlockDelta = ContentBlockDelta.TextMember | ContentBlockDelta.ToolUseMember | ContentBlockDelta.$UnknownMember;
|
|
2845
|
+
export type ContentBlockDelta = ContentBlockDelta.ReasoningContentMember | ContentBlockDelta.TextMember | ContentBlockDelta.ToolUseMember | ContentBlockDelta.$UnknownMember;
|
|
2708
2846
|
/**
|
|
2709
2847
|
* @public
|
|
2710
2848
|
*/
|
|
@@ -2716,6 +2854,7 @@ export declare namespace ContentBlockDelta {
|
|
|
2716
2854
|
interface TextMember {
|
|
2717
2855
|
text: string;
|
|
2718
2856
|
toolUse?: never;
|
|
2857
|
+
reasoningContent?: never;
|
|
2719
2858
|
$unknown?: never;
|
|
2720
2859
|
}
|
|
2721
2860
|
/**
|
|
@@ -2725,6 +2864,17 @@ export declare namespace ContentBlockDelta {
|
|
|
2725
2864
|
interface ToolUseMember {
|
|
2726
2865
|
text?: never;
|
|
2727
2866
|
toolUse: ToolUseBlockDelta;
|
|
2867
|
+
reasoningContent?: never;
|
|
2868
|
+
$unknown?: never;
|
|
2869
|
+
}
|
|
2870
|
+
/**
|
|
2871
|
+
* <p>Contains content regarding the reasoning that is carried out by the model. Reasoning refers to a Chain of Thought (CoT) that the model generates to enhance the accuracy of its final response.</p>
|
|
2872
|
+
* @public
|
|
2873
|
+
*/
|
|
2874
|
+
interface ReasoningContentMember {
|
|
2875
|
+
text?: never;
|
|
2876
|
+
toolUse?: never;
|
|
2877
|
+
reasoningContent: ReasoningContentBlockDelta;
|
|
2728
2878
|
$unknown?: never;
|
|
2729
2879
|
}
|
|
2730
2880
|
/**
|
|
@@ -2733,11 +2883,13 @@ export declare namespace ContentBlockDelta {
|
|
|
2733
2883
|
interface $UnknownMember {
|
|
2734
2884
|
text?: never;
|
|
2735
2885
|
toolUse?: never;
|
|
2886
|
+
reasoningContent?: never;
|
|
2736
2887
|
$unknown: [string, any];
|
|
2737
2888
|
}
|
|
2738
2889
|
interface Visitor<T> {
|
|
2739
2890
|
text: (value: string) => T;
|
|
2740
2891
|
toolUse: (value: ToolUseBlockDelta) => T;
|
|
2892
|
+
reasoningContent: (value: ReasoningContentBlockDelta) => T;
|
|
2741
2893
|
_: (name: string, value: any) => T;
|
|
2742
2894
|
}
|
|
2743
2895
|
const visit: <T>(value: ContentBlockDelta, visitor: Visitor<T>) => T;
|
|
@@ -3580,6 +3732,14 @@ export declare const GuardrailConverseImageBlockFilterSensitiveLog: (obj: Guardr
|
|
|
3580
3732
|
* @internal
|
|
3581
3733
|
*/
|
|
3582
3734
|
export declare const GuardrailConverseContentBlockFilterSensitiveLog: (obj: GuardrailConverseContentBlock) => any;
|
|
3735
|
+
/**
|
|
3736
|
+
* @internal
|
|
3737
|
+
*/
|
|
3738
|
+
export declare const ReasoningTextBlockFilterSensitiveLog: (obj: ReasoningTextBlock) => any;
|
|
3739
|
+
/**
|
|
3740
|
+
* @internal
|
|
3741
|
+
*/
|
|
3742
|
+
export declare const ReasoningContentBlockFilterSensitiveLog: (obj: ReasoningContentBlock) => any;
|
|
3583
3743
|
/**
|
|
3584
3744
|
* @internal
|
|
3585
3745
|
*/
|
|
@@ -3608,6 +3768,18 @@ export declare const ConverseResponseFilterSensitiveLog: (obj: ConverseResponse)
|
|
|
3608
3768
|
* @internal
|
|
3609
3769
|
*/
|
|
3610
3770
|
export declare const ConverseStreamRequestFilterSensitiveLog: (obj: ConverseStreamRequest) => any;
|
|
3771
|
+
/**
|
|
3772
|
+
* @internal
|
|
3773
|
+
*/
|
|
3774
|
+
export declare const ReasoningContentBlockDeltaFilterSensitiveLog: (obj: ReasoningContentBlockDelta) => any;
|
|
3775
|
+
/**
|
|
3776
|
+
* @internal
|
|
3777
|
+
*/
|
|
3778
|
+
export declare const ContentBlockDeltaFilterSensitiveLog: (obj: ContentBlockDelta) => any;
|
|
3779
|
+
/**
|
|
3780
|
+
* @internal
|
|
3781
|
+
*/
|
|
3782
|
+
export declare const ContentBlockDeltaEventFilterSensitiveLog: (obj: ContentBlockDeltaEvent) => any;
|
|
3611
3783
|
/**
|
|
3612
3784
|
* @internal
|
|
3613
3785
|
*/
|
|
@@ -591,6 +591,37 @@ export interface ImageBlock {
|
|
|
591
591
|
format: ImageFormat | undefined;
|
|
592
592
|
source: ImageSource | undefined;
|
|
593
593
|
}
|
|
594
|
+
export interface ReasoningTextBlock {
|
|
595
|
+
text: string | undefined;
|
|
596
|
+
signature?: string | undefined;
|
|
597
|
+
}
|
|
598
|
+
export type ReasoningContentBlock =
|
|
599
|
+
| ReasoningContentBlock.ReasoningTextMember
|
|
600
|
+
| ReasoningContentBlock.RedactedContentMember
|
|
601
|
+
| ReasoningContentBlock.$UnknownMember;
|
|
602
|
+
export declare namespace ReasoningContentBlock {
|
|
603
|
+
interface ReasoningTextMember {
|
|
604
|
+
reasoningText: ReasoningTextBlock;
|
|
605
|
+
redactedContent?: never;
|
|
606
|
+
$unknown?: never;
|
|
607
|
+
}
|
|
608
|
+
interface RedactedContentMember {
|
|
609
|
+
reasoningText?: never;
|
|
610
|
+
redactedContent: Uint8Array;
|
|
611
|
+
$unknown?: never;
|
|
612
|
+
}
|
|
613
|
+
interface $UnknownMember {
|
|
614
|
+
reasoningText?: never;
|
|
615
|
+
redactedContent?: never;
|
|
616
|
+
$unknown: [string, any];
|
|
617
|
+
}
|
|
618
|
+
interface Visitor<T> {
|
|
619
|
+
reasoningText: (value: ReasoningTextBlock) => T;
|
|
620
|
+
redactedContent: (value: Uint8Array) => T;
|
|
621
|
+
_: (name: string, value: any) => T;
|
|
622
|
+
}
|
|
623
|
+
const visit: <T>(value: ReasoningContentBlock, visitor: Visitor<T>) => T;
|
|
624
|
+
}
|
|
594
625
|
export declare const VideoFormat: {
|
|
595
626
|
readonly FLV: "flv";
|
|
596
627
|
readonly MKV: "mkv";
|
|
@@ -724,6 +755,7 @@ export type ContentBlock =
|
|
|
724
755
|
| ContentBlock.DocumentMember
|
|
725
756
|
| ContentBlock.GuardContentMember
|
|
726
757
|
| ContentBlock.ImageMember
|
|
758
|
+
| ContentBlock.ReasoningContentMember
|
|
727
759
|
| ContentBlock.TextMember
|
|
728
760
|
| ContentBlock.ToolResultMember
|
|
729
761
|
| ContentBlock.ToolUseMember
|
|
@@ -738,6 +770,7 @@ export declare namespace ContentBlock {
|
|
|
738
770
|
toolUse?: never;
|
|
739
771
|
toolResult?: never;
|
|
740
772
|
guardContent?: never;
|
|
773
|
+
reasoningContent?: never;
|
|
741
774
|
$unknown?: never;
|
|
742
775
|
}
|
|
743
776
|
interface ImageMember {
|
|
@@ -748,6 +781,7 @@ export declare namespace ContentBlock {
|
|
|
748
781
|
toolUse?: never;
|
|
749
782
|
toolResult?: never;
|
|
750
783
|
guardContent?: never;
|
|
784
|
+
reasoningContent?: never;
|
|
751
785
|
$unknown?: never;
|
|
752
786
|
}
|
|
753
787
|
interface DocumentMember {
|
|
@@ -758,6 +792,7 @@ export declare namespace ContentBlock {
|
|
|
758
792
|
toolUse?: never;
|
|
759
793
|
toolResult?: never;
|
|
760
794
|
guardContent?: never;
|
|
795
|
+
reasoningContent?: never;
|
|
761
796
|
$unknown?: never;
|
|
762
797
|
}
|
|
763
798
|
interface VideoMember {
|
|
@@ -768,6 +803,7 @@ export declare namespace ContentBlock {
|
|
|
768
803
|
toolUse?: never;
|
|
769
804
|
toolResult?: never;
|
|
770
805
|
guardContent?: never;
|
|
806
|
+
reasoningContent?: never;
|
|
771
807
|
$unknown?: never;
|
|
772
808
|
}
|
|
773
809
|
interface ToolUseMember {
|
|
@@ -778,6 +814,7 @@ export declare namespace ContentBlock {
|
|
|
778
814
|
toolUse: ToolUseBlock;
|
|
779
815
|
toolResult?: never;
|
|
780
816
|
guardContent?: never;
|
|
817
|
+
reasoningContent?: never;
|
|
781
818
|
$unknown?: never;
|
|
782
819
|
}
|
|
783
820
|
interface ToolResultMember {
|
|
@@ -788,6 +825,7 @@ export declare namespace ContentBlock {
|
|
|
788
825
|
toolUse?: never;
|
|
789
826
|
toolResult: ToolResultBlock;
|
|
790
827
|
guardContent?: never;
|
|
828
|
+
reasoningContent?: never;
|
|
791
829
|
$unknown?: never;
|
|
792
830
|
}
|
|
793
831
|
interface GuardContentMember {
|
|
@@ -798,6 +836,18 @@ export declare namespace ContentBlock {
|
|
|
798
836
|
toolUse?: never;
|
|
799
837
|
toolResult?: never;
|
|
800
838
|
guardContent: GuardrailConverseContentBlock;
|
|
839
|
+
reasoningContent?: never;
|
|
840
|
+
$unknown?: never;
|
|
841
|
+
}
|
|
842
|
+
interface ReasoningContentMember {
|
|
843
|
+
text?: never;
|
|
844
|
+
image?: never;
|
|
845
|
+
document?: never;
|
|
846
|
+
video?: never;
|
|
847
|
+
toolUse?: never;
|
|
848
|
+
toolResult?: never;
|
|
849
|
+
guardContent?: never;
|
|
850
|
+
reasoningContent: ReasoningContentBlock;
|
|
801
851
|
$unknown?: never;
|
|
802
852
|
}
|
|
803
853
|
interface $UnknownMember {
|
|
@@ -808,6 +858,7 @@ export declare namespace ContentBlock {
|
|
|
808
858
|
toolUse?: never;
|
|
809
859
|
toolResult?: never;
|
|
810
860
|
guardContent?: never;
|
|
861
|
+
reasoningContent?: never;
|
|
811
862
|
$unknown: [string, any];
|
|
812
863
|
}
|
|
813
864
|
interface Visitor<T> {
|
|
@@ -818,6 +869,7 @@ export declare namespace ContentBlock {
|
|
|
818
869
|
toolUse: (value: ToolUseBlock) => T;
|
|
819
870
|
toolResult: (value: ToolResultBlock) => T;
|
|
820
871
|
guardContent: (value: GuardrailConverseContentBlock) => T;
|
|
872
|
+
reasoningContent: (value: ReasoningContentBlock) => T;
|
|
821
873
|
_: (name: string, value: any) => T;
|
|
822
874
|
}
|
|
823
875
|
const visit: <T>(value: ContentBlock, visitor: Visitor<T>) => T;
|
|
@@ -1090,10 +1142,49 @@ export interface ConverseStreamRequest {
|
|
|
1090
1142
|
requestMetadata?: Record<string, string> | undefined;
|
|
1091
1143
|
performanceConfig?: PerformanceConfiguration | undefined;
|
|
1092
1144
|
}
|
|
1145
|
+
export type ReasoningContentBlockDelta =
|
|
1146
|
+
| ReasoningContentBlockDelta.RedactedContentMember
|
|
1147
|
+
| ReasoningContentBlockDelta.SignatureMember
|
|
1148
|
+
| ReasoningContentBlockDelta.TextMember
|
|
1149
|
+
| ReasoningContentBlockDelta.$UnknownMember;
|
|
1150
|
+
export declare namespace ReasoningContentBlockDelta {
|
|
1151
|
+
interface TextMember {
|
|
1152
|
+
text: string;
|
|
1153
|
+
redactedContent?: never;
|
|
1154
|
+
signature?: never;
|
|
1155
|
+
$unknown?: never;
|
|
1156
|
+
}
|
|
1157
|
+
interface RedactedContentMember {
|
|
1158
|
+
text?: never;
|
|
1159
|
+
redactedContent: Uint8Array;
|
|
1160
|
+
signature?: never;
|
|
1161
|
+
$unknown?: never;
|
|
1162
|
+
}
|
|
1163
|
+
interface SignatureMember {
|
|
1164
|
+
text?: never;
|
|
1165
|
+
redactedContent?: never;
|
|
1166
|
+
signature: string;
|
|
1167
|
+
$unknown?: never;
|
|
1168
|
+
}
|
|
1169
|
+
interface $UnknownMember {
|
|
1170
|
+
text?: never;
|
|
1171
|
+
redactedContent?: never;
|
|
1172
|
+
signature?: never;
|
|
1173
|
+
$unknown: [string, any];
|
|
1174
|
+
}
|
|
1175
|
+
interface Visitor<T> {
|
|
1176
|
+
text: (value: string) => T;
|
|
1177
|
+
redactedContent: (value: Uint8Array) => T;
|
|
1178
|
+
signature: (value: string) => T;
|
|
1179
|
+
_: (name: string, value: any) => T;
|
|
1180
|
+
}
|
|
1181
|
+
const visit: <T>(value: ReasoningContentBlockDelta, visitor: Visitor<T>) => T;
|
|
1182
|
+
}
|
|
1093
1183
|
export interface ToolUseBlockDelta {
|
|
1094
1184
|
input: string | undefined;
|
|
1095
1185
|
}
|
|
1096
1186
|
export type ContentBlockDelta =
|
|
1187
|
+
| ContentBlockDelta.ReasoningContentMember
|
|
1097
1188
|
| ContentBlockDelta.TextMember
|
|
1098
1189
|
| ContentBlockDelta.ToolUseMember
|
|
1099
1190
|
| ContentBlockDelta.$UnknownMember;
|
|
@@ -1101,21 +1192,31 @@ export declare namespace ContentBlockDelta {
|
|
|
1101
1192
|
interface TextMember {
|
|
1102
1193
|
text: string;
|
|
1103
1194
|
toolUse?: never;
|
|
1195
|
+
reasoningContent?: never;
|
|
1104
1196
|
$unknown?: never;
|
|
1105
1197
|
}
|
|
1106
1198
|
interface ToolUseMember {
|
|
1107
1199
|
text?: never;
|
|
1108
1200
|
toolUse: ToolUseBlockDelta;
|
|
1201
|
+
reasoningContent?: never;
|
|
1202
|
+
$unknown?: never;
|
|
1203
|
+
}
|
|
1204
|
+
interface ReasoningContentMember {
|
|
1205
|
+
text?: never;
|
|
1206
|
+
toolUse?: never;
|
|
1207
|
+
reasoningContent: ReasoningContentBlockDelta;
|
|
1109
1208
|
$unknown?: never;
|
|
1110
1209
|
}
|
|
1111
1210
|
interface $UnknownMember {
|
|
1112
1211
|
text?: never;
|
|
1113
1212
|
toolUse?: never;
|
|
1213
|
+
reasoningContent?: never;
|
|
1114
1214
|
$unknown: [string, any];
|
|
1115
1215
|
}
|
|
1116
1216
|
interface Visitor<T> {
|
|
1117
1217
|
text: (value: string) => T;
|
|
1118
1218
|
toolUse: (value: ToolUseBlockDelta) => T;
|
|
1219
|
+
reasoningContent: (value: ReasoningContentBlockDelta) => T;
|
|
1119
1220
|
_: (name: string, value: any) => T;
|
|
1120
1221
|
}
|
|
1121
1222
|
const visit: <T>(value: ContentBlockDelta, visitor: Visitor<T>) => T;
|
|
@@ -1556,6 +1657,12 @@ export declare const GuardrailConverseImageBlockFilterSensitiveLog: (
|
|
|
1556
1657
|
export declare const GuardrailConverseContentBlockFilterSensitiveLog: (
|
|
1557
1658
|
obj: GuardrailConverseContentBlock
|
|
1558
1659
|
) => any;
|
|
1660
|
+
export declare const ReasoningTextBlockFilterSensitiveLog: (
|
|
1661
|
+
obj: ReasoningTextBlock
|
|
1662
|
+
) => any;
|
|
1663
|
+
export declare const ReasoningContentBlockFilterSensitiveLog: (
|
|
1664
|
+
obj: ReasoningContentBlock
|
|
1665
|
+
) => any;
|
|
1559
1666
|
export declare const ContentBlockFilterSensitiveLog: (obj: ContentBlock) => any;
|
|
1560
1667
|
export declare const MessageFilterSensitiveLog: (obj: Message) => any;
|
|
1561
1668
|
export declare const SystemContentBlockFilterSensitiveLog: (
|
|
@@ -1573,6 +1680,15 @@ export declare const ConverseResponseFilterSensitiveLog: (
|
|
|
1573
1680
|
export declare const ConverseStreamRequestFilterSensitiveLog: (
|
|
1574
1681
|
obj: ConverseStreamRequest
|
|
1575
1682
|
) => any;
|
|
1683
|
+
export declare const ReasoningContentBlockDeltaFilterSensitiveLog: (
|
|
1684
|
+
obj: ReasoningContentBlockDelta
|
|
1685
|
+
) => any;
|
|
1686
|
+
export declare const ContentBlockDeltaFilterSensitiveLog: (
|
|
1687
|
+
obj: ContentBlockDelta
|
|
1688
|
+
) => any;
|
|
1689
|
+
export declare const ContentBlockDeltaEventFilterSensitiveLog: (
|
|
1690
|
+
obj: ContentBlockDeltaEvent
|
|
1691
|
+
) => any;
|
|
1576
1692
|
export declare const ConverseStreamOutputFilterSensitiveLog: (
|
|
1577
1693
|
obj: ConverseStreamOutput
|
|
1578
1694
|
) => any;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-bedrock-runtime",
|
|
3
3
|
"description": "AWS SDK for JavaScript Bedrock Runtime Client for Node.js, Browser and React Native",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.755.0",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
7
7
|
"build:cjs": "node ../../scripts/compilation/inline client-bedrock-runtime",
|