Explorar el Código

fix: gemini response json schema

Alex Liu hace 10 meses
padre
commit
0d456df588
Se han modificado 1 ficheros con 1 adiciones y 0 borrados
  1. 1 0
      relay/channel/gemini/relay-gemini.go

+ 1 - 0
relay/channel/gemini/relay-gemini.go

@@ -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