Spaces:
Paused
Paused
fix: some of the responses is fixed and
Browse files- bot_telegram.py +4 -4
- digram.io +0 -0
bot_telegram.py
CHANGED
|
@@ -45,8 +45,8 @@ class TelegramBot:
|
|
| 45 |
self.excel_url = f"{self.base_url}/api/v1/questions/excel"
|
| 46 |
|
| 47 |
# Separate executors for text and Excel
|
| 48 |
-
self.text_executor = ThreadPoolExecutor(max_workers=
|
| 49 |
-
self.excel_executor = ThreadPoolExecutor(max_workers=
|
| 50 |
|
| 51 |
# Track active processes
|
| 52 |
self.active_requests = {}
|
|
@@ -117,7 +117,7 @@ class TelegramBot:
|
|
| 117 |
# Create task for processing
|
| 118 |
asyncio.create_task(self.chat_with_ai(update, context))
|
| 119 |
else:
|
| 120 |
-
await update.message.reply_text("❌ You are not authenticated. Please enter the password
|
| 121 |
|
| 122 |
async def check_password(self, update: Update, context: CallbackContext):
|
| 123 |
"""Checks if the password is correct and authenticates the user."""
|
|
@@ -285,7 +285,7 @@ class TelegramBot:
|
|
| 285 |
|
| 286 |
async def status_command(self, update: Update, context: CallbackContext):
|
| 287 |
"""Show status of all active processes"""
|
| 288 |
-
status_message = "
|
| 289 |
|
| 290 |
# Text requests status
|
| 291 |
if self.active_requests:
|
|
|
|
| 45 |
self.excel_url = f"{self.base_url}/api/v1/questions/excel"
|
| 46 |
|
| 47 |
# Separate executors for text and Excel
|
| 48 |
+
self.text_executor = ThreadPoolExecutor(max_workers=25, thread_name_prefix="text_worker")
|
| 49 |
+
self.excel_executor = ThreadPoolExecutor(max_workers=20, thread_name_prefix="excel_worker")
|
| 50 |
|
| 51 |
# Track active processes
|
| 52 |
self.active_requests = {}
|
|
|
|
| 117 |
# Create task for processing
|
| 118 |
asyncio.create_task(self.chat_with_ai(update, context))
|
| 119 |
else:
|
| 120 |
+
await update.message.reply_text("❌ You are not authenticated. Please type /start to authenticate and then enter the password.")
|
| 121 |
|
| 122 |
async def check_password(self, update: Update, context: CallbackContext):
|
| 123 |
"""Checks if the password is correct and authenticates the user."""
|
|
|
|
| 285 |
|
| 286 |
async def status_command(self, update: Update, context: CallbackContext):
|
| 287 |
"""Show status of all active processes"""
|
| 288 |
+
status_message = "Current Status:\n\n"
|
| 289 |
|
| 290 |
# Text requests status
|
| 291 |
if self.active_requests:
|
digram.io
ADDED
|
File without changes
|