@ai-sdk/google 2.0.105 → 2.0.107
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 +13 -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 +5 -5
package/dist/index.mjs
CHANGED
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
} from "@ai-sdk/provider-utils";
|
|
8
8
|
|
|
9
9
|
// src/version.ts
|
|
10
|
-
var VERSION = true ? "2.0.
|
|
10
|
+
var VERSION = true ? "2.0.107" : "0.0.0-test";
|
|
11
11
|
|
|
12
12
|
// src/google-generative-ai-embedding-model.ts
|
|
13
13
|
import {
|
|
@@ -403,6 +403,11 @@ function convertJSONSchemaDefinition(jsonSchema, isRoot, referenceContext) {
|
|
|
403
403
|
const nonNullTypes = type.filter((t) => t !== "null");
|
|
404
404
|
if (nonNullTypes.length === 0) {
|
|
405
405
|
result.type = "null";
|
|
406
|
+
} else if (nonNullTypes.length === 1) {
|
|
407
|
+
result.type = nonNullTypes[0];
|
|
408
|
+
if (hasNull) {
|
|
409
|
+
result.nullable = true;
|
|
410
|
+
}
|
|
406
411
|
} else {
|
|
407
412
|
result.anyOf = nonNullTypes.map((t) => ({ type: t }));
|
|
408
413
|
if (hasNull) {
|