updated README and some minor renaming

This commit is contained in:
juk0de 2023-08-12 18:34:19 +02:00
parent c4a7c07a0c
commit 1e15a52e26
2 changed files with 9 additions and 7 deletions

View File

@ -44,7 +44,7 @@ cmm [global options] command [command options]
- `ask`: Ask a question. - `ask`: Ask a question.
- `hist`: Print chat history. - `hist`: Print chat history.
- `tag`: Manage tags. - `tag`: Manage tags.
- `model`: Manage models. - `config`: Manage configuration.
- `print`: Print files. - `print`: Print files.
### Command Options ### Command Options
@ -77,9 +77,11 @@ cmm [global options] command [command options]
- `-l`, `--list`: List all tags and their frequency. - `-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 #### `print` Command Options

View File

@ -25,7 +25,7 @@ def create_question_with_hist(args: argparse.Namespace,
config: ConfigType, config: ConfigType,
) -> tuple[list[dict[str, str]], str, list[str]]: ) -> 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. by the specified tags.
""" """
tags = args.tags or [] tags = args.tags or []
@ -72,7 +72,7 @@ def config_cmd(args: argparse.Namespace, config: ConfigType) -> None:
if args.list_models: if args.list_models:
print_models() print_models()
elif args.show_model: elif args.print_model:
print(config['openai']['model']) print(config['openai']['model'])
elif args.model: elif args.model:
config['openai']['model'] = args.model config['openai']['model'] = args.model
@ -201,9 +201,9 @@ def create_parser() -> argparse.ArgumentParser:
help="Manage configuration") help="Manage configuration")
config_cmd_parser.set_defaults(func=config_cmd) config_cmd_parser.set_defaults(func=config_cmd)
config_group = config_cmd_parser.add_mutually_exclusive_group(required=True) 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') 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') action='store_true')
config_group.add_argument('-M', '--model', help="Set model in the config file") config_group.add_argument('-M', '--model', help="Set model in the config file")