gpt4free
gpt4free copied to clipboard
Update gpt4free/usesless/__init__.py
Added:
request.encoding = request.apparent_encoding
Now, code must look like this:
url = "https://ai.usesless.com/api/chat-process"
request = requests.post(url, headers=Completion.headers, json=json_data)
request.encoding = request.apparent_encoding # <--- Fix is here
content = request.content
My prompt in russian (cyrillic): Привет!
Usesless's answer WITHOUT my fix:
ÐÑивеÑ! Чем Ñ Ð¼Ð¾Ð³Ñ Ðам помоÑÑ?
Usesless's answer WITH my fix:
Привет! Чем я могу Вам помочь?
I think you should do this too for aiassist
I think you should do this too for aiassist
Thanks!
By the way, here is a new PR for aiassist/__init__.py
: https://github.com/xtekky/gpt4free/pull/595