-
Notifications
You must be signed in to change notification settings - Fork 8
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
[Bug]: Getting 302 Response #24
Comments
If I'm not mistaken, the maximum text length is limited to 2500 characters. You might consider dividing the text into smaller chunks and translating them separately. I plan on implementing this in the library soon. Could you please provide more details about the text length you tried translating? |
Seems likely, the text had >7k characters. Maybe you can take inspiration from the following chunking implementation? https://github.com/BaseMax/UnlimitedAutoTranslate/blob/2aec131f0b1de9fe34c5ae9876916aef4aef698d/UnlimitedAutoTranslate.py#L5 - It seems to use a max_limit of 4500 chars |
It looks like that implementation splits the text on newlines; however, I was thinking about a more thoughtful approach in case the text doesn't have newlines. It might be possible to split also by punctuation and spaces. |
@powellnorma is this issue still present? |
Not sure, I haven't used this library in a while, and I don't have the text I used back then to test anymore, sorry. Have you tried translating a >7k character text, e.g. lorem ipsum? |
What happened?
I think maybe the text is too long?
OS / Environment
gpytranslate 1.5.1
Traceback
No response
Searched before submitting
The text was updated successfully, but these errors were encountered: