@ai-sdk/google 3.0.61 → 3.0.62
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 +10 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +10 -6
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.js +9 -5
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +9 -5
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +3 -3
- package/src/google-generative-ai-language-model.ts +26 -19
- package/src/google-generative-ai-options.ts +3 -2
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 ? "3.0.
|
|
10
|
+
var VERSION = true ? "3.0.62" : "0.0.0-test";
|
|
11
11
|
|
|
12
12
|
// src/google-generative-ai-embedding-model.ts
|
|
13
13
|
import {
|
|
@@ -828,9 +828,10 @@ var googleLanguageModelOptions = lazySchema4(
|
|
|
828
828
|
/**
|
|
829
829
|
* Optional. When set to true, function call arguments will be streamed
|
|
830
830
|
* incrementally via partialArgs in streaming responses. Only supported
|
|
831
|
-
* on the Vertex AI API (not the Gemini API)
|
|
831
|
+
* on the Vertex AI API (not the Gemini API) and only for Gemini 3+
|
|
832
|
+
* models.
|
|
832
833
|
*
|
|
833
|
-
* @default
|
|
834
|
+
* @default false
|
|
834
835
|
*
|
|
835
836
|
* https://docs.cloud.google.com/vertex-ai/generative-ai/docs/multimodal/function-calling#streaming-fc
|
|
836
837
|
*/
|
|
@@ -1374,7 +1375,7 @@ var GoogleGenerativeAILanguageModel = class {
|
|
|
1374
1375
|
tools,
|
|
1375
1376
|
toolChoice,
|
|
1376
1377
|
providerOptions
|
|
1377
|
-
}) {
|
|
1378
|
+
}, { isStreaming = false } = {}) {
|
|
1378
1379
|
var _a, _b;
|
|
1379
1380
|
const warnings = [];
|
|
1380
1381
|
const providerOptionsName = this.config.provider.includes("vertex") ? "vertex" : "google";
|
|
@@ -1424,7 +1425,7 @@ var GoogleGenerativeAILanguageModel = class {
|
|
|
1424
1425
|
toolChoice,
|
|
1425
1426
|
modelId: this.modelId
|
|
1426
1427
|
});
|
|
1427
|
-
const streamFunctionCallArguments = isVertexProvider ? (_a = googleOptions == null ? void 0 : googleOptions.streamFunctionCallArguments) != null ? _a :
|
|
1428
|
+
const streamFunctionCallArguments = isStreaming && isVertexProvider ? (_a = googleOptions == null ? void 0 : googleOptions.streamFunctionCallArguments) != null ? _a : false : void 0;
|
|
1428
1429
|
const toolConfig = googleToolConfig || streamFunctionCallArguments || (googleOptions == null ? void 0 : googleOptions.retrievalConfig) ? {
|
|
1429
1430
|
...googleToolConfig,
|
|
1430
1431
|
...streamFunctionCallArguments && {
|
|
@@ -1663,7 +1664,10 @@ var GoogleGenerativeAILanguageModel = class {
|
|
|
1663
1664
|
};
|
|
1664
1665
|
}
|
|
1665
1666
|
async doStream(options) {
|
|
1666
|
-
const { args, warnings, providerOptionsName } = await this.getArgs(
|
|
1667
|
+
const { args, warnings, providerOptionsName } = await this.getArgs(
|
|
1668
|
+
options,
|
|
1669
|
+
{ isStreaming: true }
|
|
1670
|
+
);
|
|
1667
1671
|
const headers = combineHeaders2(
|
|
1668
1672
|
await resolve2(this.config.headers),
|
|
1669
1673
|
options.headers
|