MCPcopy Create free account
hub / github.com/PaddlePaddle/FastDeploy / add_cli_args

Method add_cli_args

fastdeploy/entrypoints/cli/openai.py:148–166  ·  view source on GitHub ↗

Add CLI arguments for the chat command.

(parser: FlexibleArgumentParser)

Source from the content-addressed store, hash-verified

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(

Callers 5

mainFunction · 0.45
subparser_initMethod · 0.45
subparser_initMethod · 0.45
make_arg_parserFunction · 0.45
make_arg_parserFunction · 0.45

Calls 1

_add_query_optionsFunction · 0.85

Tested by

no test coverage detected