You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've played a bit with the library and found a couple of inconveniences.
The obvious - if you pass a big text to translate, it is impossible to guess when you will get an error response that the size of the request is over the limit. I know it is 128k but the headers and other data are probably included in the calculation. As the client, I need help determining when to split the data.
Hi @emartynov , we don't have a good solution for this yet unfortunately, we are thinking about a good interface for this.
Until we release that, does it work for you to reserve a few K for the headers and send at most 128K-<estimated_header_size> of text?
That is the way we currently recommend. 120k text size should be fine in our experience - it's hard to give an estimate of header sizes on our end due to proxys etc.
Activity
JanEbbing commentedon Feb 21, 2023
Hi @emartynov , we don't have a good solution for this yet unfortunately, we are thinking about a good interface for this.
Until we release that, does it work for you to reserve a few K for the headers and send at most 128K-<estimated_header_size> of text?
emartynov commentedon Feb 22, 2023
Is there a way to estimate header section size? Do you also wrap data in some other format in the body of the request?
As for now, I just set that string for the translation should not to be more than 100K.
JanEbbing commentedon Apr 25, 2023
That is the way we currently recommend. 120k text size should be fine in our experience - it's hard to give an estimate of header sizes on our end due to proxys etc.