@@ -87,32 +87,6 @@ async def newchat_command(update: Update, context: ContextTypes.DEFAULT_TYPE) ->
87
87
await init_msg .edit_text ("New chat session started." )
88
88
89
89
90
-
91
- async def help_command (update : Update , _ : ContextTypes .DEFAULT_TYPE ) -> None :
92
- """Send a message when the command /help is issued."""
93
- help_text = """
94
- Basic commands:
95
- /start - Start the bot
96
- /help - Get help. Shows this message
97
-
98
- Chat commands:
99
- /new - Start a new chat session (model will forget previously generated messages)
100
-
101
- Send a message to the bot to generate a response.
102
- """
103
- await update .message .reply_text (help_text )
104
-
105
-
106
- async def newchat_command (update : Update , context : ContextTypes .DEFAULT_TYPE ) -> None :
107
- """Start a new chat session."""
108
- init_msg = await update .message .reply_text (
109
- text = "Starting new chat session..." ,
110
- reply_to_message_id = update .message .message_id ,
111
- )
112
- new_chat (context )
113
- await init_msg .edit_text ("New chat session started." )
114
-
115
-
116
90
# Define the function that will handle incoming messages
117
91
async def handle_message (update : Update , context : ContextTypes .DEFAULT_TYPE ) -> None :
118
92
"""Handles incoming text messages from users.
@@ -252,4 +226,3 @@ async def handle_image(update: Update, _: ContextTypes.DEFAULT_TYPE) -> None:
252
226
reply_to_message_id = init_msg .message_id ,
253
227
disable_web_page_preview = True ,
254
228
)
255
- await asyncio .sleep (0.1 )
0 commit comments