OwO-Network/DeepLX

关于 DeeplX 返回 no response 和 Docker 设置时区的问题

rockbenben opened this issue · 7 comments

DeeplX 接口问题

我在开源 JSON 翻译工具中集成了 DeeplX 接口,但在内置的 AUTHKEY 用完之后,接口经常会返回 “no response”,导致翻译结果变为 null。

请问这是否意味着 DeeplX 不能同时处理多个请求?是否有办法通过添加延时来解决这个问题?或者说 no response 是不是其他原因引起的。

下面是相隔20秒收到的不同反馈:

  • 正常翻译情况:正常翻译
  • 出现 no response 的情况:no response

Docker 设置时区问题

另外,我在 Docker 中尝试设置时区(TZ=Asia/Shanghai),但似乎不起作用,时间显示依然是 GMT。有什么建议能解决这个问题吗?

测试工具链接:https://tools.newzone.top/json-translate

Are you using the free version or have you used the official Key?

Also, I would like to know what is the requirement for this time zone?

I added an official key, but it allows for a maximum usage of 500,000 characters. I believe I misunderstood earlier; when the DeepLX AUTHKEY reaches its limit, it doesn't switch to free mode, but continues to operate with an invalid authkey, hence the null response?

The time zone setting is mainly for convenience in monitoring status. I assumed it was a common environmental setting for Docker and thought I had configured it incorrectly. It's not a concern if there's no support plan available.

Yes, as you said, the free version will automatically switch to the paid version if a 429 error occurs. In other words, if the free version is available, it will not waste your 500,000 characters. Therefore, there is no need to switch back to the free version after using up the 500,000 characters because each request will prioritize using the free version once.

Additionally, if 500,000 characters are not enough for you, you can add multiple AUTHKEYs separated by commas in English.

Although the second screenshot shows a 200 status, it still returns a null response. Could this be because my authkey reached its limit, coinciding with a 429 error, and DeepLX continues to send requests using this authkey?

I had prepared only one authkey, which was exhausted in less than a day. I am considering removing the authkey altogether. Would this potentially improve the performance of DeepLX?

Although the second screenshot shows a 200 status, it still returns a null response. Could this be because my authkey reached its limit, coinciding with a 429 error, and DeepLX continues to send requests using this authkey?

I had prepared only one authkey, which was exhausted in less than a day. I am considering removing the authkey altogether. Would this potentially improve the performance of DeepLX?

The situation you encountered is reasonable. Because multiple requests triggered a 429 error, the fallback solution was to use authkey. However, the 500,000 characters of authkey were used up, so it returned a 200 status code. Of course, from a programming perspective, it should not be 200. I think I should modify the code. If you completely delete authkey, then after triggering a 429 error, you will not receive any content. And triggering a 429 error is very easy.

Ok. I will temporarily remove the authkey.

Can a delay setting be added? This way, if a 429 error occurs due to too many requests, we can wait a while?

Sorry, from a program development and API design point of view, I don't think the delay should be added because the API is not designed in a way that guarantees that every request will be successful, and the delay needs to be placed in between each request by the user.