@ai-sdk/google
Advanced tools
Comparing version 0.0.54 to 0.0.55
@@ -38,2 +38,5 @@ "use strict"; | ||
function convertJSONSchemaToOpenAPISchema(jsonSchema) { | ||
if (isEmptyObjectSchema(jsonSchema)) { | ||
return void 0; | ||
} | ||
if (typeof jsonSchema === "boolean") { | ||
@@ -79,3 +82,3 @@ return { type: "boolean", properties: {} }; | ||
} | ||
if (properties) { | ||
if (properties != null) { | ||
result.properties = Object.entries(properties).reduce( | ||
@@ -105,2 +108,5 @@ (acc, [key, value]) => { | ||
} | ||
function isEmptyObjectSchema(jsonSchema) { | ||
return jsonSchema != null && typeof jsonSchema === "object" && jsonSchema.type === "object" && (jsonSchema.properties == null || Object.keys(jsonSchema.properties).length === 0); | ||
} | ||
@@ -107,0 +113,0 @@ // src/convert-to-google-generative-ai-messages.ts |
# @ai-sdk/google | ||
## 0.0.55 | ||
### Patch Changes | ||
- 11beb9d: fix (provider/google): support tool calls without parameters | ||
## 0.0.54 | ||
@@ -4,0 +10,0 @@ |
@@ -38,2 +38,5 @@ "use strict"; | ||
function convertJSONSchemaToOpenAPISchema(jsonSchema) { | ||
if (isEmptyObjectSchema(jsonSchema)) { | ||
return void 0; | ||
} | ||
if (typeof jsonSchema === "boolean") { | ||
@@ -79,3 +82,3 @@ return { type: "boolean", properties: {} }; | ||
} | ||
if (properties) { | ||
if (properties != null) { | ||
result.properties = Object.entries(properties).reduce( | ||
@@ -105,2 +108,5 @@ (acc, [key, value]) => { | ||
} | ||
function isEmptyObjectSchema(jsonSchema) { | ||
return jsonSchema != null && typeof jsonSchema === "object" && jsonSchema.type === "object" && (jsonSchema.properties == null || Object.keys(jsonSchema.properties).length === 0); | ||
} | ||
@@ -107,0 +113,0 @@ // src/convert-to-google-generative-ai-messages.ts |
{ | ||
"name": "@ai-sdk/google", | ||
"version": "0.0.54", | ||
"version": "0.0.55", | ||
"license": "Apache-2.0", | ||
@@ -5,0 +5,0 @@ "sideEffects": false, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
197926
2515