[binary-husky/gpt_academic][Bug]: 精准翻译pdf插件 报错 由于提问含不合规内容被Azure过滤

2023-12-18 495 views
2
Installation Method | 安装方法与平台

Pip Install (I used latest requirements.txt)

Version | 版本

Latest | 最新版

OS | 操作系统

Windows

Describe the bug | 简述

模型使用azure openai gpt35 academic版本 :3.55 插件:精准翻译pdf插件 每篇文章一开始都会报错,情况如下,之前版本未出现此问题 重试后有可能不报错

Screen Shot | 有帮助的截图

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

Traceback (most recent call last): File ".\crazy_functions\crazy_utils.py", line 81, in _req_gpt result = predict_no_ui_long_connection( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File ".\request_llm\bridge_all.py", line 492, in predict_no_ui_long_connection return method(inputs, llm_kwargs, history, sys_prompt, observe_window, console_slience)

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File ".\request_llm\bridge_chatgpt.py", line 107, in predict_no_ui_long_connection raise RuntimeError("由于提问含不合规内容被Azure过滤。") RuntimeError: 由于提问含不合规内容被Azure过滤。

测试样本 4.pdf

回答

4

打开翻译文件后部分分段提示 [Local Message] 警告,线程9在执行过程中遭遇问题, Traceback:

Traceback (most recent call last): File ".\crazy_functions\crazy_utils.py", line 209, in _req_gpt gpt_say = predict_no_ui_long_connection( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File ".\request_llm\bridge_all.py", line 492, in predict_no_ui_long_connection return method(inputs, llm_kwargs, history, sys_prompt, observe_window, console_slience) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File ".\request_llm\bridge_chatgpt.py", line 88, in predict_no_ui_long_connection raise RuntimeError("OpenAI拒绝了请求:" + error_msg) RuntimeError: OpenAI拒绝了请求:{ "statusCode": 401, "message": "Unauthorized. Access token is missing, invalid, audience is incorrect (https://cognitiveservices.azure.com), or have expired." }

5

另一个pdf翻译插件报错 Traceback (most recent call last): File ".\toolbox.py", line 150, in decorated yield from f(main_input, llm_kwargs, plugin_kwargs, chatbot_with_cookie, history, *args, **kwargs) File ".\crazy_functions\批量翻译PDF文档_NOUGAT.py", line 88, in 批量翻译PDF文档 yield from 解析PDF_基于NOUGAT(file_manifest, project_folder, llm_kwargs, plugin_kwargs, chatbot, history, system_prompt) File ".\crazy_functions\批量翻译PDF文档_NOUGAT.py", line 104, in 解析PDF_基于NOUGAT fpp = yield from nougat_handle.NOUGAT_parse_pdf(fp, chatbot, history) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File ".\crazy_functions\crazy_utils.py", line 747, in NOUGAT_parse_pdf raise RuntimeError("Nougat解析论文失败。") RuntimeError: Nougat解析论文失败。

3

3.pdf 2023-10-07-04-05-22translated_and_original.md 部分翻译出现Traceback (most recent call last): File ".\crazy_functions\crazy_utils.py", line 209, in _req_gpt gpt_say = predict_no_ui_long_connection( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File ".\request_llm\bridge_all.py", line 492, in predict_no_ui_long_connection return method(inputs, llm_kwargs, history, sys_prompt, observe_window, console_slience) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File ".\request_llm\bridge_chatgpt.py", line 88, in predict_no_ui_long_connection raise RuntimeError("OpenAI拒绝了请求:" + error_msg) RuntimeError: OpenAI拒绝了请求:{ "statusCode": 401, "message": "Unauthorized. Access token is missing, invalid, audience is incorrect (https://cognitiveservices.azure.com/), or have expired." }

3

你好 azure有一套挺烦人很敏感的过滤系统

2

Nougat 能否正常运行和网络和代理配置有关,尤其是现在huggingface被墙了。以下是我用nougat插件翻译好的,没有发现程序上的问题:

5

关键他不是完全不能,而是随机不能翻译。我用的是日本的节点,

2

好像不是这个问题,我用了日本和United States - Microsoft Corporation 两个代理做了尝试,报错代码一样 Traceback (most recent call last): File ".\toolbox.py", line 150, in decorated yield from f(main_input, llm_kwargs, plugin_kwargs, chatbot_with_cookie, history, *args, **kwargs) File ".\crazy_functions\批量翻译PDF文档_NOUGAT.py", line 88, in 批量翻译PDF文档 yield from 解析PDF_基于NOUGAT(file_manifest, project_folder, llm_kwargs, plugin_kwargs, chatbot, history, system_prompt) File ".\crazy_functions\批量翻译PDF文档_NOUGAT.py", line 104, in 解析PDF_基于NOUGAT fpp = yield from nougat_handle.NOUGAT_parse_pdf(fp, chatbot, history) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File ".\crazy_functions\crazy_utils.py", line 747, in NOUGAT_parse_pdf raise RuntimeError("Nougat解析论文失败。") RuntimeError: Nougat解析论文失败。