依据文本:
https://developers.weixin.qq.com/miniprogram/dev/OpenApiDoc/wx-service-market/invokeService.html
https://fuwu.weixin.qq.com/service/detail/00080e24c842d0364e7030ae761415
小程序程序代码如下:
cloud.openapi({ convertCase: false }).serviceMarket.invokeService({
"service": 'wx16e18f189768eb81',
"api": 'ChatCompletions',
"data": { messages:[{content: "你是谁?",role: "user"}],model: "SenseChat"},
"client_msg_id": 'id123',
//async:true
})
返回数据:{data: "",
errCode: 0,
errMsg: "openapi.serviceMarket.invokeService:ok"
provider_errmsg: ""
request_id: "XXXXXXXXXXXXXXX"
}
里面的data为空字符串,没有文档显示的base_resp数据
你好,要调用查询接口查询调用结果。因接口是异步处理的,需要先提交,然后查询。 https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/service-market/api.html