Skip to content

Commit 57e729e

Browse files
authored
[Doc]: Update OpenAI-Compatible Server documents (#12082)
1 parent de0526f commit 57e729e

File tree

2 files changed

+38
-38
lines changed

2 files changed

+38
-38
lines changed

vllm/engine/arg_utils.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ def add_cli_args(parser: FlexibleArgumentParser) -> FlexibleArgumentParser:
238238
choices=get_args(TaskOption),
239239
help='The task to use the model for. Each vLLM instance only '
240240
'supports one task, even if the same model can be used for '
241-
'multiple tasks. When the model only supports one task, "auto" '
241+
'multiple tasks. When the model only supports one task, ``"auto"`` '
242242
'can be used to select it; otherwise, you must specify explicitly '
243243
'which task to use.')
244244
parser.add_argument(
@@ -250,7 +250,7 @@ def add_cli_args(parser: FlexibleArgumentParser) -> FlexibleArgumentParser:
250250
parser.add_argument(
251251
'--skip-tokenizer-init',
252252
action='store_true',
253-
help='Skip initialization of tokenizer and detokenizer')
253+
help='Skip initialization of tokenizer and detokenizer.')
254254
parser.add_argument(
255255
'--revision',
256256
type=nullable_str,
@@ -401,7 +401,7 @@ def add_cli_args(parser: FlexibleArgumentParser) -> FlexibleArgumentParser:
401401
parser.add_argument(
402402
'--worker-use-ray',
403403
action='store_true',
404-
help='Deprecated, use --distributed-executor-backend=ray.')
404+
help='Deprecated, use ``--distributed-executor-backend=ray``.')
405405
parser.add_argument('--pipeline-parallel-size',
406406
'-pp',
407407
type=int,
@@ -430,7 +430,7 @@ def add_cli_args(parser: FlexibleArgumentParser) -> FlexibleArgumentParser:
430430
choices=[8, 16, 32, 64, 128],
431431
help='Token block size for contiguous chunks of '
432432
'tokens. This is ignored on neuron devices and '
433-
'set to max-model-len. On CUDA devices, '
433+
'set to ``--max-model-len``. On CUDA devices, '
434434
'only block sizes up to 32 are supported. '
435435
'On HPU devices, block size defaults to 128.')
436436

@@ -439,12 +439,12 @@ def add_cli_args(parser: FlexibleArgumentParser) -> FlexibleArgumentParser:
439439
action=argparse.BooleanOptionalAction,
440440
default=EngineArgs.enable_prefix_caching,
441441
help="Enables automatic prefix caching. "
442-
"Use --no-enable-prefix-caching to disable explicitly.",
442+
"Use ``--no-enable-prefix-caching`` to disable explicitly.",
443443
)
444444
parser.add_argument('--disable-sliding-window',
445445
action='store_true',
446446
help='Disables sliding window, '
447-
'capping to sliding window size')
447+
'capping to sliding window size.')
448448
parser.add_argument('--use-v2-block-manager',
449449
action='store_true',
450450
default=True,
@@ -861,7 +861,7 @@ def add_cli_args(parser: FlexibleArgumentParser) -> FlexibleArgumentParser:
861861
"of the provided names. The model name in the model "
862862
"field of a response will be the first name in this "
863863
"list. If not specified, the model name will be the "
864-
"same as the `--model` argument. Noted that this name(s) "
864+
"same as the ``--model`` argument. Noted that this name(s) "
865865
"will also be used in `model_name` tag content of "
866866
"prometheus metrics, if multiple names provided, metrics "
867867
"tag will take the first one.")
@@ -881,7 +881,7 @@ def add_cli_args(parser: FlexibleArgumentParser) -> FlexibleArgumentParser:
881881
default=None,
882882
help="Valid choices are " +
883883
",".join(ALLOWED_DETAILED_TRACE_MODULES) +
884-
". It makes sense to set this only if --otlp-traces-endpoint is"
884+
". It makes sense to set this only if ``--otlp-traces-endpoint`` is"
885885
" set. If set, it will collect detailed traces for the specified "
886886
"modules. This involves use of possibly costly and or blocking "
887887
"operations and hence might have a performance impact.")

