diff options
author | flu0r1ne <flu0r1ne@flu0r1ne.net> | 2023-05-05 02:35:50 -0500 |
---|---|---|
committer | flu0r1ne <flu0r1ne@flu0r1ne.net> | 2023-05-05 02:35:50 -0500 |
commit | f6cd64a7870dafa80cc81e52ad9a8f7fe6529154 (patch) | |
tree | 9641d75b23a1d714bd4683058db24d6338e58a3a /src/gpt_chat_cli/argparsing.py | |
parent | 07699e070fb44586a98926867b0168f64cef0f64 (diff) | |
download | gpt-chat-cli-f6cd64a7870dafa80cc81e52ad9a8f7fe6529154.tar.xz gpt-chat-cli-f6cd64a7870dafa80cc81e52ad9a8f7fe6529154.zip |
Add command to list models
Diffstat (limited to 'src/gpt_chat_cli/argparsing.py')
-rw-r--r-- | src/gpt_chat_cli/argparsing.py | 12 |
1 files changed, 10 insertions, 2 deletions
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,12 +205,18 @@ 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, nargs='?', |