kopia lustrzana https://codeberg.org/pluja/openai-telegram-bot
fix usage whisper time
rodzic
a6966cd8b2
commit
83f4597067
2
main.py
2
main.py
|
@ -128,7 +128,7 @@ async def usage(update: Update, context: ContextTypes.DEFAULT_TYPE) -> None:
|
|||
total_spent=0.0
|
||||
total_spent+=(user_info['chatgpt']/750)*0.002
|
||||
total_spent+=float(user_info['dalle'])*0.02
|
||||
total_spent+=(user_info['whisper'])*0.006
|
||||
total_spent+=(user_info['whisper']/60.0)*0.006
|
||||
info_message=f"""User: {update.effective_user.name}\n- Used {user_info["chatgpt"]} characters with ChatGPT.\n- Generated {user_info["dalle"]} images with DALL-E.\n- Transcribed {user_info["whisper"]}min with Whisper.\n\nTotal spent: ${str(total_spent)}"""
|
||||
await context.bot.send_message(chat_id=update.effective_chat.id, text=info_message)
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue