This commit is contained in:
Minecon724 2024-08-31 17:38:52 +02:00
parent 63201d9888
commit 0f59b4d09c
Signed by: Minecon724
GPG key ID: 3CCC4D267742C8E8

View file

@ -130,12 +130,22 @@ public class Main {
case "sys": case "sys":
case "s": case "s":
if (parts.length == 1) { 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 { } else {
System.out.printf("Previous system prompt:\n%s\n\n", chat.systemPrompt); System.out.printf("Previous system prompt:\n%s\n\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"); 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); System.out.printf("New system prompt:\n\033[1m%s\033[0m\n", chat.systemPrompt);
} }
}
break; break;
default: default:
System.out.println("Invalid command: \033[1m" + parts[0] + "\033[0m"); System.out.println("Invalid command: \033[1m" + parts[0] + "\033[0m");