Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
vllm_cscc
Commits
e3515729
Unverified
Commit
e3515729
authored
Sep 18, 2024
by
Jiaxin Shan
Committed by
GitHub
Sep 18, 2024
Browse files
[Misc] Add argument to disable FastAPI docs (#8554)
parent
95965d31
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
1 deletion
+14
-1
vllm/entrypoints/openai/api_server.py
vllm/entrypoints/openai/api_server.py
+7
-1
vllm/entrypoints/openai/cli_args.py
vllm/entrypoints/openai/cli_args.py
+7
-0
No files found.
vllm/entrypoints/openai/api_server.py
View file @
e3515729
...
...
@@ -417,6 +417,12 @@ if envs.VLLM_ALLOW_RUNTIME_LORA_UPDATING:
def
build_app
(
args
:
Namespace
)
->
FastAPI
:
if
args
.
disable_fastapi_docs
:
app
=
FastAPI
(
openapi_url
=
None
,
docs_url
=
None
,
redoc_url
=
None
,
lifespan
=
lifespan
)
else
:
app
=
FastAPI
(
lifespan
=
lifespan
)
app
.
include_router
(
router
)
app
.
root_path
=
args
.
root_path
...
...
vllm/entrypoints/openai/cli_args.py
View file @
e3515729
...
...
@@ -190,6 +190,13 @@ def make_arg_parser(parser: FlexibleArgumentParser) -> FlexibleArgumentParser:
'ID numbers being printed in log.'
'
\n\n
Default: Unlimited'
)
parser
.
add_argument
(
"--disable-fastapi-docs"
,
action
=
'store_true'
,
default
=
False
,
help
=
"Disable FastAPI's OpenAPI schema, Swagger UI, and ReDoc endpoint"
)
return
parser
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment