Closed mufeedali closed 2 years ago
The changes that were needed to the existing system are basically three:
get_response
so that the bytes object is returned as is.create_message
.So... what's left is error handling, which is just hell in the case of gtrans...
So... what's left is error handling, which is just hell in the case of gtrans...
It doesn't even error out in the case of wrong language codes, it just defaults to English instead...
The character limit for this API is really odd: 2332. Tested multiple times on my end to confirm but seems so.
When it does fail entirely (like when exceeding character limits), it gives gibberish output too.
Honestly, I'm at a complete loss about why this doesn't work. Unless I'm missing something, it looks like it should be working but it doesn't for some reason. Google sees the request as a bad request but the equivalent code written with httpx works just fine.
Fixes #234