@ai-sdk/google 3.0.68 → 3.0.70
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 +14 -0
- package/dist/index.js +17 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +17 -4
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.js +7 -3
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +7 -3
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/google-generative-ai-language-model.ts +1 -0
- package/src/google-prepare-tools.ts +6 -2
- package/src/interactions/convert-to-google-interactions-input.ts +9 -0
package/dist/internal/index.js
CHANGED
|
@@ -656,7 +656,8 @@ var import_provider2 = require("@ai-sdk/provider");
|
|
|
656
656
|
function prepareTools({
|
|
657
657
|
tools,
|
|
658
658
|
toolChoice,
|
|
659
|
-
modelId
|
|
659
|
+
modelId,
|
|
660
|
+
isVertexProvider = false
|
|
660
661
|
}) {
|
|
661
662
|
var _a, _b;
|
|
662
663
|
tools = (tools == null ? void 0 : tools.length) ? tools : void 0;
|
|
@@ -792,7 +793,9 @@ function prepareTools({
|
|
|
792
793
|
}
|
|
793
794
|
const combinedToolConfig = {
|
|
794
795
|
functionCallingConfig: { mode: "VALIDATED" },
|
|
795
|
-
|
|
796
|
+
...!isVertexProvider && {
|
|
797
|
+
includeServerSideToolInvocations: true
|
|
798
|
+
}
|
|
796
799
|
};
|
|
797
800
|
if (toolChoice != null) {
|
|
798
801
|
switch (toolChoice.type) {
|
|
@@ -1232,7 +1235,8 @@ var GoogleGenerativeAILanguageModel = class {
|
|
|
1232
1235
|
} = prepareTools({
|
|
1233
1236
|
tools,
|
|
1234
1237
|
toolChoice,
|
|
1235
|
-
modelId: this.modelId
|
|
1238
|
+
modelId: this.modelId,
|
|
1239
|
+
isVertexProvider
|
|
1236
1240
|
});
|
|
1237
1241
|
const streamFunctionCallArguments = isStreaming && isVertexProvider ? (_a = googleOptions == null ? void 0 : googleOptions.streamFunctionCallArguments) != null ? _a : false : void 0;
|
|
1238
1242
|
const toolConfig = googleToolConfig || streamFunctionCallArguments || (googleOptions == null ? void 0 : googleOptions.retrievalConfig) ? {
|