Ensure browse_command updates bot.system_prompt_path when prompt file is selected
This commit is contained in:
@@ -62,5 +62,7 @@ async def button_callback(update: Update, context: ContextTypes.DEFAULT_TYPE) ->
|
|||||||
# Handle file selection
|
# Handle file selection
|
||||||
file_path = data.split(":")[1]
|
file_path = data.split(":")[1]
|
||||||
os.environ['SYSTEM_PROMPT_PATH'] = file_path
|
os.environ['SYSTEM_PROMPT_PATH'] = file_path
|
||||||
|
if hasattr(browse_command_bot, 'system_prompt_path'):
|
||||||
|
browse_command_bot.system_prompt_path = file_path
|
||||||
browse_command_bot.system_prompt = browse_command_bot.load_system_prompt()
|
browse_command_bot.system_prompt = browse_command_bot.load_system_prompt()
|
||||||
await query.edit_message_text(f"Selected: {file_path}. System prompt updated.")
|
await query.edit_message_text(f"Selected: {file_path}. System prompt updated.")
|
||||||
Reference in New Issue
Block a user