mirror of
https://github.com/aljazceru/chatgpt-telegram-bot.git
synced 2025-12-23 07:35:06 +01:00
add Accept-Encoding: utf-8 to header
reason for this change is avoiding to get unicode escape characters in response for non-ANSI characters potential fix for issue #541
This commit is contained in:
@@ -42,7 +42,8 @@ class DeeplTranslatePlugin(Plugin):
|
|||||||
headers = {
|
headers = {
|
||||||
"Authorization": f"DeepL-Auth-Key {self.api_key}",
|
"Authorization": f"DeepL-Auth-Key {self.api_key}",
|
||||||
"User-Agent": "chatgpt-telegram-bot",
|
"User-Agent": "chatgpt-telegram-bot",
|
||||||
"Content-Type": "application/x-www-form-urlencoded"
|
"Content-Type": "application/x-www-form-urlencoded",
|
||||||
|
"Accept-Encoding": "utf-8"
|
||||||
}
|
}
|
||||||
data = {
|
data = {
|
||||||
"text": kwargs['text'],
|
"text": kwargs['text'],
|
||||||
|
|||||||
Reference in New Issue
Block a user