@ai-sdk/google 2.0.105 → 2.0.106
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 +6 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -1
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.js +5 -0
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +5 -0
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
package/dist/index.js
CHANGED
|
@@ -30,7 +30,7 @@ module.exports = __toCommonJS(index_exports);
|
|
|
30
30
|
var import_provider_utils15 = require("@ai-sdk/provider-utils");
|
|
31
31
|
|
|
32
32
|
// src/version.ts
|
|
33
|
-
var VERSION = true ? "2.0.
|
|
33
|
+
var VERSION = true ? "2.0.106" : "0.0.0-test";
|
|
34
34
|
|
|
35
35
|
// src/google-generative-ai-embedding-model.ts
|
|
36
36
|
var import_provider = require("@ai-sdk/provider");
|
|
@@ -397,6 +397,11 @@ function convertJSONSchemaDefinition(jsonSchema, isRoot, referenceContext) {
|
|
|
397
397
|
const nonNullTypes = type.filter((t) => t !== "null");
|
|
398
398
|
if (nonNullTypes.length === 0) {
|
|
399
399
|
result.type = "null";
|
|
400
|
+
} else if (nonNullTypes.length === 1) {
|
|
401
|
+
result.type = nonNullTypes[0];
|
|
402
|
+
if (hasNull) {
|
|
403
|
+
result.nullable = true;
|
|
404
|
+
}
|
|
400
405
|
} else {
|
|
401
406
|
result.anyOf = nonNullTypes.map((t) => ({ type: t }));
|
|
402
407
|
if (hasNull) {
|