bestony / ChatGPT-Feishu

给飞书准备的 ChatGPT 机器人
GNU General Public License v3.0
1.12k stars 282 forks source link

bot can't reply,ip 8.217.51.178 is denied by app setting #71

Open wonb168 opened 1 year ago

wonb168 commented 1 year ago

when I asked bot, it can't reply, and I check the log in aircode, ip 8.217.51.178 is denied by app setting, how to resolve this? thank you!

10:47:29.911
[POST] https://ze6ryzadex.hk.aircode.run/hello -> hello.js
10:47:29.985
[CF] question: how to chat with openai in feishu?
10:47:48.510
[POST] https://ze6ryzadex.hk.aircode.run/hello -> hello.js
10:47:48.518
[CF] skip repeat event
10:47:48.518
[RESPONSE] Status code: 200, Duration: 8 ms
10:48:15.529
[error]: [
  [
    {
      message: 'Request failed with status code 400',
      config: [Object],
      request: [Object],
      response: [Object]
    },
    {
      code: 99991401,
      msg: 'ip 8.217.51.178 is denied by app setting',
      error: [Object]
    }
  ]
]
10:48:15.529
[CF] send message to feishu error
10:48:15.548
[RESPONSE] Status code: 200, Duration: 45637 ms
wonb168 commented 1 year ago

机器人那设白名单,设完了出现新的错误: Cannot readproperties of undefined (reading 'data')at getOpenAIReply 完整日志:

14:39:23.077
[POST] https://ze6ryzadex.hk.aircode.run/hello -> hello.js
14:39:23.159
[CF] question: how to chat with openai in feishu?
14:39:41.629
[POST] https://ze6ryzadex.hk.aircode.run/hello -> hello.js
14:39:41.642
[CF] skip repeat event
14:39:41.642
[RESPONSE] Status code: 200, Duration: 14 ms
14:40:13.285
TypeError: Cannot read properties of undefined (reading 'data')
    at getOpenAIReply (/code/functions/hello.js:168:24)
    at async handleReply (/code/functions/hello.js:266:26)
    at async module.exports (/code/functions/hello.js:327:14)
14:40:13.286
[RESPONSE] Status code: 500, Duration: 50209 ms
bestony commented 1 year ago

点一下 debug 看一下结果?