Invalid JSON payload received. Unknown name "type" at tools[0].function declarat...
🚨 错误信息
Invalid JSON payload received. Unknown name "type" at
tools[0].function declarations[15].***,properties[5].***,***,properties[2].***.***.p
roperties[1].***,items': Proto field is not repeating, cannot start list. invalid JSON
payload received. Unknown name "type" at
tools[0].function declarations[15].***.properties[211.***,***.properties[2].***,***
items': Proto field is not repeating, cannot start list. Invalid JSON payload
received.Unknown name "type" at
tools[0l.function declarations[16].***.properties[5].******,properties[2].***.***.p
roperties[1].***,items': Proto field is not repeating, cannot start list. Invalid JSON
payload received. Unknown name "type" at
tools[0].function declarations[16].***.properties[211.***,***.properties[2].***.***
items': Proto field is not repeating, cannot start list
请求错误,请检查请求参数是否正确。如果修改了模型设置,请重置到默认设置
🤖 AI解决方案
错误翻译
原文:Invalid JSON payload received. Unknown name "type" at tools[0].function declarations[15...], Proto field is not repeating, cannot start list
译文:接收到无效的JSON负载。在tools[0].function declarations[15...]位置出现未知名称"type",Proto字段不可重复,无法启动列表
原因分析
这是一个函数声明JSON schema配置错误,主要问题有:- 在函数声明的schema中使用了无效的"type"字段名
- 尝试将非重复字段配置为列表格式
- JSON结构不符合proto协议要求
解决方案
检查并修正函数声明的JSON schema结构:{
"tools": [{
"function_declarations": [{
// 移除无效的"type"字段
"name": "function_name",
"description": "函数描述",
"parameters": {
"type": "OBJECT", // 这里保持标准的type定义
"properties": {
// 确保字段类型正确,数组字段需要定义为重复类型
"your_field": {
"type": "ARRAY", // 正确的数组类型定义
"items": {
"type": "STRING" // 数组元素类型
}
}
}
}
}]
}]
}
️ 预防措施
建议重置模型设置到默认配置,然后逐步重新配置函数声明。