Skip to content

Commit 35995a4

Browse files
committed
Validate the role parameter provided in name
1 parent 3291cf5 commit 35995a4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/gptcmd/cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -594,7 +594,7 @@ def do_name(self, arg):
594594
print(f"{k}: {v}")
595595
return
596596
t = arg.split()
597-
if len(t) != 2:
597+
if len(t) != 2 or not self.__class__._validate_role(t[0]):
598598
print("Usage: name <user|assistant|system> <new name>")
599599
return
600600
role = t[0]

0 commit comments

Comments
 (0)