云对象,集成了openai,本地调试没有问题,微信小程序报错:
const { Configuration, OpenAIApi } = require("openai");
请求入参: {
"args": {
"method": "sendMessage",
"params": [
{
"ask": "哄哄她的俏皮话语 女朋友 中文",
"maxTokens": 300
}
],
"clientInfo": {
"PLATFORM": "mp-weixin",
"OS": "ios",
"APPID": "",
"DEVICEID": "1676508767904179560",
"scene": 1001,
"windowWidth": 428,
"windowHeight": 823,
"deviceOrientation": "portrait",
"screenWidth": 428,
"screenHeight": 926,
"benchmarkLevel": 1,
"batteryLevel": 100,
"statusBarHeight": 59,
"bluetoothEnabled": true,
"locationEnabled": true,
"wifiEnabled": true,
"cameraAuthorized": true,
"locationAuthorized": true,
"microphoneAuthorized": true,
"notificationAuthorized": true,
"safeArea": {
"top": 59,
"left": 0,
"right": 428,
"bottom": 892,
"width": 428,
"height": 833
},
"enableDebug": false,
"devicePixelRatio": 3,
"mode": "default",
"deviceId": "1676508767904175690",
"safeAreaInsets": {
"top": 59,
"left": 0,
"right": 0,
"bottom": 34
},
"appId": "",
"appName": "天上有",
"appVersion": "1.0.0",
"appVersionCode": "100",
"appLanguage": "zh-Hans",
"uniCompileVersion": "3.7.0",
"uniRuntimeVersion": "3.7.0",
"uniPlatform": "mp-weixin",
"deviceBrand": "devtools",
"deviceModel": "iPhone 14 Pro Max",
"deviceType": "phone",
"osName": "ios",
"osVersion": "10.0.1",
"hostVersion": "8.0.5",
"hostLanguage": "zh-CN",
"hostName": "WeChat",
"hostSDKVersion": "2.30.0",
"hostFontSizeSetting": 16,
"windowTop": 0,
"windowBottom": 0,
"locale": "zh-Hans",
"LOCALE": "zh-Hans"
}
},
"requestId": "ac1cd3731676511651861197018"
}
[chatGpt/ac1cd3731676511651861197018/5ms/ERROR] Error with OpenAI API request: URL is not defined
请求响应状态: success