mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-08-09 19:58:29 +00:00
Address feedback
This commit is contained in:
parent
e23213ee8a
commit
997b097e26
2 changed files with 4 additions and 5 deletions
|
@ -121,6 +121,8 @@ class ServerConfig(BaseModel):
|
||||||
port: int = Field(
|
port: int = Field(
|
||||||
default=8321,
|
default=8321,
|
||||||
description="Port to listen on",
|
description="Port to listen on",
|
||||||
|
ge=1024,
|
||||||
|
le=65535,
|
||||||
)
|
)
|
||||||
ssl_certfile: Optional[str] = Field(
|
ssl_certfile: Optional[str] = Field(
|
||||||
default=None,
|
default=None,
|
||||||
|
|
|
@ -285,19 +285,16 @@ def main():
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"--ssl-keyfile",
|
"--ssl-keyfile",
|
||||||
help="Path to SSL key file for HTTPS",
|
help="Path to SSL key file for HTTPS",
|
||||||
|
required="--ssl-certfile" in sys.argv,
|
||||||
)
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"--ssl-certfile",
|
"--ssl-certfile",
|
||||||
help="Path to SSL certificate file for HTTPS",
|
help="Path to SSL certificate file for HTTPS",
|
||||||
|
required="--ssl-keyfile" in sys.argv,
|
||||||
)
|
)
|
||||||
|
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
if args.ssl_keyfile and not args.ssl_certfile:
|
|
||||||
parser.error("You must provide both --ssl-keyfile and --ssl-certfile when using HTTPS")
|
|
||||||
if args.ssl_certfile and not args.ssl_keyfile:
|
|
||||||
parser.error("You must provide both --ssl-keyfile and --ssl-certfile when using HTTPS")
|
|
||||||
|
|
||||||
if args.env:
|
if args.env:
|
||||||
for env_pair in args.env:
|
for env_pair in args.env:
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue