diff --git a/src/main/java/eu/m724/Main.java b/src/main/java/eu/m724/Main.java index 7e2af7b..1ab3341 100644 --- a/src/main/java/eu/m724/Main.java +++ b/src/main/java/eu/m724/Main.java @@ -130,11 +130,21 @@ public class Main { case "sys": case "s": if (parts.length == 1) { - System.out.printf("System prompt:\n\033[1m%s\033[0m\n", chat.systemPrompt); + if (chat.systemPrompt != null) { + System.out.printf("System prompt:\n\033[1m%s\033[0m\n\n", chat.systemPrompt); + System.out.println("Set to \033[1mnull\033[0m to remove"); + } else { + System.out.println("No system prompt"); + } } else { System.out.printf("Previous system prompt:\n%s\n\n", chat.systemPrompt); - chat.systemPrompt = prompt.substring(parts[0].length() + 2).replace("\\n", "\n"); - System.out.printf("New system prompt:\n\033[1m%s\033[0m\n", chat.systemPrompt); + if (parts[1].equals("null")) { + chat.systemPrompt = null; + System.out.println("System prompt removed"); + } else { + chat.systemPrompt = prompt.substring(parts[0].length() + 2).replace("\\n", "\n"); + System.out.printf("New system prompt:\n\033[1m%s\033[0m\n", chat.systemPrompt); + } } break; default: