mololab / json-translator

jsontt 💡 - AI JSON Translator with GPT + other FREE translation modules to translate your json/yaml files into other languages ✅ Check Readme ✌ Supports GPT / DeepL / Google / Bing / Libre / Argos
https://mololab.org/jsontt/npm
MIT License
494 stars 71 forks source link

Rate Limiting #45

Closed bitbytebit1 closed 11 months ago

bitbytebit1 commented 1 year ago

First I want to say you've done amazing work with the README/CLI/API. Really impressive stuff! Well documented, great code and fantastic features.

However there's some shortcomings.

When using the CLI it's pretty easy to get rate limited. blocked. I wasn't aware of this as it wasn't mentioned on the README. I tried to translate a faulty file, got rate limited and subsequently couldn't continue to use this amazing tool without finding a proxy list or VPN. Even after finding a working VPN I wasn't able to fully translate my file without hitting the rate limit leaving me with an incomplete JSON and not much in the way of options.

I'm wondering if it's possible to circumvent getting rate limited by adding a delay in between requests? You could add a delay parameter that would accept milliseconds. I don't mind waiting longer for my translations if it means I don't have to mess around with finding proxy lists/vpns.

Example:

jsontt en.json -T google -f en -t es --delay 500

What are your thoughts about this?

ParvinEyvazov commented 11 months ago

Hello, thank you for your comment @bitbytebit1 .

Somehow missed this issue. Sorry for late response.

Is it same with this issue? (assigning "--", which happens when you hit rate-limit) https://github.com/mololab/json-translator/issues/31

ParvinEyvazov commented 11 months ago

Hello @bitbytebit1, now you can set max concurrency limit by putting -cl 3 or -cl 100 option on CLI in jsontt v.2.0.0.

Thank you for the suggestion.