binary-husky / binary-husky/gpt_academic
[Bug]: Markdown翻译(指定翻译成何种语言)无法处理比较长的文章
- Dominant language
- Python
- Stars
- 71.3k
- Forks
- 8.3k
- PR merge metrics
- No merged PRs in 30d
Description
### Installation Method | 安装方法与平台
Pip Install (I used latest requirements.txt)
### Version | 版本
Latest | 最新版
### OS | 操作系统
Linux
### Describe the bug | 简述
正常上传一篇比较长的文档时,会出现报错
Traceback (most recent call last):
File "./toolbox.py", line 235, in decorated
yield from f(main_input, llm_kwargs, plugin_kwargs, chatbot_with_cookie, history, *args, **kwargs)
File "./crazy_functions/Markdown_Translate.py", line 264, in Markdown翻译指定语言
yield from 多文件翻译(file_manifest, project_folder, llm_kwargs, plugin_kwargs, chatbot, history, system_prompt, language=language)
File "./crazy_functions/Markdown_Translate.py", line 68, in 多文件翻译
pfg.run_file_split(max_token_limit=1024)
File "./crazy_functions/Markdown_Translate.py", line 33, in run_file_split
segments = breakdown_text_to_satisfy_token_limit(file_content, max_token_limit)
File "./crazy_functions/ipc_fns/mp.py", line 26, in wrapper
raise TimeoutError(f'功能单元{str(func)}未能在规定时间内完成任务')
TimeoutError: 功能单元未能在规定时间内完成任务
### Screen Shot | 有帮助的截图
### Terminal Traceback & Material to Help Reproduce Bugs | 终端traceback(如有) + 帮助我们复现的测试材料样本(如有)
_No response_
Contributor guide
No contributing guide indexed for this repository
Research direction
Start at crazy_functions/Markdown_Translate.py, following Markdown翻译指定语言 through 多文件翻译 and run_file_split, then inspect crazy_functions/ipc_fns/mp.py and breakdown_text_to_satisfy_token_limit. Reproduce with a long Markdown document and trace the timeout boundary; done means long-document translation no longer raises this TimeoutError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100