一直报错282008
qq170741852 发布于2022-03 浏览:1887 回复:1
0
收藏
快速回复

var log_id = time() + random(1000, 10000) + ""
var url = "https://aip.baidubce.com/rpc/2.0/unit/service/v3/chat?access_token=" + access_token;
var Body = {
'version': '3.0',
'service_id': 'S66449',
'log_id': 'UNITTEST_'+log_id,
'session_id': '555',
"bot_id":"30883",
"ref_id":"4d294_20220319123113_6701453289",

'request': {
'query': '你好',
'terminal_id': 'UNIT_DEV_'+"88888",
'query_info': {
"asr_candidates":[],"source":"KEYBOARD","type":"TEXT"},
},

 

这样写对着吗,为啥一直报错{"result":{"ref_id":"rvp82_20220319143148_4913280576"},"error_code":282008,"error_msg":"The request content type is illegal."}

收藏
点赞
0
个赞
共1条回复 最后由zf_945529781回复于2022-08
#4zf_945529781回复于2022-08

对话API3.0文档底部有示例代码和参数Demo,仔细对比看一下吧

0
TOP
切换版块