Update __init__.py

Added:
`request.encoding = request.apparent_encoding # <--- Fix is here`


Fixed:
 - Cyrllic response text encoding
This commit is contained in:
enganese (aka Ulxn) 2023-05-22 11:46:01 +05:00 committed by GitHub
parent 9b6848766d
commit f8284d6073
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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)