@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.mjs
CHANGED
|
@@ -648,7 +648,8 @@ import {
|
|
|
648
648
|
function prepareTools({
|
|
649
649
|
tools,
|
|
650
650
|
toolChoice,
|
|
651
|
-
modelId
|
|
651
|
+
modelId,
|
|
652
|
+
isVertexProvider = false
|
|
652
653
|
}) {
|
|
653
654
|
var _a, _b;
|
|
654
655
|
tools = (tools == null ? void 0 : tools.length) ? tools : void 0;
|
|
@@ -784,7 +785,9 @@ function prepareTools({
|
|
|
784
785
|
}
|
|
785
786
|
const combinedToolConfig = {
|
|
786
787
|
functionCallingConfig: { mode: "VALIDATED" },
|
|
787
|
-
|
|
788
|
+
...!isVertexProvider && {
|
|
789
|
+
includeServerSideToolInvocations: true
|
|
790
|
+
}
|
|
788
791
|
};
|
|
789
792
|
if (toolChoice != null) {
|
|
790
793
|
switch (toolChoice.type) {
|
|
@@ -1224,7 +1227,8 @@ var GoogleGenerativeAILanguageModel = class {
|
|
|
1224
1227
|
} = prepareTools({
|
|
1225
1228
|
tools,
|
|
1226
1229
|
toolChoice,
|
|
1227
|
-
modelId: this.modelId
|
|
1230
|
+
modelId: this.modelId,
|
|
1231
|
+
isVertexProvider
|
|
1228
1232
|
});
|
|
1229
1233
|
const streamFunctionCallArguments = isStreaming && isVertexProvider ? (_a = googleOptions == null ? void 0 : googleOptions.streamFunctionCallArguments) != null ? _a : false : void 0;
|
|
1230
1234
|
const toolConfig = googleToolConfig || streamFunctionCallArguments || (googleOptions == null ? void 0 : googleOptions.retrievalConfig) ? {
|