bestony / ChatGPT-Feishu

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

有的问题无法返回内容,稳定重现 #64

Open hillerliao opened 1 year ago

hillerliao commented 1 year ago

问: 我是学习计算机科学与技术的一名大学学生,随着科技智能的发展,很多工作岗位都会被取代,我想问一下关于我这一个学科将来的就业发展方向,请按照推荐优先级罗列30条较低被智能取代可能的就业方向,并简要介绍(可以多产生几次答案嘛)

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)
supermikol commented 1 year ago

现在访问openai回来的结果都是timeout。 That's causing this error.

vixiaoan commented 1 year ago

我也遇到这个问题,ChatGpt给出的修复建议:( image

vixiaoan commented 1 year ago

我估计这个问题是网络环境造成的,这样修改也只能是在前端给出错误提示而已,不能从根本上解决问题。

RidiculousDoge commented 1 year ago

查了日志貌似是一次200一次500

11:48:07.144 [POST] https://47seu5v745.hk.aircode.run/hello -> hello.js
11:48:07.152 [CF] skip repeat event
11:48:07.152 [RESPONSE] Status code: 200, Duration: 8 ms
11:48:38.396 TypeError: Cannot read properties of undefined (reading 'data')    at getOpenAIReply (/code/functions/hello.js:174:24)    
at runNextTicks (node:internal/process/task_queues:61:5)    
at listOnTimeout (node:internal/timers:528:9)    
at processTimers (node:internal/timers:502:7)    
at async handleReply (/code/functions/hello.js:326:24)    
at async module.exports (/code/functions/hello.js:395:14)
11:48:38.397 [RESPONSE] Status code: 500, Duration: 50490 ms
bestony commented 1 year ago

看起来是超过了 50s 导致的报错。

rhymecc commented 1 year ago

目测,调了timeout时间是恢复了。