400, Message: Unable to submit request because it must include at least one part...
🚨 错误信息
Invalid param: Error 400, Message: Unable to submit request because it must include at least one parts field, which describes the prompt input. Learn more: https://***.com/***/***/***/***/*** (request id: 202509121426235427553251527139), Status: , Details: []
🤖 AI解决方案
Invalid param: Error 400, Message: Unable to submit request because it must include at least one parts field, which describes the prompt input. Learn more: https://***.com/***/***/***/***/*** (request id: 202509121426235427553251527139), Status: , Details: []
中文翻译:
无效参数:错误 400,消息:无法提交请求,因为它必须包含至少一个“parts”字段,该字段描述了提示输入。
原因分析
请求缺少描述提示输入的必要字段parts。
解决方案
确保你的请求体中包含parts 字段,并提供有效的提示内容。例如:
{
"contents": [
{
"parts": [
{
"text": "你好,请告诉我DMXAPI是什么?"
}
]
}
]
}
预防措施
- 查阅API文档:在集成DMXAPI时,仔细阅读其API文档,了解所有必需的请求参数和字段结构。
- 请求体校验:在发送API请求前,对请求体进行校验,确保所有必需字段都已正确填充。