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
Currently, it appears like gl_translate attempts to send everything in one call, and failing that, makes one call per vector element. In my use case, that results in 20,000 calls of 100 characters each, all with their own status message ... not ideal, and probably slower than a few larger calls.
Would it make sense to instead attempt to split the request into (e.g.) 2, then 4, then 8 buckets? Id' be happy to propose an alternative to the current line Reduce(rbind, lapply(t_string, gl_translate, format = format, target = target, source = source, model = model)) if something like that would seem useful?
The text was updated successfully, but these errors were encountered:
Yes any optimisation you can do will be appreciated. Is there some control by doing some text processing before the API call? Even if its just a helper function to split into bigger batches or something.
There is also probably a concurrency feature, so sending multiple API calls at once may be possioble - this is an approach I've looked at in googleCloudRunner
Ok, I will think about larger batches - apparently, up to 5k characters at a time are recommended - so that would already go a long way, at least in my use case (translating titles of journal articles).
Currently, it appears like gl_translate attempts to send everything in one call, and failing that, makes one call per vector element. In my use case, that results in 20,000 calls of 100 characters each, all with their own status message ... not ideal, and probably slower than a few larger calls.
Would it make sense to instead attempt to split the request into (e.g.) 2, then 4, then 8 buckets? Id' be happy to propose an alternative to the current line
Reduce(rbind, lapply(t_string, gl_translate, format = format, target = target, source = source, model = model))
if something like that would seem useful?The text was updated successfully, but these errors were encountered: