Commit 7ecd9d05 by Alex Liu Committed by GitHub

fix: gemini response json schema

parent 46550403
...@@ -391,6 +391,7 @@ func removeAdditionalPropertiesWithDepth(schema interface{}, depth int) interfac ...@@ -391,6 +391,7 @@ func removeAdditionalPropertiesWithDepth(schema interface{}, depth int) interfac
} }
// 删除所有的title字段 // 删除所有的title字段
delete(v, "title") delete(v, "title")
delete(v, "$schema")
// 如果type不为object和array,则直接返回 // 如果type不为object和array,则直接返回
if typeVal, exists := v["type"]; !exists || (typeVal != "object" && typeVal != "array") { if typeVal, exists := v["type"]; !exists || (typeVal != "object" && typeVal != "array") {
return schema return schema
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment