@ai-sdk/amazon-bedrock 4.0.0-beta.101 → 4.0.0-beta.102
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/CHANGELOG.md +14 -0
- package/dist/index.js +165 -40
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +166 -40
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -915,6 +915,7 @@ var BedrockChatLanguageModel = class {
|
|
|
915
915
|
system,
|
|
916
916
|
messages,
|
|
917
917
|
additionalModelRequestFields: bedrockOptions.additionalModelRequestFields,
|
|
918
|
+
additionalModelResponseFieldPaths: ["/stop_sequence"],
|
|
918
919
|
...Object.keys(inferenceConfig).length > 0 && {
|
|
919
920
|
inferenceConfig
|
|
920
921
|
},
|
|
@@ -932,7 +933,7 @@ var BedrockChatLanguageModel = class {
|
|
|
932
933
|
return combineHeaders(await resolve(this.config.headers), headers);
|
|
933
934
|
}
|
|
934
935
|
async doGenerate(options) {
|
|
935
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
936
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
|
|
936
937
|
const {
|
|
937
938
|
command: args,
|
|
938
939
|
warnings,
|
|
@@ -1006,15 +1007,17 @@ var BedrockChatLanguageModel = class {
|
|
|
1006
1007
|
}
|
|
1007
1008
|
}
|
|
1008
1009
|
}
|
|
1009
|
-
const
|
|
1010
|
+
const stopSequence = (_i = (_h = response.additionalModelResponseFields) == null ? void 0 : _h.stop_sequence) != null ? _i : null;
|
|
1011
|
+
const providerMetadata = response.trace || response.usage || isJsonResponseFromTool || stopSequence ? {
|
|
1010
1012
|
bedrock: {
|
|
1011
1013
|
...response.trace && typeof response.trace === "object" ? { trace: response.trace } : {},
|
|
1012
|
-
...((
|
|
1014
|
+
...((_j = response.usage) == null ? void 0 : _j.cacheWriteInputTokens) != null && {
|
|
1013
1015
|
usage: {
|
|
1014
1016
|
cacheWriteInputTokens: response.usage.cacheWriteInputTokens
|
|
1015
1017
|
}
|
|
1016
1018
|
},
|
|
1017
|
-
...isJsonResponseFromTool && { isJsonResponseFromTool: true }
|
|
1019
|
+
...isJsonResponseFromTool && { isJsonResponseFromTool: true },
|
|
1020
|
+
stopSequence
|
|
1018
1021
|
}
|
|
1019
1022
|
} : void 0;
|
|
1020
1023
|
return {
|
|
@@ -1055,6 +1058,7 @@ var BedrockChatLanguageModel = class {
|
|
|
1055
1058
|
let usage = void 0;
|
|
1056
1059
|
let providerMetadata = void 0;
|
|
1057
1060
|
let isJsonResponseFromTool = false;
|
|
1061
|
+
let stopSequence = null;
|
|
1058
1062
|
const contentBlocks = {};
|
|
1059
1063
|
return {
|
|
1060
1064
|
stream: response.pipeThrough(
|
|
@@ -1063,7 +1067,7 @@ var BedrockChatLanguageModel = class {
|
|
|
1063
1067
|
controller.enqueue({ type: "stream-start", warnings });
|
|
1064
1068
|
},
|
|
1065
1069
|
transform(chunk, controller) {
|
|
1066
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
|
1070
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
|
|
1067
1071
|
function enqueueError(bedrockError) {
|
|
1068
1072
|
finishReason = "error";
|
|
1069
1073
|
controller.enqueue({ type: "error", error: bedrockError });
|
|
@@ -1097,12 +1101,13 @@ var BedrockChatLanguageModel = class {
|
|
|
1097
1101
|
value.messageStop.stopReason,
|
|
1098
1102
|
isJsonResponseFromTool
|
|
1099
1103
|
);
|
|
1104
|
+
stopSequence = (_b = (_a = value.messageStop.additionalModelResponseFields) == null ? void 0 : _a.stop_sequence) != null ? _b : null;
|
|
1100
1105
|
}
|
|
1101
1106
|
if (value.metadata) {
|
|
1102
1107
|
if (value.metadata.usage) {
|
|
1103
1108
|
usage = value.metadata.usage;
|
|
1104
1109
|
}
|
|
1105
|
-
const cacheUsage = ((
|
|
1110
|
+
const cacheUsage = ((_c = value.metadata.usage) == null ? void 0 : _c.cacheWriteInputTokens) != null ? {
|
|
1106
1111
|
usage: {
|
|
1107
1112
|
cacheWriteInputTokens: value.metadata.usage.cacheWriteInputTokens
|
|
1108
1113
|
}
|
|
@@ -1119,7 +1124,7 @@ var BedrockChatLanguageModel = class {
|
|
|
1119
1124
|
};
|
|
1120
1125
|
}
|
|
1121
1126
|
}
|
|
1122
|
-
if (((
|
|
1127
|
+
if (((_d = value.contentBlockStart) == null ? void 0 : _d.contentBlockIndex) != null && !((_f = (_e = value.contentBlockStart) == null ? void 0 : _e.start) == null ? void 0 : _f.toolUse)) {
|
|
1123
1128
|
const blockIndex = value.contentBlockStart.contentBlockIndex;
|
|
1124
1129
|
contentBlocks[blockIndex] = { type: "text" };
|
|
1125
1130
|
controller.enqueue({
|
|
@@ -1127,7 +1132,7 @@ var BedrockChatLanguageModel = class {
|
|
|
1127
1132
|
id: String(blockIndex)
|
|
1128
1133
|
});
|
|
1129
1134
|
}
|
|
1130
|
-
if (((
|
|
1135
|
+
if (((_g = value.contentBlockDelta) == null ? void 0 : _g.delta) && "text" in value.contentBlockDelta.delta && value.contentBlockDelta.delta.text) {
|
|
1131
1136
|
const blockIndex = value.contentBlockDelta.contentBlockIndex || 0;
|
|
1132
1137
|
if (contentBlocks[blockIndex] == null) {
|
|
1133
1138
|
contentBlocks[blockIndex] = { type: "text" };
|
|
@@ -1142,7 +1147,7 @@ var BedrockChatLanguageModel = class {
|
|
|
1142
1147
|
delta: value.contentBlockDelta.delta.text
|
|
1143
1148
|
});
|
|
1144
1149
|
}
|
|
1145
|
-
if (((
|
|
1150
|
+
if (((_h = value.contentBlockStop) == null ? void 0 : _h.contentBlockIndex) != null) {
|
|
1146
1151
|
const blockIndex = value.contentBlockStop.contentBlockIndex;
|
|
1147
1152
|
const contentBlock = contentBlocks[blockIndex];
|
|
1148
1153
|
if (contentBlock != null) {
|
|
@@ -1188,7 +1193,7 @@ var BedrockChatLanguageModel = class {
|
|
|
1188
1193
|
delete contentBlocks[blockIndex];
|
|
1189
1194
|
}
|
|
1190
1195
|
}
|
|
1191
|
-
if (((
|
|
1196
|
+
if (((_i = value.contentBlockDelta) == null ? void 0 : _i.delta) && "reasoningContent" in value.contentBlockDelta.delta && value.contentBlockDelta.delta.reasoningContent) {
|
|
1192
1197
|
const blockIndex = value.contentBlockDelta.contentBlockIndex || 0;
|
|
1193
1198
|
const reasoningContent = value.contentBlockDelta.delta.reasoningContent;
|
|
1194
1199
|
if ("text" in reasoningContent && reasoningContent.text) {
|
|
@@ -1229,7 +1234,7 @@ var BedrockChatLanguageModel = class {
|
|
|
1229
1234
|
}
|
|
1230
1235
|
}
|
|
1231
1236
|
const contentBlockStart = value.contentBlockStart;
|
|
1232
|
-
if (((
|
|
1237
|
+
if (((_j = contentBlockStart == null ? void 0 : contentBlockStart.start) == null ? void 0 : _j.toolUse) != null) {
|
|
1233
1238
|
const toolUse = contentBlockStart.start.toolUse;
|
|
1234
1239
|
const blockIndex = contentBlockStart.contentBlockIndex;
|
|
1235
1240
|
const isJsonResponseTool = usesJsonResponseTool && toolUse.name === "json";
|
|
@@ -1253,7 +1258,7 @@ var BedrockChatLanguageModel = class {
|
|
|
1253
1258
|
const blockIndex = contentBlockDelta.contentBlockIndex;
|
|
1254
1259
|
const contentBlock = contentBlocks[blockIndex];
|
|
1255
1260
|
if ((contentBlock == null ? void 0 : contentBlock.type) === "tool-call") {
|
|
1256
|
-
const delta = (
|
|
1261
|
+
const delta = (_k = contentBlockDelta.delta.toolUse.input) != null ? _k : "";
|
|
1257
1262
|
if (!contentBlock.isJsonResponseTool) {
|
|
1258
1263
|
controller.enqueue({
|
|
1259
1264
|
type: "tool-input-delta",
|
|
@@ -1266,16 +1271,22 @@ var BedrockChatLanguageModel = class {
|
|
|
1266
1271
|
}
|
|
1267
1272
|
},
|
|
1268
1273
|
flush(controller) {
|
|
1269
|
-
if (isJsonResponseFromTool) {
|
|
1274
|
+
if (isJsonResponseFromTool || stopSequence != null) {
|
|
1270
1275
|
if (providerMetadata) {
|
|
1271
1276
|
providerMetadata.bedrock = {
|
|
1272
1277
|
...providerMetadata.bedrock,
|
|
1273
|
-
isJsonResponseFromTool
|
|
1278
|
+
...isJsonResponseFromTool && {
|
|
1279
|
+
isJsonResponseFromTool: true
|
|
1280
|
+
},
|
|
1281
|
+
stopSequence
|
|
1274
1282
|
};
|
|
1275
1283
|
} else {
|
|
1276
1284
|
providerMetadata = {
|
|
1277
1285
|
bedrock: {
|
|
1278
|
-
isJsonResponseFromTool
|
|
1286
|
+
...isJsonResponseFromTool && {
|
|
1287
|
+
isJsonResponseFromTool: true
|
|
1288
|
+
},
|
|
1289
|
+
stopSequence
|
|
1279
1290
|
}
|
|
1280
1291
|
};
|
|
1281
1292
|
}
|
|
@@ -1302,6 +1313,9 @@ var BedrockStopReasonSchema = z3.union([
|
|
|
1302
1313
|
z3.enum(BEDROCK_STOP_REASONS),
|
|
1303
1314
|
z3.string()
|
|
1304
1315
|
]);
|
|
1316
|
+
var BedrockAdditionalModelResponseFieldsSchema = z3.object({
|
|
1317
|
+
stop_sequence: z3.string().optional()
|
|
1318
|
+
}).catchall(z3.unknown());
|
|
1305
1319
|
var BedrockToolUseSchema = z3.object({
|
|
1306
1320
|
toolUseId: z3.string(),
|
|
1307
1321
|
name: z3.string(),
|
|
@@ -1338,6 +1352,7 @@ var BedrockResponseSchema = z3.object({
|
|
|
1338
1352
|
})
|
|
1339
1353
|
}),
|
|
1340
1354
|
stopReason: BedrockStopReasonSchema,
|
|
1355
|
+
additionalModelResponseFields: BedrockAdditionalModelResponseFieldsSchema.nullish(),
|
|
1341
1356
|
trace: z3.unknown().nullish(),
|
|
1342
1357
|
usage: z3.object({
|
|
1343
1358
|
inputTokens: z3.number(),
|
|
@@ -1377,7 +1392,7 @@ var BedrockStreamSchema = z3.object({
|
|
|
1377
1392
|
}).nullish(),
|
|
1378
1393
|
internalServerException: z3.record(z3.string(), z3.unknown()).nullish(),
|
|
1379
1394
|
messageStop: z3.object({
|
|
1380
|
-
additionalModelResponseFields:
|
|
1395
|
+
additionalModelResponseFields: BedrockAdditionalModelResponseFieldsSchema.nullish(),
|
|
1381
1396
|
stopReason: BedrockStopReasonSchema
|
|
1382
1397
|
}).nullish(),
|
|
1383
1398
|
metadata: z3.object({
|
|
@@ -1498,6 +1513,7 @@ var BedrockEmbeddingResponseSchema = z5.object({
|
|
|
1498
1513
|
// src/bedrock-image-model.ts
|
|
1499
1514
|
import {
|
|
1500
1515
|
combineHeaders as combineHeaders3,
|
|
1516
|
+
convertUint8ArrayToBase64,
|
|
1501
1517
|
createJsonErrorResponseHandler as createJsonErrorResponseHandler3,
|
|
1502
1518
|
createJsonResponseHandler as createJsonResponseHandler3,
|
|
1503
1519
|
postJsonToApi as postJsonToApi3,
|
|
@@ -1534,31 +1550,110 @@ var BedrockImageModel = class {
|
|
|
1534
1550
|
seed,
|
|
1535
1551
|
providerOptions,
|
|
1536
1552
|
headers,
|
|
1537
|
-
abortSignal
|
|
1553
|
+
abortSignal,
|
|
1554
|
+
files,
|
|
1555
|
+
mask
|
|
1538
1556
|
}) {
|
|
1539
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
1557
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p;
|
|
1540
1558
|
const warnings = [];
|
|
1541
1559
|
const [width, height] = size ? size.split("x").map(Number) : [];
|
|
1542
|
-
const
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
style: providerOptions.bedrock.style
|
|
1551
|
-
} : {}
|
|
1552
|
-
},
|
|
1553
|
-
imageGenerationConfig: {
|
|
1554
|
-
...width ? { width } : {},
|
|
1555
|
-
...height ? { height } : {},
|
|
1556
|
-
...seed ? { seed } : {},
|
|
1557
|
-
...n ? { numberOfImages: n } : {},
|
|
1558
|
-
...((_c = providerOptions == null ? void 0 : providerOptions.bedrock) == null ? void 0 : _c.quality) ? { quality: providerOptions.bedrock.quality } : {},
|
|
1559
|
-
...((_d = providerOptions == null ? void 0 : providerOptions.bedrock) == null ? void 0 : _d.cfgScale) ? { cfgScale: providerOptions.bedrock.cfgScale } : {}
|
|
1560
|
-
}
|
|
1560
|
+
const hasFiles = files != null && files.length > 0;
|
|
1561
|
+
const imageGenerationConfig = {
|
|
1562
|
+
...width ? { width } : {},
|
|
1563
|
+
...height ? { height } : {},
|
|
1564
|
+
...seed ? { seed } : {},
|
|
1565
|
+
...n ? { numberOfImages: n } : {},
|
|
1566
|
+
...((_a = providerOptions == null ? void 0 : providerOptions.bedrock) == null ? void 0 : _a.quality) ? { quality: providerOptions.bedrock.quality } : {},
|
|
1567
|
+
...((_b = providerOptions == null ? void 0 : providerOptions.bedrock) == null ? void 0 : _b.cfgScale) ? { cfgScale: providerOptions.bedrock.cfgScale } : {}
|
|
1561
1568
|
};
|
|
1569
|
+
let args;
|
|
1570
|
+
if (hasFiles) {
|
|
1571
|
+
const hasMask = (mask == null ? void 0 : mask.type) != null;
|
|
1572
|
+
const hasMaskPrompt = ((_c = providerOptions == null ? void 0 : providerOptions.bedrock) == null ? void 0 : _c.maskPrompt) != null;
|
|
1573
|
+
const taskType = (_e = (_d = providerOptions == null ? void 0 : providerOptions.bedrock) == null ? void 0 : _d.taskType) != null ? _e : hasMask || hasMaskPrompt ? "INPAINTING" : "IMAGE_VARIATION";
|
|
1574
|
+
const sourceImageBase64 = getBase64Data(files[0]);
|
|
1575
|
+
switch (taskType) {
|
|
1576
|
+
case "INPAINTING": {
|
|
1577
|
+
const inPaintingParams = {
|
|
1578
|
+
image: sourceImageBase64,
|
|
1579
|
+
...prompt ? { text: prompt } : {},
|
|
1580
|
+
...((_f = providerOptions == null ? void 0 : providerOptions.bedrock) == null ? void 0 : _f.negativeText) ? { negativeText: providerOptions.bedrock.negativeText } : {}
|
|
1581
|
+
};
|
|
1582
|
+
if (hasMask) {
|
|
1583
|
+
inPaintingParams.maskImage = getBase64Data(mask);
|
|
1584
|
+
} else if (hasMaskPrompt) {
|
|
1585
|
+
inPaintingParams.maskPrompt = providerOptions.bedrock.maskPrompt;
|
|
1586
|
+
}
|
|
1587
|
+
args = {
|
|
1588
|
+
taskType: "INPAINTING",
|
|
1589
|
+
inPaintingParams,
|
|
1590
|
+
imageGenerationConfig
|
|
1591
|
+
};
|
|
1592
|
+
break;
|
|
1593
|
+
}
|
|
1594
|
+
case "OUTPAINTING": {
|
|
1595
|
+
const outPaintingParams = {
|
|
1596
|
+
image: sourceImageBase64,
|
|
1597
|
+
...prompt ? { text: prompt } : {},
|
|
1598
|
+
...((_g = providerOptions == null ? void 0 : providerOptions.bedrock) == null ? void 0 : _g.negativeText) ? { negativeText: providerOptions.bedrock.negativeText } : {},
|
|
1599
|
+
...((_h = providerOptions == null ? void 0 : providerOptions.bedrock) == null ? void 0 : _h.outPaintingMode) ? { outPaintingMode: providerOptions.bedrock.outPaintingMode } : {}
|
|
1600
|
+
};
|
|
1601
|
+
if (hasMask) {
|
|
1602
|
+
outPaintingParams.maskImage = getBase64Data(mask);
|
|
1603
|
+
} else if (hasMaskPrompt) {
|
|
1604
|
+
outPaintingParams.maskPrompt = providerOptions.bedrock.maskPrompt;
|
|
1605
|
+
}
|
|
1606
|
+
args = {
|
|
1607
|
+
taskType: "OUTPAINTING",
|
|
1608
|
+
outPaintingParams,
|
|
1609
|
+
imageGenerationConfig
|
|
1610
|
+
};
|
|
1611
|
+
break;
|
|
1612
|
+
}
|
|
1613
|
+
case "BACKGROUND_REMOVAL": {
|
|
1614
|
+
args = {
|
|
1615
|
+
taskType: "BACKGROUND_REMOVAL",
|
|
1616
|
+
backgroundRemovalParams: {
|
|
1617
|
+
image: sourceImageBase64
|
|
1618
|
+
}
|
|
1619
|
+
};
|
|
1620
|
+
break;
|
|
1621
|
+
}
|
|
1622
|
+
case "IMAGE_VARIATION": {
|
|
1623
|
+
const images = files.map((file) => getBase64Data(file));
|
|
1624
|
+
const imageVariationParams = {
|
|
1625
|
+
images,
|
|
1626
|
+
...prompt ? { text: prompt } : {},
|
|
1627
|
+
...((_i = providerOptions == null ? void 0 : providerOptions.bedrock) == null ? void 0 : _i.negativeText) ? { negativeText: providerOptions.bedrock.negativeText } : {},
|
|
1628
|
+
...((_j = providerOptions == null ? void 0 : providerOptions.bedrock) == null ? void 0 : _j.similarityStrength) != null ? {
|
|
1629
|
+
similarityStrength: providerOptions.bedrock.similarityStrength
|
|
1630
|
+
} : {}
|
|
1631
|
+
};
|
|
1632
|
+
args = {
|
|
1633
|
+
taskType: "IMAGE_VARIATION",
|
|
1634
|
+
imageVariationParams,
|
|
1635
|
+
imageGenerationConfig
|
|
1636
|
+
};
|
|
1637
|
+
break;
|
|
1638
|
+
}
|
|
1639
|
+
default:
|
|
1640
|
+
throw new Error(`Unsupported task type: ${taskType}`);
|
|
1641
|
+
}
|
|
1642
|
+
} else {
|
|
1643
|
+
args = {
|
|
1644
|
+
taskType: "TEXT_IMAGE",
|
|
1645
|
+
textToImageParams: {
|
|
1646
|
+
text: prompt,
|
|
1647
|
+
...((_k = providerOptions == null ? void 0 : providerOptions.bedrock) == null ? void 0 : _k.negativeText) ? {
|
|
1648
|
+
negativeText: providerOptions.bedrock.negativeText
|
|
1649
|
+
} : {},
|
|
1650
|
+
...((_l = providerOptions == null ? void 0 : providerOptions.bedrock) == null ? void 0 : _l.style) ? {
|
|
1651
|
+
style: providerOptions.bedrock.style
|
|
1652
|
+
} : {}
|
|
1653
|
+
},
|
|
1654
|
+
imageGenerationConfig
|
|
1655
|
+
};
|
|
1656
|
+
}
|
|
1562
1657
|
if (aspectRatio != void 0) {
|
|
1563
1658
|
warnings.push({
|
|
1564
1659
|
type: "unsupported",
|
|
@@ -1566,7 +1661,7 @@ var BedrockImageModel = class {
|
|
|
1566
1661
|
details: "This model does not support aspect ratio. Use `size` instead."
|
|
1567
1662
|
});
|
|
1568
1663
|
}
|
|
1569
|
-
const currentDate = (
|
|
1664
|
+
const currentDate = (_o = (_n = (_m = this.config._internal) == null ? void 0 : _m.currentDate) == null ? void 0 : _n.call(_m)) != null ? _o : /* @__PURE__ */ new Date();
|
|
1570
1665
|
const { value: response, responseHeaders } = await postJsonToApi3({
|
|
1571
1666
|
url: this.getUrl(this.modelId),
|
|
1572
1667
|
headers: await resolve3(
|
|
@@ -1583,6 +1678,18 @@ var BedrockImageModel = class {
|
|
|
1583
1678
|
abortSignal,
|
|
1584
1679
|
fetch: this.config.fetch
|
|
1585
1680
|
});
|
|
1681
|
+
if (response.status === "Request Moderated") {
|
|
1682
|
+
const moderationReasons = (_p = response.details) == null ? void 0 : _p["Moderation Reasons"];
|
|
1683
|
+
const reasons = Array.isArray(moderationReasons) ? moderationReasons : ["Unknown"];
|
|
1684
|
+
throw new Error(
|
|
1685
|
+
`Amazon Bedrock request was moderated: ${reasons.join(", ")}`
|
|
1686
|
+
);
|
|
1687
|
+
}
|
|
1688
|
+
if (!response.images || response.images.length === 0) {
|
|
1689
|
+
throw new Error(
|
|
1690
|
+
"Amazon Bedrock returned no images. " + (response.status ? `Status: ${response.status}` : "")
|
|
1691
|
+
);
|
|
1692
|
+
}
|
|
1586
1693
|
return {
|
|
1587
1694
|
images: response.images,
|
|
1588
1695
|
warnings,
|
|
@@ -1594,8 +1701,27 @@ var BedrockImageModel = class {
|
|
|
1594
1701
|
};
|
|
1595
1702
|
}
|
|
1596
1703
|
};
|
|
1704
|
+
function getBase64Data(file) {
|
|
1705
|
+
if (file.type === "url") {
|
|
1706
|
+
throw new Error(
|
|
1707
|
+
"URL-based images are not supported for Amazon Bedrock image editing. Please provide the image data directly."
|
|
1708
|
+
);
|
|
1709
|
+
}
|
|
1710
|
+
if (file.data instanceof Uint8Array) {
|
|
1711
|
+
return convertUint8ArrayToBase64(file.data);
|
|
1712
|
+
}
|
|
1713
|
+
return file.data;
|
|
1714
|
+
}
|
|
1597
1715
|
var bedrockImageResponseSchema = z6.object({
|
|
1598
|
-
|
|
1716
|
+
// Normal successful response
|
|
1717
|
+
images: z6.array(z6.string()).optional(),
|
|
1718
|
+
// Moderation response fields
|
|
1719
|
+
id: z6.string().optional(),
|
|
1720
|
+
status: z6.string().optional(),
|
|
1721
|
+
result: z6.unknown().optional(),
|
|
1722
|
+
progress: z6.unknown().optional(),
|
|
1723
|
+
details: z6.record(z6.string(), z6.unknown()).optional(),
|
|
1724
|
+
preview: z6.unknown().optional()
|
|
1599
1725
|
});
|
|
1600
1726
|
|
|
1601
1727
|
// src/bedrock-sigv4-fetch.ts
|
|
@@ -1608,7 +1734,7 @@ import {
|
|
|
1608
1734
|
import { AwsV4Signer } from "aws4fetch";
|
|
1609
1735
|
|
|
1610
1736
|
// src/version.ts
|
|
1611
|
-
var VERSION = true ? "4.0.0-beta.
|
|
1737
|
+
var VERSION = true ? "4.0.0-beta.102" : "0.0.0-test";
|
|
1612
1738
|
|
|
1613
1739
|
// src/bedrock-sigv4-fetch.ts
|
|
1614
1740
|
function createSigV4FetchFunction(getCredentials, fetch = globalThis.fetch) {
|