mirror of
https://github.com/aljazceru/chatgpt-telegram-bot.git
synced 2025-12-23 23:55:05 +01:00
fix n_choices default value, fix cost dollar formating
This commit is contained in:
2
main.py
2
main.py
@@ -33,7 +33,7 @@ def main():
|
||||
'max_conversation_age_minutes': int(os.environ.get('MAX_CONVERSATION_AGE_MINUTES', 180)),
|
||||
'assistant_prompt': os.environ.get('ASSISTANT_PROMPT', 'You are a helpful assistant.'),
|
||||
'max_tokens': int(os.environ.get('MAX_TOKENS', 1200)),
|
||||
'n_choices': int(os.environ.get('N_CHOICES', 1200)),
|
||||
'n_choices': int(os.environ.get('N_CHOICES', 1)),
|
||||
'temperature': float(os.environ.get('TEMPERATURE', 1.0)),
|
||||
'image_size': os.environ.get('IMAGE_SIZE', '512x512'),
|
||||
|
||||
|
||||
@@ -73,13 +73,13 @@ class ChatGPT3TelegramBot:
|
||||
f"{tokens_today} chat tokens used.\n"+\
|
||||
f"{images_today} images generated.\n"+\
|
||||
f"{transcribe_durations[0]} minutes and {transcribe_durations[1]} seconds transcribed.\n"+\
|
||||
f"💰 For a total amount of ${cost_today}.\n"+\
|
||||
f"💰 For a total amount of ${cost_today:.2f}\n"+\
|
||||
f"\n----------------------------\n\n"+\
|
||||
f"This month:\n"+\
|
||||
f"{tokens_month} chat tokens used.\n"+\
|
||||
f"{images_month} images generated.\n"+\
|
||||
f"{transcribe_durations[2]} minutes and {transcribe_durations[3]} seconds transcribed.\n"+\
|
||||
f"💰 For a total amount of ${cost_month}."
|
||||
f"💰 For a total amount of ${cost_month:.2f}"
|
||||
await update.message.reply_text(usage_text)
|
||||
|
||||
async def reset(self, update: Update, context: ContextTypes.DEFAULT_TYPE):
|
||||
|
||||
Reference in New Issue
Block a user