Skip to content

Commit

Permalink
Rename web-root to front-end-root
Browse files Browse the repository at this point in the history
  • Loading branch information
huchenlei committed Jul 15, 2024
1 parent d4f988d commit 757729b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
7 changes: 5 additions & 2 deletions app/frontend_management.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,9 @@ def add_argument(cls, parser: argparse.ArgumentParser):
type=str,
default=cls.DEFAULT_VERSION_STRING,
help=f"""
Specifies the version of the frontend to be used. This command needs internet connectivity to query and
download available frontend implementations from GitHub releases.
The version string should be in the format of:
[provider]@[version]
where provider is one of: {", ".join([provider.name for provider in cls.PROVIDERS])}
Expand All @@ -164,10 +167,10 @@ def is_valid_directory(path: str | None) -> str | None:
return path

parser.add_argument(
"--web-root",
"--front-end-root",
type=is_valid_directory,
default=None,
help="The path to the directory where the frontend is located. Overrides --front-end-version.",
help="The local filesystem path to the directory where the frontend is located. Overrides --front-end-version.",
)

@classmethod
Expand Down
4 changes: 2 additions & 2 deletions server.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ def __init__(self, loop):
self.sockets = dict()
self.web_root = (
FrontendManager.init_frontend(args.front_end_version)
if args.web_root is None
else args.web_root
if args.front_end_root is None
else args.front_end_root
)
logging.info(f"[Prompt Server] web root: {self.web_root}")
routes = web.RouteTableDef()
Expand Down

0 comments on commit 757729b

Please sign in to comment.