From 7d70ba7fb86844d0fa307889c6d671939db1cce4 Mon Sep 17 00:00:00 2001 From: Erich Schubert Date: Fri, 21 Jun 2024 09:14:21 +0200 Subject: [PATCH 1/2] Print help if no arguments given --- src/llamafactory/cli.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/llamafactory/cli.py b/src/llamafactory/cli.py index c7f136b3..af9dd5f5 100644 --- a/src/llamafactory/cli.py +++ b/src/llamafactory/cli.py @@ -74,7 +74,7 @@ class Command(str, Enum): def main(): - command = sys.argv.pop(1) + command = sys.argv.pop(1) if len(sys.argv) > 0 else Command.HELP if command == Command.API: run_api() elif command == Command.CHAT: From acb61f7ab719202a217d8f42850a9c3797e0c5b1 Mon Sep 17 00:00:00 2001 From: hoshi-hiyouga Date: Mon, 24 Jun 2024 23:21:10 +0800 Subject: [PATCH 2/2] Update cli.py --- src/llamafactory/cli.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/llamafactory/cli.py b/src/llamafactory/cli.py index af9dd5f5..e4846780 100644 --- a/src/llamafactory/cli.py +++ b/src/llamafactory/cli.py @@ -74,7 +74,7 @@ class Command(str, Enum): def main(): - command = sys.argv.pop(1) if len(sys.argv) > 0 else Command.HELP + command = sys.argv.pop(1) if len(sys.argv) != 1 else Command.HELP if command == Command.API: run_api() elif command == Command.CHAT: