From f6cd64a7870dafa80cc81e52ad9a8f7fe6529154 Mon Sep 17 00:00:00 2001 From: flu0r1ne Date: Fri, 5 May 2023 02:35:50 -0500 Subject: Add command to list models --- src/gpt_chat_cli/argparsing.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/gpt_chat_cli/argparsing.py') diff --git a/src/gpt_chat_cli/argparsing.py b/src/gpt_chat_cli/argparsing.py index 81a9b47..4597e84 100644 --- a/src/gpt_chat_cli/argparsing.py +++ b/src/gpt_chat_cli/argparsing.py @@ -65,6 +65,7 @@ class Arguments: completion_args: CompletionArguments display_args: DisplayArguments version: bool + list_models: bool debug_args: Optional[DebugArguments] = None def split_arguments(args: argparse.Namespace) -> Arguments: @@ -93,7 +94,8 @@ def split_arguments(args: argparse.Namespace) -> Arguments: completion_args=completion_args, display_args=display_args, debug_args=debug_args, - version=args.version + version=args.version, + list_models=args.list_models, ) def parse_args() -> Arguments: @@ -203,11 +205,17 @@ def parse_args() -> Arguments: parser.add_argument( "--version", - # type=bool, action="store_true", help="Print version and exit" ) + parser.add_argument( + "-l", + "--list-models", + action="store_true", + help="List models and exit" + ) + parser.add_argument( "message", type=str, -- cgit v1.2.3