@llmgateway/ai-sdk-provider 2.1.1 → 2.2.1
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/index.js +13 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +13 -0
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.js +13 -0
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +13 -0
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/internal/index.js
CHANGED
|
@@ -1338,6 +1338,19 @@ var LLMGatewayChatLanguageModel = class {
|
|
|
1338
1338
|
usage: this.settings.usage
|
|
1339
1339
|
}, this.config.extraBody), this.settings.extraBody);
|
|
1340
1340
|
if ((responseFormat == null ? void 0 : responseFormat.type) === "json") {
|
|
1341
|
+
if ("schema" in responseFormat && responseFormat.schema) {
|
|
1342
|
+
return __spreadProps(__spreadValues({}, baseArgs), {
|
|
1343
|
+
response_format: {
|
|
1344
|
+
type: "json_schema",
|
|
1345
|
+
json_schema: {
|
|
1346
|
+
name: responseFormat.name || "response",
|
|
1347
|
+
description: responseFormat.description,
|
|
1348
|
+
schema: responseFormat.schema,
|
|
1349
|
+
strict: true
|
|
1350
|
+
}
|
|
1351
|
+
}
|
|
1352
|
+
});
|
|
1353
|
+
}
|
|
1341
1354
|
return __spreadProps(__spreadValues({}, baseArgs), {
|
|
1342
1355
|
response_format: { type: "json_object" }
|
|
1343
1356
|
});
|