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

OpenAI翻译超时问题优化 #4593

Open
ilxqx opened this issue Oct 19, 2023 · 4 comments
Open

OpenAI翻译超时问题优化 #4593

ilxqx opened this issue Oct 19, 2023 · 4 comments
Labels
enhancement ✨ Enhancement

Comments

@ilxqx
Copy link

ilxqx commented Oct 19, 2023

需求/建议描述

使用openAI翻译时往往需要更多时间,但是插件貌似等待的时间很短,故频繁发生翻译超时的问题

建议的解决方案

建议超时时长可以在插件配置中自己设置

附加信息

No response

@ilxqx ilxqx added the feature request ✨ Feature Request label Oct 19, 2023
@YiiGuxing
Copy link
Owner

OpenAI 本身的响应就很慢,如果是普通翻译的话,插件是等待1分钟,这个时间应该足够了吧?如果不够,可以修改 IDE 的系统环境变量 idea.connection.timeout (默认 10000,单位毫秒)和 idea.read.timeout (默认 60000,单位毫秒)来修改这个时间。但如果是文档翻译,目前就很难处理了,文档翻译只给 3 秒,因为这里的操作会阻塞 UI ,3 秒已经很多了,不能再给更多了,这点还需要进行优化,但限制于平台,比较难搞,需要时间。。。

@YiiGuxing YiiGuxing changed the title 翻译超时问题 OpenAI翻译超时问题优化 Oct 19, 2023
@YiiGuxing YiiGuxing added enhancement ✨ Enhancement and removed feature request ✨ Feature Request labels Oct 19, 2023
@ilxqx
Copy link
Author

ilxqx commented Oct 19, 2023

@YiiGuxing 😁对,超时的就是文档翻译,很快就超时了,但是3秒对openAi翻译还是不够。那就后面等大佬优化吧,感谢👍🏻

@javaNewHard
Copy link

image

@YiiGuxing 大佬 长度超过限制也是优化的一部分吗

如果通过全量翻译 然后再读取缓存是否可以解决这个问题呢
image
主要是这么看界面不如直接看注释舒服

@YiiGuxing
Copy link
Owner

image

@YiiGuxing 大佬 长度超过限制也是优化的一部分吗

如果通过全量翻译 然后再读取缓存是否可以解决这个问题呢
image
主要是这么看界面不如直接看注释舒服

这个下一个版本会得到优化,限制放宽了好多,不会轻易超出限制了

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

No branches or pull requests

3 participants