Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: 精确翻译PDF论文插件里yield from update_ui(chatbot, history)不起作用,这是为什么 #1988

Closed
Katherine-Kwok-001 opened this issue Sep 27, 2024 · 2 comments

Comments

@Katherine-Kwok-001
Copy link

Katherine-Kwok-001 commented Sep 27, 2024

Installation Method | 安装方法与平台

Pip Install (I used latest requirements.txt)

Version | 版本

Latest | 最新版

OS | 操作系统

Windows

Describe the bug | 简述

在上传PDF文件后,点击精确翻译PDF论文插件,后台看日志一直卡在gpt_academic\crazy_functions\pdf_fns\parse_pdf_grobid.py文件里的解析PDF_基于GROBID函数,执行完for循环里的第一个chatbot.append后,后面遇到的第二个chatbot.append就会卡住,在toolbox.py的update_ui里加日志,能看见update_ui正常执行,但是前端无响应不显示,在第二句chatbot.append之后的任何语句都无法继续执行。如下两图:
05b8fb0f-9b56-424e-86e2-f25fdb020009
image
假设我在解析PDF_基于GROBID函数函数里的这两个位置加chatbot.append,绿框位置前端能正常显示,红框不能显示,并且,执行到红框chatbot.append部分,后面的任何语句都无法继续执行。如下两图:
image
image

Screen Shot | 有帮助的截图

Terminal Traceback & Material to Help Reproduce Bugs | 终端traceback(如有) + 帮助我们复现的测试材料样本(如有)

No response

@Katherine-Kwok-001 Katherine-Kwok-001 changed the title [Bug]: 精确翻译PDF论文插件功能一直卡在chatbot.append,这是为什么 [Bug]: 精确翻译PDF论文插件里yield from update_ui(chatbot, history)不起作用,这是为什么 Sep 27, 2024
@Katherine-Kwok-001
Copy link
Author

找到原因了:通过模拟网络延时,发现前端chatbot消息框能接受的最大时长是4s,如果延时5s,则前端超时不响应显示。但是设置timeout的具体位置还未找到。

@Katherine-Kwok-001
Copy link
Author

Katherine-Kwok-001 commented Oct 15, 2024

image
更新到最新代码后,问题解决了!给作者点赞👍👍👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant