mirror of
https://gitee.com/wanwujie/sub2api
synced 2026-05-03 04:40:45 +08:00
fix: 移除 Gemini 不支持的 patternProperties 字段 #795
This commit is contained in:
@@ -3235,7 +3235,7 @@ func cleanToolSchema(schema any) any {
|
|||||||
for key, value := range v {
|
for key, value := range v {
|
||||||
// 跳过不支持的字段
|
// 跳过不支持的字段
|
||||||
if key == "$schema" || key == "$id" || key == "$ref" ||
|
if key == "$schema" || key == "$id" || key == "$ref" ||
|
||||||
key == "additionalProperties" || key == "minLength" ||
|
key == "additionalProperties" || key == "patternProperties" || key == "minLength" ||
|
||||||
key == "maxLength" || key == "minItems" || key == "maxItems" {
|
key == "maxLength" || key == "minItems" || key == "maxItems" {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user