Add CLI arguments for the chat command.
(parser: FlexibleArgumentParser)
| 146 | |
| 147 | @staticmethod |
| 148 | def add_cli_args(parser: FlexibleArgumentParser) -> FlexibleArgumentParser: |
| 149 | """Add CLI arguments for the chat command.""" |
| 150 | _add_query_options(parser) |
| 151 | parser.add_argument( |
| 152 | "--system-prompt", |
| 153 | type=str, |
| 154 | default=None, |
| 155 | help=( |
| 156 | "The system prompt to be added to the chat template, " "used for models that support system prompts." |
| 157 | ), |
| 158 | ) |
| 159 | parser.add_argument( |
| 160 | "-q", |
| 161 | "--quick", |
| 162 | type=str, |
| 163 | metavar="MESSAGE", |
| 164 | help=("Send a single prompt as MESSAGE " "and print the response, then exit."), |
| 165 | ) |
| 166 | return parser |
| 167 | |
| 168 | def subparser_init(self, subparsers: argparse._SubParsersAction) -> FlexibleArgumentParser: |
| 169 | parser = subparsers.add_parser( |
no test coverage detected