Inverting model hierarchy: Ling primary, Qwen fallback and fixing VPSFileCleaner UI
This commit is contained in:
@@ -157,9 +157,13 @@ async def handle_voice(update: Update, context: ContextTypes.DEFAULT_TYPE):
|
||||
if audio_url:
|
||||
filename = audio_url.split("/")[-1]
|
||||
audio_path = os.path.join("/tmp", filename)
|
||||
logger.info(f"Tentando enviar voz: {audio_path}")
|
||||
if os.path.exists(audio_path):
|
||||
with open(audio_path, "rb") as audio_file:
|
||||
await context.bot.send_voice(chat_id=chat_id, voice=audio_file)
|
||||
logger.info(f"Voz enviada com sucesso: {audio_path}")
|
||||
else:
|
||||
logger.error(f"Arquivo de áudio não encontrado: {audio_path}")
|
||||
|
||||
if chat_id not in chat_histories: chat_histories[chat_id] = []
|
||||
chat_histories[chat_id].append({"user": user_text, "bot": bot_reply})
|
||||
|
||||
Reference in New Issue
Block a user