diff --git a/README.md b/README.md index d9353a6..dd24d87 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,7 @@ This repo is ChatGPT re-created with GPT-3.5 LLM as Telegram Bot. **And it works - Different chat modes (👩🏼‍🎓 Assistant, 👩🏼‍💻 Code Assistant, 🎬 Movie Expert) - `/retry` command to regenerate last bot answer - Control of allowed Telegram users +- *Next up*: warn user that the size of the context is close to the maximum ## Setup 1. Get your [OpenAI API](https://openai.com/api/) key diff --git a/bot.py b/bot.py index 846b91e..2cd38b2 100644 --- a/bot.py +++ b/bot.py @@ -28,6 +28,7 @@ logger = logging.getLogger(__name__) HELP_MESSAGE = """Commands: ⚪ /retry – regenerate last bot answer ⚪ /reset – reset chat context +⚪ /mode – select chat mode ⚪ /help – show help """ @@ -81,7 +82,7 @@ async def message_handle(update: Update, context: CallbackContext, message=None, error_text = f"Something went wrong during completion. Reason: {e}" logger.error(error_text) await update.message.reply_text(error_text) - + async def reset_handle(update: Update, context: CallbackContext): utils.init_user(update, context)