Merge pull request #651 from tenacioustommy/fix-gemini-json

fix-gemini-json-schema
This commit is contained in:
Calcium-Ion
2024-12-23 00:04:08 +08:00
committed by GitHub

View File

@@ -206,7 +206,7 @@ func removeAdditionalPropertiesWithDepth(schema interface{}, depth int) interfac
if typeVal, exists := v["type"]; !exists || (typeVal != "object" && typeVal != "array") {
return schema
}
delete(v, "title")
switch v["type"] {
case "object":
delete(v, "additionalProperties")