server : add flag to disable the web-ui (#10762) (#10751)

Co-authored-by: eugenio.segala <esegala@deloitte.co.uk>
This commit is contained in:
Yüg 2024-12-10 17:22:34 +00:00 committed by GitHub
parent a05e2afcc2
commit a86ad841f1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 46 additions and 13 deletions

View file

@ -72,6 +72,7 @@ class ServerProcess:
disable_ctx_shift: int | None = False
draft_min: int | None = None
draft_max: int | None = None
no_webui: bool | None = None
# session variables
process: subprocess.Popen | None = None
@ -158,6 +159,8 @@ class ServerProcess:
server_args.extend(["--draft-max", self.draft_max])
if self.draft_min:
server_args.extend(["--draft-min", self.draft_min])
if self.no_webui:
server_args.append("--no-webui")
args = [str(arg) for arg in [server_path, *server_args]]
print(f"bench: starting server with: {' '.join(args)}")