vllm/entrypoints/openai/cli_args.py

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -79,29 +79,29 @@ def make_arg_parser(parser: FlexibleArgumentParser) -> FlexibleArgumentParser:
7979
parser.add_argument("--host",
8080
type=nullable_str,
8181
default=None,
82-
help="host name")
83-
parser.add_argument("--port", type=int, default=8000, help="port number")
82+
help="Host name.")
83+
parser.add_argument("--port", type=int, default=8000, help="Port number.")
8484
parser.add_argument(
8585
"--uvicorn-log-level",
8686
type=str,
8787
default="info",
8888
choices=['debug', 'info', 'warning', 'error', 'critical', 'trace'],
89-
help="log level for uvicorn")
89+
help="Log level for uvicorn.")
9090
parser.add_argument("--allow-credentials",
9191
action="store_true",
92-
help="allow credentials")
92+
help="Allow credentials.")
9393
parser.add_argument("--allowed-origins",
9494
type=json.loads,
9595
default=["*"],
96-
help="allowed origins")
96+
help="Allowed origins.")
9797
parser.add_argument("--allowed-methods",
9898
type=json.loads,
9999
default=["*"],
100-
help="allowed methods")
100+
help="Allowed methods.")
101101
parser.add_argument("--allowed-headers",
102102
type=json.loads,
103103
default=["*"],
104-
help="allowed headers")
104+
help="Allowed headers.")
105105
parser.add_argument("--api-key",
106106
type=nullable_str,
107107
default=None,
@@ -115,10 +115,10 @@ def make_arg_parser(parser: FlexibleArgumentParser) -> FlexibleArgumentParser:
115115
action=LoRAParserAction,
116116
help="LoRA module configurations in either 'name=path' format"
117117
"or JSON format. "
118-
"Example (old format): 'name=path' "
118+
"Example (old format): ``'name=path'`` "
119119
"Example (new format): "
120-
"'{\"name\": \"name\", \"local_path\": \"path\", "
121-
"\"base_model_name\": \"id\"}'")
120+
"``{\"name\": \"name\", \"local_path\": \"path\", "
121+
"\"base_model_name\": \"id\"}``")
122122
parser.add_argument(
123123
"--prompt-adapters",
124124
type=nullable_str,
@@ -132,7 +132,7 @@ def make_arg_parser(parser: FlexibleArgumentParser) -> FlexibleArgumentParser:
132132
default=None,
133133
help="The file path to the chat template, "
134134
"or the template in single-line form "
135-
"for the specified model")
135+
"for the specified model.")
136136
parser.add_argument(
137137
'--chat-template-content-format',
138138
type=str,
@@ -141,38 +141,39 @@ def make_arg_parser(parser: FlexibleArgumentParser) -> FlexibleArgumentParser:
141141
help='The format to render message content within a chat template.'
142142
'\n\n'
143143
'* "string" will render the content as a string. '
144-
'Example: "Hello World"\n'
144+
'Example: ``"Hello World"``\n'
145145
'* "openai" will render the content as a list of dictionaries, '
146146
'similar to OpenAI schema. '
147-
'Example: [{"type": "text", "text": "Hello world!"}]')
147+
'Example: ``[{"type": "text", "text": "Hello world!"}]``')
148148
parser.add_argument("--response-role",
149149
type=nullable_str,
150150
default="assistant",
151151
help="The role name to return if "
152-
"`request.add_generation_prompt=true`.")
152+
"``request.add_generation_prompt=true``.")
153153
parser.add_argument("--ssl-keyfile",
154154
type=nullable_str,
155155
default=None,
156-
help="The file path to the SSL key file")
156+
help="The file path to the SSL key file.")
157157
parser.add_argument("--ssl-certfile",
158158
type=nullable_str,
159159
default=None,
160-
help="The file path to the SSL cert file")
160+
help="The file path to the SSL cert file.")
161161
parser.add_argument("--ssl-ca-certs",
162162
type=nullable_str,
163163
default=None,
164-
help="The CA certificates file")
164+
help="The CA certificates file.")
165165
parser.add_argument(
166166
"--ssl-cert-reqs",
167167
type=int,
168168
default=int(ssl.CERT_NONE),
169-
help="Whether client certificate is required (see stdlib ssl module's)"
169+
help="Whether client certificate is required (see stdlib ssl module's)."
170170
)
171171
parser.add_argument(
172172
"--root-path",
173173
type=nullable_str,
174174
default=None,
175-
help="FastAPI root_path when app is behind a path based routing proxy")
175+
help="FastAPI root_path when app is behind a path based routing proxy."
176+
)
176177
parser.add_argument(
177178
"--middleware",
178179
type=nullable_str,
@@ -182,15 +183,15 @@ def make_arg_parser(parser: FlexibleArgumentParser) -> FlexibleArgumentParser:
182183
"We accept multiple --middleware arguments. "
183184
"The value should be an import path. "
184185
"If a function is provided, vLLM will add it to the server "
185-
"using @app.middleware('http'). "
186+
"using ``@app.middleware('http')``. "
186187
"If a class is provided, vLLM will add it to the server "
187-
"using app.add_middleware(). ")
188+
"using ``app.add_middleware()``. ")
188189
parser.add_argument(
189190
"--return-tokens-as-token-ids",
190191
action="store_true",
191-
help="When --max-logprobs is specified, represents single tokens as "
192-
"strings of the form 'token_id:{token_id}' so that tokens that "
193-
"are not JSON-encodable can be identified.")
192+
help="When ``--max-logprobs`` is specified, represents single tokens "
193+
" as strings of the form 'token_id:{token_id}' so that tokens "
194+
"that are not JSON-encodable can be identified.")
194195
parser.add_argument(
195196
"--disable-frontend-multiprocessing",
196197
action="store_true",
@@ -205,9 +206,8 @@ def make_arg_parser(parser: FlexibleArgumentParser) -> FlexibleArgumentParser:
205206
"--enable-auto-tool-choice",
206207
action="store_true",
207208
default=False,
208-
help=
209-
"Enable auto tool choice for supported models. Use --tool-call-parser"
210-
" to specify which parser to use")
209+
help="Enable auto tool choice for supported models. Use "
210+
"``--tool-call-parser`` to specify which parser to use.")
211211

