@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/CHANGELOG.md
CHANGED
package/dist/index.js
CHANGED
|
@@ -1410,12 +1410,27 @@ async function convertToXaiResponsesInput({
|
|
|
1410
1410
|
outputValue = JSON.stringify(output.value);
|
|
1411
1411
|
break;
|
|
1412
1412
|
case "content":
|
|
1413
|
-
outputValue =
|
|
1414
|
-
|
|
1415
|
-
|
|
1413
|
+
outputValue = [];
|
|
1414
|
+
for (const item of output.value) {
|
|
1415
|
+
switch (item.type) {
|
|
1416
|
+
case "text": {
|
|
1417
|
+
outputValue.push({
|
|
1418
|
+
type: "input_text",
|
|
1419
|
+
text: item.text
|
|
1420
|
+
});
|
|
1421
|
+
break;
|
|
1422
|
+
}
|
|
1423
|
+
case "media": {
|
|
1424
|
+
if (item.mediaType.startsWith("image/")) {
|
|
1425
|
+
outputValue.push({
|
|
1426
|
+
type: "input_image",
|
|
1427
|
+
image_url: `data:${item.mediaType};base64,${item.data}`
|
|
1428
|
+
});
|
|
1429
|
+
}
|
|
1430
|
+
break;
|
|
1431
|
+
}
|
|
1416
1432
|
}
|
|
1417
|
-
|
|
1418
|
-
}).join("");
|
|
1433
|
+
}
|
|
1419
1434
|
break;
|
|
1420
1435
|
default: {
|
|
1421
1436
|
const _exhaustiveCheck = output;
|
|
@@ -2368,7 +2383,7 @@ var xaiTools = {
|
|
|
2368
2383
|
};
|
|
2369
2384
|
|
|
2370
2385
|
// src/version.ts
|
|
2371
|
-
var VERSION = true ? "2.0.
|
|
2386
|
+
var VERSION = true ? "2.0.82" : "0.0.0-test";
|
|
2372
2387
|
|
|
2373
2388
|
// src/xai-provider.ts
|
|
2374
2389
|
var xaiErrorStructure = {
|