do this
This commit is contained in:
parent
63201d9888
commit
0f59b4d09c
1 changed files with 13 additions and 3 deletions
|
@ -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");
|
||||||
|
|
Loading…
Reference in a new issue