212212
valid_tool_parsers = ToolParserManager.tool_parsers.keys()
213213
parser.add_argument(
@@ -219,7 +219,7 @@ def make_arg_parser(parser: FlexibleArgumentParser) -> FlexibleArgumentParser:
219219
help=
220220
"Select the tool call parser depending on the model that you're using."
221221
" This is used to parse the model-generated tool call into OpenAI API "
222-
"format. Required for --enable-auto-tool-choice.")
222+
"format. Required for ``--enable-auto-tool-choice``.")
223223

224224
parser.add_argument(
225225
"--tool-parser-plugin",
@@ -228,7 +228,7 @@ def make_arg_parser(parser: FlexibleArgumentParser) -> FlexibleArgumentParser:
228228
help=
229229
"Special the tool parser plugin write to parse the model-generated tool"
230230
" into OpenAI API format, the name register in this plugin can be used "
231-
"in --tool-call-parser.")
231+
"in ``--tool-call-parser``.")
232232

233233
parser = AsyncEngineArgs.add_cli_args(parser)
234234

@@ -243,7 +243,7 @@ def make_arg_parser(parser: FlexibleArgumentParser) -> FlexibleArgumentParser:
243243
"--disable-fastapi-docs",
244244
action='store_true',
245245
default=False,
246-
help="Disable FastAPI's OpenAPI schema, Swagger UI, and ReDoc endpoint"
246+
help="Disable FastAPI's OpenAPI schema, Swagger UI, and ReDoc endpoint."
247247
)
248248
parser.add_argument(
249249
"--enable-prompt-tokens-details",

0 commit comments

Comments
 (0)