@ai-sdk/google 4.0.0-beta.34 → 4.0.0-beta.35
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 +8 -0
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -5
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/google-generative-ai-files.ts +0 -2
- package/src/google-generative-ai-language-model.ts +1 -11
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 ? "4.0.0-beta.
|
|
10
|
+
var VERSION = true ? "4.0.0-beta.35" : "0.0.0-test";
|
|
11
11
|
|
|
12
12
|
// src/google-generative-ai-embedding-model.ts
|
|
13
13
|
import {
|
|
@@ -3072,13 +3072,13 @@ import {
|
|
|
3072
3072
|
} from "@ai-sdk/provider";
|
|
3073
3073
|
import {
|
|
3074
3074
|
combineHeaders as combineHeaders5,
|
|
3075
|
-
convertUint8ArrayToBase64
|
|
3075
|
+
convertUint8ArrayToBase64,
|
|
3076
3076
|
createJsonResponseHandler as createJsonResponseHandler5,
|
|
3077
3077
|
delay as delay2,
|
|
3078
3078
|
getFromApi as getFromApi2,
|
|
3079
3079
|
lazySchema as lazySchema13,
|
|
3080
3080
|
parseProviderOptions as parseProviderOptions5,
|
|
3081
|
-
postJsonToApi as
|
|
3081
|
+
postJsonToApi as postJsonToApi4,
|
|
3082
3082
|
resolve as resolve4,
|
|
3083
3083
|
zodSchema as zodSchema13
|
|
3084
3084
|
} from "@ai-sdk/provider-utils";
|
|
@@ -3117,7 +3117,7 @@ var GoogleGenerativeAIVideoModel = class {
|
|
|
3117
3117
|
details: "Google Generative AI video models require base64-encoded images. URL will be ignored."
|
|
3118
3118
|
});
|
|
3119
3119
|
} else {
|
|
3120
|
-
const base64Data = typeof options.image.data === "string" ? options.image.data :
|
|
3120
|
+
const base64Data = typeof options.image.data === "string" ? options.image.data : convertUint8ArrayToBase64(options.image.data);
|
|
3121
3121
|
instance.image = {
|
|
3122
3122
|
inlineData: {
|
|
3123
3123
|
mimeType: options.image.mediaType || "image/png",
|
|
@@ -3183,7 +3183,7 @@ var GoogleGenerativeAIVideoModel = class {
|
|
|
3183
3183
|
}
|
|
3184
3184
|
}
|
|
3185
3185
|
}
|
|
3186
|
-
const { value: operation } = await
|
|
3186
|
+
const { value: operation } = await postJsonToApi4({
|
|
3187
3187
|
url: `${this.config.baseURL}/models/${this.modelId}:predictLongRunning`,
|
|
3188
3188
|
headers: combineHeaders5(
|
|
3189
3189
|
await resolve4(this.config.headers),
|