@ai-sdk/google 3.0.87 → 3.0.89
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 +16 -0
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -6
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.js +1 -1
- 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 +2 -2
- package/src/convert-to-google-generative-ai-messages.ts +2 -2
- package/src/google-generative-ai-embedding-model.ts +1 -1
- package/src/interactions/convert-to-google-interactions-input.ts +2 -2
package/dist/internal/index.mjs
CHANGED
|
@@ -171,7 +171,7 @@ function isEmptyObjectSchema(jsonSchema) {
|
|
|
171
171
|
import {
|
|
172
172
|
UnsupportedFunctionalityError
|
|
173
173
|
} from "@ai-sdk/provider";
|
|
174
|
-
import { convertToBase64 } from "@ai-sdk/provider-utils";
|
|
174
|
+
import { convertToBase64, secureJsonParse } from "@ai-sdk/provider-utils";
|
|
175
175
|
var SKIP_THOUGHT_SIGNATURE_VALIDATOR = "skip_thought_signature_validator";
|
|
176
176
|
function getGoogleProviderOptions(providerOptions, providerOptionsName) {
|
|
177
177
|
const namespaces = [
|
|
@@ -401,7 +401,7 @@ function convertToGoogleGenerativeAIMessages(prompt, options) {
|
|
|
401
401
|
return {
|
|
402
402
|
toolCall: {
|
|
403
403
|
toolType: serverToolType,
|
|
404
|
-
args: typeof part.input === "string" ?
|
|
404
|
+
args: typeof part.input === "string" ? secureJsonParse(part.input) : part.input,
|
|
405
405
|
id: serverToolCallId
|
|
406
406
|
},
|
|
407
407
|
thoughtSignature: effectiveThoughtSignature
|