Inverting model hierarchy: Ling primary, Qwen fallback and fixing VPSFileCleaner UI

This commit is contained in:
2026-04-30 17:19:36 +00:00
parent cec191377f
commit 67db23f9c5
2 changed files with 23 additions and 7 deletions

View File

@@ -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})