mirror of
https://github.com/aljazceru/chatgpt-telegram-bot.git
synced 2025-12-22 15:14:54 +01:00
align with the behavior of other variables
This commit is contained in:
@@ -49,6 +49,7 @@ def main():
|
||||
'frequency_penalty': float(os.environ.get('FREQUENCY_PENALTY', 0.0)),
|
||||
'bot_language': os.environ.get('BOT_LANGUAGE', 'en'),
|
||||
'show_plugins_used': os.environ.get('SHOW_PLUGINS_USED', 'false').lower() == 'true',
|
||||
'whisper_prompt': os.environ.get('WHISPER_PROMPT', ''),
|
||||
}
|
||||
|
||||
if openai_config['enable_functions'] and not functions_available:
|
||||
|
||||
@@ -341,7 +341,7 @@ class OpenAIHelper:
|
||||
"""
|
||||
try:
|
||||
with open(filename, "rb") as audio:
|
||||
prompt_text = os.environ.get('WHISPER_PROMPT', '')
|
||||
prompt_text = self.config['whisper_prompt']
|
||||
result = await openai.Audio.atranscribe("whisper-1", audio, prompt=prompt_text)
|
||||
return result.text
|
||||
except Exception as e:
|
||||
|
||||
Reference in New Issue
Block a user