stop using a boolean, as it seems to confuse chatgpt
This commit is contained in:
parent
ab709d646e
commit
3248f8c180
56
saturn.py
56
saturn.py
|
@ -1,11 +1,9 @@
|
|||
Saturn mode is not enabled
|
||||
|
||||
Assistant class definition:
|
||||
display_message(message):
|
||||
If Saturn mode is enabled:
|
||||
If mode is "saturn":
|
||||
Print "🪐: " + concise_response(message) # Display concise response in Saturn mode
|
||||
If Saturn mode is disabled:
|
||||
Print "💬: " + response(message) # Display regular response for all messages not in Saturn mode
|
||||
Else:
|
||||
Print "💬: " + response(message) # Display regular response for all messages in normal mode
|
||||
|
||||
status_message(message):
|
||||
Print "#: " + message
|
||||
|
@ -14,28 +12,23 @@ Assistant class definition:
|
|||
Call display_message(message)
|
||||
|
||||
Create an instance of Assistant called assistant
|
||||
Set mode to "normal"
|
||||
|
||||
# Toggle Saturn mode on/off
|
||||
define toggle_saturn_mode:
|
||||
If Saturn mode is enabled:
|
||||
Disable Saturn mode
|
||||
Set mode_status to "disabled"
|
||||
# Toggle mode between "normal" and "saturn"
|
||||
define toggle_mode:
|
||||
If mode is "normal":
|
||||
Set mode to "saturn"
|
||||
Else:
|
||||
Enable Saturn mode
|
||||
Set mode_status to "enabled"
|
||||
Call status_message("Saturn mode is now " + mode_status)
|
||||
Set mode to "normal"
|
||||
Call status_message("Mode is now " + mode)
|
||||
|
||||
# Check if Saturn mode is enabled or disabled
|
||||
define check_saturn_mode_status:
|
||||
If Saturn mode is enabled:
|
||||
Set mode_status to "enabled"
|
||||
Else:
|
||||
Set mode_status to "disabled"
|
||||
Call status_message("Saturn mode is currently " + mode_status)
|
||||
# Check the current mode
|
||||
define check_mode_status:
|
||||
Call status_message("Current mode is " + mode)
|
||||
|
||||
# Handle user actions with optional prefix
|
||||
define handle_action with action:
|
||||
If Saturn mode is enabled:
|
||||
If mode is "saturn":
|
||||
Set prefix to "/me "
|
||||
Else:
|
||||
Set prefix to nothing
|
||||
|
@ -46,22 +39,19 @@ display_help_information:
|
|||
Set help_message to a multi-line string explaining available commands
|
||||
Call display_message(help_message)
|
||||
|
||||
|
||||
# All input recieved should be handles by this function
|
||||
# All input received should be handled by this function
|
||||
Process user input:
|
||||
Read user_input
|
||||
If user_input starts with "/me":
|
||||
Call handle_action(action)
|
||||
Else if user_input starts with "saturn":
|
||||
If user_input is "saturn check":
|
||||
Call check_saturn_mode_status() # Call the check_saturn_mode_status function
|
||||
Else if user_input is "saturn switch":
|
||||
Call toggle_saturn_mode() # Call the toggle_saturn_mode function
|
||||
Else if user_input is "saturn help":
|
||||
Else if user_input starts with "mode":
|
||||
If user_input is "mode check":
|
||||
Call check_mode_status() # Call the check_mode_status function
|
||||
Else if user_input is "mode switch":
|
||||
Call toggle_mode() # Call the toggle_mode function
|
||||
Else if user_input is "mode help":
|
||||
Call display_help_information() # Call the display_help_information function
|
||||
Else:
|
||||
Call assistant.reply(user_input)
|
||||
Else:
|
||||
Call assistant.reply(user_input)
|
||||
|
||||
hiya
|
||||
Else:
|
||||
Call assistant.reply(user_input)
|
||||
|
|
Loading…
Reference in a new issue