fix: gemini response json schema

This commit is contained in:
Alex Liu
2025-05-07 18:08:56 +08:00
committed by GitHub
parent dc3b453b05
commit 0d456df588

View File

@@ -391,6 +391,7 @@ func removeAdditionalPropertiesWithDepth(schema interface{}, depth int) interfac
}
// 删除所有的title字段
delete(v, "title")
delete(v, "$schema")
// 如果type不为object和array则直接返回
if typeVal, exists := v["type"]; !exists || (typeVal != "object" && typeVal != "array") {
return schema