diff --git a/anthropic_telegram_inference_bot.py b/anthropic_telegram_inference_bot.py index 2c39863..e061c1d 100644 --- a/anthropic_telegram_inference_bot.py +++ b/anthropic_telegram_inference_bot.py @@ -4,6 +4,7 @@ import logging from anthropic import Anthropic from base_telegram_inference_bot import BaseTelegramInferenceBot from telegram_helper import TelegramHelper +from browse_command import browse_command, button_callback class AnthropicTelegramInferenceBot(BaseTelegramInferenceBot): def __init__(self): @@ -101,9 +102,19 @@ class AnthropicTelegramInferenceBot(BaseTelegramInferenceBot): else: return "No active processing to abort." + async def browse(self, update, context): + await browse_command(update, context) + def main(): bot = AnthropicTelegramInferenceBot() telegram_helper = TelegramHelper(bot) + + # Add the /browse command handler + telegram_helper.add_command_handler('browse', bot.browse) + + # Add the button callback handler + telegram_helper.add_callback_query_handler(button_callback) + telegram_helper.run() if __name__ == '__main__':