#2414 response='\n\n \n \n \n \n \n \n New API\n \n \n \n \n \n \n \n \n \

155.117* Posted at: 2 hours ago 👁3

response='\n\n \n \n \n \n \n \n New API\n \n \n \n \n \n \n \n \n \n\n \n You need to enable JavaScript to run this app.\n \n \n\n':Traceback (most recent call last):
File "videotrans\translator\_base.py", line 78, in run
File "videotrans\translator\_base.py", line 137, in _run_srt
File "tenacity\__init__.py", line 338, in wrapped_f
File "tenacity\__init__.py", line 477, in call
File "tenacity\__init__.py", line 378, in iter
File "tenacity\__init__.py", line 421, in exc_check
tenacity.RetryError: RetryError[]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "videotrans\util\TestSrtTrans.py", line 19, in run
File "videotrans\translator\__init__.py", line 912, in run
File "videotrans\translator\_base.py", line 81, in run
File "tenacity\__init__.py", line 480, in call
File "videotrans\translator\_localllm.py", line 66, in _item_task
RuntimeError: response='\n\n \n \n \n \n \n \n New API\n \n \n \n \n \n \n \n \n \n\n \n You need to enable JavaScript to run this app.\n \n \n\n'


=
system:Windows-10-10.0.26200-SP0
version:v3.92
frozen:True
language:zh
root_dir:D:/Download/win-pyvideotrans-v3.92

1 Replies

您在使用“兼容AI/本地模型翻译”功能时遇到了错误。错误信息显示,软件尝试访问您配置的本地大模型API地址时,收到了一个HTML网页响应(看起来像是一个名为“New API”的管理界面),而不是预期的JSON格式的API响应。

这表明您配置的 API地址不正确该地址并非一个兼容的AI模型API端点

请按以下步骤检查和修正:

  1. 确认API地址:在软件主界面,点击“翻译设置”按钮,找到“兼容AI/本地模型翻译”的设置项。
  2. 检查地址格式:确保您填写的API地址是完整的、可访问的本地或远程大模型服务的API端点。例如:

    • Ollama 的典型地址是 http://127.0.0.1:11434/v1/chat/completions
    • OpenAI兼容API(如 text-generation-webui, vLLM, LM Studio 等)的地址通常是 http://127.0.0.1:5000/v1/chat/completions 或类似格式。
  3. 验证服务状态:请确保您的大模型服务(如Ollama、LM Studio等)已经成功启动,并且正在监听您填写的地址和端口。
  4. 测试连接:您可以在浏览器中直接访问您配置的API地址(例如 http://127.0.0.1:11434/v1/chat/completions)。如果返回的是HTML页面(如您遇到的错误),则说明地址错误;如果返回类似 {"error": "..."}{"object":"list","data":[]} 的JSON,则说明地址基本正确,但可能缺少API密钥或模型参数。

核心问题:您当前配置的地址指向了一个Web管理界面,而不是AI模型的聊天补全(/chat/completions)API。请根据您实际使用的大模型服务,修正API地址。

请查看更多参考文档:

Post Your Reply
Open source and free maintenance is not easy. If this project is helpful to you, please consider making a small donation to help the project continue to maintain and update.

Donate: https://ko-fi.com/jianchang512

Trending Questions