better order of msgs

This commit is contained in:
Anton Palgunov 2023-04-01 21:55:52 +01:00
parent 198e2bed9a
commit 93d45a7bcd
3 changed files with 3 additions and 2 deletions

View File

@ -45,3 +45,4 @@ If you find any issues or have any suggestions for improving the bot, please fee
## License
This project is licensed under the MIT License - see the `LICENSE` file for details.

0
Readme.ru.md Normal file
View File

4
bot.py
View File

@ -202,9 +202,9 @@ def handle_message(message):
# Send the response back to the user with markdown formatting
try:
ans = bot.edit_message_text(chat_id=message.chat.id, message_id=answer.message_id, text=response_text , parse_mode='Markdown')
ans = bot.edit_message_text(chat_id=message.chat.id, message_id=answer.message_id, text=f"Finish reason: {reason} \nCost: {cost}" )
# Send response text with reason and cost formated
bot.reply_to(ans, f"Finish reason: {reason} \nCost: {cost}")
bot.reply_to(ans, response_text, parse_mode='Markdown')
except Exception as e:
print(e)
bot.reply_to(message, "Что-то пошло не так c ответом. Пробую другой метод...")