@ai-sdk/xai 2.0.81 → 2.0.82
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 +6 -0
- package/dist/index.js +21 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +21 -6
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1407,12 +1407,27 @@ async function convertToXaiResponsesInput({
|
|
|
1407
1407
|
outputValue = JSON.stringify(output.value);
|
|
1408
1408
|
break;
|
|
1409
1409
|
case "content":
|
|
1410
|
-
outputValue =
|
|
1411
|
-
|
|
1412
|
-
|
|
1410
|
+
outputValue = [];
|
|
1411
|
+
for (const item of output.value) {
|
|
1412
|
+
switch (item.type) {
|
|
1413
|
+
case "text": {
|
|
1414
|
+
outputValue.push({
|
|
1415
|
+
type: "input_text",
|
|
1416
|
+
text: item.text
|
|
1417
|
+
});
|
|
1418
|
+
break;
|
|
1419
|
+
}
|
|
1420
|
+
case "media": {
|
|
1421
|
+
if (item.mediaType.startsWith("image/")) {
|
|
1422
|
+
outputValue.push({
|
|
1423
|
+
type: "input_image",
|
|
1424
|
+
image_url: `data:${item.mediaType};base64,${item.data}`
|
|
1425
|
+
});
|
|
1426
|
+
}
|
|
1427
|
+
break;
|
|
1428
|
+
}
|
|
1413
1429
|
}
|
|
1414
|
-
|
|
1415
|
-
}).join("");
|
|
1430
|
+
}
|
|
1416
1431
|
break;
|
|
1417
1432
|
default: {
|
|
1418
1433
|
const _exhaustiveCheck = output;
|
|
@@ -2375,7 +2390,7 @@ var xaiTools = {
|
|
|
2375
2390
|
};
|
|
2376
2391
|
|
|
2377
2392
|
// src/version.ts
|
|
2378
|
-
var VERSION = true ? "2.0.
|
|
2393
|
+
var VERSION = true ? "2.0.82" : "0.0.0-test";
|
|
2379
2394
|
|
|
2380
2395
|
// src/xai-provider.ts
|
|
2381
2396
|
var xaiErrorStructure = {
|