@ai-sdk/xai 3.0.132 → 3.0.133
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 +3 -23
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -23
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
- package/src/responses/xai-responses-prepare-tools.ts +1 -2
- package/src/xai-prepare-tools.ts +1 -2
- package/src/remove-additional-properties.ts +0 -24
package/CHANGELOG.md
CHANGED
package/dist/index.js
CHANGED
|
@@ -357,26 +357,6 @@ var xaiFailedResponseHandler = (0, import_provider_utils2.createJsonErrorRespons
|
|
|
357
357
|
|
|
358
358
|
// src/xai-prepare-tools.ts
|
|
359
359
|
var import_provider2 = require("@ai-sdk/provider");
|
|
360
|
-
|
|
361
|
-
// src/remove-additional-properties.ts
|
|
362
|
-
function removeAdditionalPropertiesFalse(value) {
|
|
363
|
-
if (Array.isArray(value)) {
|
|
364
|
-
return value.map(removeAdditionalPropertiesFalse);
|
|
365
|
-
}
|
|
366
|
-
if (value == null || typeof value !== "object") {
|
|
367
|
-
return value;
|
|
368
|
-
}
|
|
369
|
-
const result = {};
|
|
370
|
-
for (const [key, propertyValue] of Object.entries(value)) {
|
|
371
|
-
if (key === "additionalProperties" && propertyValue === false) {
|
|
372
|
-
continue;
|
|
373
|
-
}
|
|
374
|
-
result[key] = removeAdditionalPropertiesFalse(propertyValue);
|
|
375
|
-
}
|
|
376
|
-
return result;
|
|
377
|
-
}
|
|
378
|
-
|
|
379
|
-
// src/xai-prepare-tools.ts
|
|
380
360
|
function prepareTools({
|
|
381
361
|
tools,
|
|
382
362
|
toolChoice
|
|
@@ -399,7 +379,7 @@ function prepareTools({
|
|
|
399
379
|
function: {
|
|
400
380
|
name: tool.name,
|
|
401
381
|
description: tool.description,
|
|
402
|
-
parameters:
|
|
382
|
+
parameters: tool.inputSchema,
|
|
403
383
|
...tool.strict != null ? { strict: tool.strict } : {}
|
|
404
384
|
}
|
|
405
385
|
});
|
|
@@ -2141,7 +2121,7 @@ async function prepareResponsesTools({
|
|
|
2141
2121
|
type: "function",
|
|
2142
2122
|
name: tool.name,
|
|
2143
2123
|
description: tool.description,
|
|
2144
|
-
parameters:
|
|
2124
|
+
parameters: tool.inputSchema,
|
|
2145
2125
|
...tool.strict != null ? { strict: tool.strict } : {}
|
|
2146
2126
|
});
|
|
2147
2127
|
}
|
|
@@ -3043,7 +3023,7 @@ var xaiTools = {
|
|
|
3043
3023
|
};
|
|
3044
3024
|
|
|
3045
3025
|
// src/version.ts
|
|
3046
|
-
var VERSION = true ? "3.0.
|
|
3026
|
+
var VERSION = true ? "3.0.133" : "0.0.0-test";
|
|
3047
3027
|
|
|
3048
3028
|
// src/xai-video-model.ts
|
|
3049
3029
|
var import_provider6 = require("@ai-sdk/provider");
|