diff --git a/telegram_inference_bot.py b/telegram_inference_bot.py index b1ef7fe..43b42ee 100644 --- a/telegram_inference_bot.py +++ b/telegram_inference_bot.py @@ -129,7 +129,43 @@ async def switch_providers(update: Update, context: ContextTypes.DEFAULT_TYPE) - await update.message.reply_text(f"Switched to {new_provider_name} provider") async def status(update: Update, context: ContextTypes.DEFAULT_TYPE) -> None: - await update.message.reply_text(f"Currently using {ai_provider.__class__.__name__}: {ai_provider.get_model()}") + global ai_provider, conversation_history, tools + + provider_name = ai_provider.__class__.__name__ + model = ai_provider.get_model() + + total_conversations = sum(len(history) for history in conversation_history.values()) + active_users = len(conversation_history) + + available_tools = [tool.__class__.__name__ for tool in tools] + + status_message = f""" +🤖 Bot Status Report 🤖 + +AI Provider: {provider_name} +Current Model: {model} + +📊 Usage Statistics: +• Total Conversations: {total_conversations} +• Active Users: {active_users} + +🛠 Available Tools ({len(available_tools)}): +{', '.join(available_tools)} + +💡 Commands: +• /start - Start the bot +• /clear - Clear conversation history +• /switch - Switch AI model (OpenAI only) +• /toggle - Toggle between AI providers +• /status - Show this status report + +🔧 System Info: +• Python version: {os.sys.version.split()[0]} +• Telegram Bot API version: {Application.VERSION} +""" + + logging.info("Status command executed") + await update.message.reply_text(status_message) def main() -> None: # Create the Application and pass it your bot's token