mirror of
https://github.com/aljazceru/chatgpt-telegram-bot.git
synced 2025-12-20 14:14:52 +01:00
removed billing apis call - fix #385
This commit is contained in:
@@ -128,12 +128,13 @@ class ChatGPTTelegramBot:
|
||||
f"{localized_text(budget_period, bot_language)}: "
|
||||
f"${remaining_budget:.2f}.\n"
|
||||
)
|
||||
# No longer works as of July 21st 2023, as OpenAI has removed the billing API
|
||||
# add OpenAI account information for admin request
|
||||
if is_admin(self.config, user_id):
|
||||
text_budget += (
|
||||
f"{localized_text('stats_openai', bot_language)}"
|
||||
f"{self.openai.get_billing_current_month():.2f}"
|
||||
)
|
||||
# if is_admin(self.config, user_id):
|
||||
# text_budget += (
|
||||
# f"{localized_text('stats_openai', bot_language)}"
|
||||
# f"{self.openai.get_billing_current_month():.2f}"
|
||||
# )
|
||||
|
||||
usage_text = text_current_conversation + text_today + text_month + text_budget
|
||||
await update.message.reply_text(usage_text, parse_mode=constants.ParseMode.MARKDOWN)
|
||||
|
||||
Reference in New Issue
Block a user