From f8284d6073d1735b4cd1cd99d7cb953e72abb96e Mon Sep 17 00:00:00 2001 From: "enganese (aka Ulxn)" <69082498+enganese@users.noreply.github.com> Date: Mon, 22 May 2023 11:46:01 +0500 Subject: [PATCH] Update __init__.py Added: `request.encoding = request.apparent_encoding # <--- Fix is here` Fixed: - Cyrllic response text encoding --- gpt4free/usesless/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/gpt4free/usesless/__init__.py b/gpt4free/usesless/__init__.py index 7c61936e..9efc410f 100644 --- a/gpt4free/usesless/__init__.py +++ b/gpt4free/usesless/__init__.py @@ -117,6 +117,7 @@ class Completion: url = "https://ai.usesless.com/api/chat-process" request = requests.post(url, headers=headers, json=json_data) + request.encoding = request.apparent_encoding content = request.content response = Completion.__response_to_json(content)