Simplify telegram_config setter

This commit is contained in:
Ivan Milov
2023-04-21 13:44:04 +02:00
parent a919cbb71e
commit 9b8210fdf2
2 changed files with 2 additions and 2 deletions

View File

@@ -322,7 +322,7 @@ class ChatGPTTelegramBot:
self.usage["guests"].add_transcription_seconds(audio_track.duration_seconds, transcription_price)
# check if transcript starts with any of the prefixes
response_to_transcription = any(transcript.startswith(prefix) for prefix in self.config['voice_reply_prompts'])
response_to_transcription = any(transcript.startswith(prefix) if prefix else False for prefix in self.config['voice_reply_prompts'])
if self.config['voice_reply_transcript'] and not response_to_transcription: