mirror of
https://github.com/aljazceru/chatgpt-telegram-bot.git
synced 2025-12-22 23:25:41 +01:00
ensure that return string is not unicode-escaped
This commit is contained in:
@@ -49,4 +49,5 @@ class DeeplTranslatePlugin(Plugin):
|
|||||||
"text": kwargs['text'],
|
"text": kwargs['text'],
|
||||||
"target_lang": kwargs['to_language']
|
"target_lang": kwargs['to_language']
|
||||||
}
|
}
|
||||||
return requests.post(url, headers=headers, data=data).json()["translations"][0]["text"]
|
translated_text = requests.post(url, headers=headers, data=data).json()["translations"][0]["text"]
|
||||||
|
return translated_text.encode('unicode-escape').decode('unicode-escape')
|
||||||
Reference in New Issue
Block a user