Changes from https://github.com/juk0de/ChatMastermind.git #1
@ -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
|
||||
|
||||
|
||||
@ -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")
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user