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

Function _add_query_options

fastdeploy/entrypoints/cli/openai.py:85–107  ·  view source on GitHub ↗
(parser: FlexibleArgumentParser)

Source from the content-addressed store, hash-verified

83
84
85def _add_query_options(parser: FlexibleArgumentParser) -> FlexibleArgumentParser:
86 parser.add_argument(
87 "--url",
88 type=str,
89 default="http://localhost:8000/v1",
90 help="url of the running OpenAI-Compatible RESTful API server",
91 )
92 parser.add_argument(
93 "--model-name",
94 type=str,
95 default=None,
96 help=("The model name used in prompt completion, default to " "the first model in list models API call."),
97 )
98 parser.add_argument(
99 "--api-key",
100 type=str,
101 default=None,
102 help=(
103 "API key for OpenAI services. If provided, this api key "
104 "will overwrite the api key obtained through environment variables."
105 ),
106 )
107 return parser
108
109
110class ChatCommand(CLISubcommand):

Callers 3

add_cli_argsMethod · 0.85
add_cli_argsMethod · 0.85

Calls

no outgoing calls

Tested by 1