@ai-sdk/google 3.0.26 → 3.0.28
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 +12 -0
- package/dist/index.js +6 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -4
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.js +2 -2
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +2 -2
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +3 -3
- package/src/convert-to-google-generative-ai-messages.ts +5 -1
- package/src/google-generative-ai-image-model.ts +13 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @ai-sdk/google
|
|
2
2
|
|
|
3
|
+
## 3.0.28
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 5a307f5: feat(provider/google-vertex): allow using Gemini image models with `generateImage`
|
|
8
|
+
|
|
9
|
+
## 3.0.27
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 051361b: fix(vertex): add fallback for providerOptions keyname
|
|
14
|
+
|
|
3
15
|
## 3.0.26
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/dist/index.js
CHANGED
|
@@ -30,7 +30,7 @@ module.exports = __toCommonJS(src_exports);
|
|
|
30
30
|
var import_provider_utils16 = require("@ai-sdk/provider-utils");
|
|
31
31
|
|
|
32
32
|
// src/version.ts
|
|
33
|
-
var VERSION = true ? "3.0.
|
|
33
|
+
var VERSION = true ? "3.0.28" : "0.0.0-test";
|
|
34
34
|
|
|
35
35
|
// src/google-generative-ai-embedding-model.ts
|
|
36
36
|
var import_provider = require("@ai-sdk/provider");
|
|
@@ -419,8 +419,8 @@ function convertToGoogleGenerativeAIMessages(prompt, options) {
|
|
|
419
419
|
contents.push({
|
|
420
420
|
role: "model",
|
|
421
421
|
parts: content.map((part) => {
|
|
422
|
-
var _a2;
|
|
423
|
-
const providerOpts = (_a2 = part.providerOptions) == null ? void 0 : _a2[providerOptionsName];
|
|
422
|
+
var _a2, _b2, _c2;
|
|
423
|
+
const providerOpts = (_c2 = (_a2 = part.providerOptions) == null ? void 0 : _a2[providerOptionsName]) != null ? _c2 : providerOptionsName !== "google" ? (_b2 = part.providerOptions) == null ? void 0 : _b2.google : void 0;
|
|
424
424
|
const thoughtSignature = (providerOpts == null ? void 0 : providerOpts.thoughtSignature) != null ? String(providerOpts.thoughtSignature) : void 0;
|
|
425
425
|
switch (part.type) {
|
|
426
426
|
case "text": {
|
|
@@ -1960,7 +1960,9 @@ var GoogleGenerativeAIImageModel = class {
|
|
|
1960
1960
|
providerOptions: {
|
|
1961
1961
|
google: {
|
|
1962
1962
|
responseModalities: ["IMAGE"],
|
|
1963
|
-
imageConfig: aspectRatio ? {
|
|
1963
|
+
imageConfig: aspectRatio ? {
|
|
1964
|
+
aspectRatio
|
|
1965
|
+
} : void 0,
|
|
1964
1966
|
...(_c = providerOptions == null ? void 0 : providerOptions.google) != null ? _c : {}
|
|
1965
1967
|
}
|
|
1966
1968
|
},
|