Merge pull request #1037 from LarchLiu/main

fix: gemini response json schema
This commit is contained in:
IcedTangerine
2025-05-07 20:53:45 +08:00
committed by GitHub

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