Wladastic / mini_autogpt

🤖 Mini-AutoGPT: A compact, Telegram-connected AI demonstrating the capabilities of local LLMs. Autonomous and experimental Proof of Concept
27 stars 7 forks source link

set_commands() method doesn't exist in class TelegramUtils #7

Open Mozilla88 opened 2 weeks ago

Mozilla88 commented 2 weeks ago

simple_telegram.py in this method:

async def get_bot(self):
    bot_token = self.api_key
    bot = Bot(token=bot_token)
    commands = await bot.get_my_commands()
    if len(commands) == 0:
        await self.set_commands(bot)
    return bot

But set_commands() method doesn't exist in class TelegramUtils. so an error will occurr:

File "/home/dlee/work/mini_autogpt/utils/simple_telegram.py", line 173, in get_bot await self.set_commands(bot) ^^^^^^^^^^^^^^^^^ AttributeError: 'TelegramUtils' object has no attribute 'set_commands'

Wladastic commented 2 weeks ago

Did you install the correct python library for telegram? Do not install telegram but the one in requirements.txt

Mozilla88 commented 1 week ago

Did you install the correct python library for telegram? Do not install telegram but the one in requirements.txt

Yes, I installed the newest version of python-telegram-bot. python-telegram-bot 21.6

But in class TelegramUtils there has no set_commands() method, so I think this code is wrong. await self.set_commands(bot)

Wladastic commented 1 week ago

Interesting, maybe they removed it in the latest version, I just tried it and havent had an issue. Let me check the correct version and add that into requirements.txt