Skip to content

Handling of the request size #5

Description

@emartynov

Hi people,

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.

Activity

  1. JanEbbing commented on Feb 21, 2023

    @JanEbbing
    Contributor

    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?

  2. emartynov commented on Feb 22, 2023

    @emartynov
    Author

    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.

  3. JanEbbing commented on Apr 25, 2023

    @JanEbbing
    Contributor

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions