Merge pull request #651 from tenacioustommy/fix-gemini-json
Some checks failed
Publish Docker image (amd64) / Push Docker image to multiple registries (push) Has been cancelled
Publish Docker image (arm64) / Push Docker image to multiple registries (push) Has been cancelled
Linux Release / release (push) Has been cancelled
macOS Release / release (push) Has been cancelled
Windows Release / release (push) Has been cancelled

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

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")