From 1e15a52e269f3bf44e472f84402958fe1e7b27e0 Mon Sep 17 00:00:00 2001 From: juk0de Date: Sat, 12 Aug 2023 18:34:19 +0200 Subject: [PATCH] updated README and some minor renaming --- README.md | 8 +++++--- chatmastermind/main.py | 8 ++++---- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 95d60a9..d55102a 100644 --- a/README.md +++ b/README.md @@ -44,7 +44,7 @@ cmm [global options] command [command options] - `ask`: Ask a question. - `hist`: Print chat history. - `tag`: Manage tags. -- `model`: Manage models. +- `config`: Manage configuration. - `print`: Print files. ### Command Options @@ -77,9 +77,11 @@ cmm [global options] command [command options] - `-l`, `--list`: List all tags and their frequency. -#### `model` Command Options +#### `config` Command Options -- `-l`, `--list`: List all available models. +- `-l`, `--list-models`: List all available models. +- `-m`, `--print-model`: Print the currently configured model. +- `-M`, `--model`: Set model in the config file. #### `print` Command Options diff --git a/chatmastermind/main.py b/chatmastermind/main.py index 623b83a..0d68779 100755 --- a/chatmastermind/main.py +++ b/chatmastermind/main.py @@ -25,7 +25,7 @@ def create_question_with_hist(args: argparse.Namespace, config: ConfigType, ) -> tuple[list[dict[str, str]], str, list[str]]: """ - Creates the "SI request", including the question and chat history as determined + Creates the "AI request", including the question and chat history as determined by the specified tags. """ tags = args.tags or [] @@ -72,7 +72,7 @@ def config_cmd(args: argparse.Namespace, config: ConfigType) -> None: if args.list_models: print_models() - elif args.show_model: + elif args.print_model: print(config['openai']['model']) elif args.model: config['openai']['model'] = args.model @@ -201,9 +201,9 @@ def create_parser() -> argparse.ArgumentParser: help="Manage configuration") config_cmd_parser.set_defaults(func=config_cmd) config_group = config_cmd_parser.add_mutually_exclusive_group(required=True) - config_group.add_argument('-L', '--list-models', help="List all available models", + config_group.add_argument('-l', '--list-models', help="List all available models", action='store_true') - config_group.add_argument('-m', '--show-model', help="Show current model", + config_group.add_argument('-m', '--print-model', help="Print the currently configured model", action='store_true') config_group.add_argument('-M', '--model', help="Set model in the config file")