mirror of
https://github.com/aljazceru/chatgpt-telegram-bot.git
synced 2025-12-21 22:54:52 +01:00
fix
This commit is contained in:
@@ -13,9 +13,9 @@ class DeeplTranslatePlugin(Plugin):
|
||||
|
||||
def __init__(self):
|
||||
deepl_api_key = os.getenv('DEEPL_API_KEY')
|
||||
deepl_api_pro = os.getenv('DEEPL_API_PRO').lower() == 'true'
|
||||
if not deepl_api_key or not deepl_api_pro:
|
||||
raise ValueError('DEEPL_API_KEY and DEEPL_API_PRO environment variable must be set to use DeepL Plugin')
|
||||
deepl_api_pro = os.getenv('DEEPL_API_PRO', 'false').lower() == 'true'
|
||||
if not deepl_api_key:
|
||||
raise ValueError('DEEPL_API_KEY environment variable must be set to use DeepL Plugin')
|
||||
self.api_key = deepl_api_key
|
||||
self.api_pro = deepl_api_pro
|
||||
|
||||
|
||||
Reference in New Issue
Block a user