mirror of
https://github.com/father-bot/chatgpt_telegram_bot.git
synced 2026-06-13 03:54:57 +03:00
Add /mode to help
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user