mirror of
https://github.com/cpacker/MemGPT.git
synced 2025-06-03 04:30:22 +00:00
feat: Factor out some uvicorn settings as environment variables (#1266)
This commit is contained in:
parent
8d060a0f34
commit
e4d8272818
@ -322,6 +322,9 @@ def start_server(
|
|||||||
app,
|
app,
|
||||||
host=host or "localhost",
|
host=host or "localhost",
|
||||||
port=port or REST_DEFAULT_PORT,
|
port=port or REST_DEFAULT_PORT,
|
||||||
|
workers=settings.uvicorn_workers,
|
||||||
|
reload=settings.uvicorn_reload,
|
||||||
|
timeout_keep_alive=settings.uvicorn_timeout_keep_alive,
|
||||||
ssl_keyfile="certs/localhost-key.pem",
|
ssl_keyfile="certs/localhost-key.pem",
|
||||||
ssl_certfile="certs/localhost.pem",
|
ssl_certfile="certs/localhost.pem",
|
||||||
)
|
)
|
||||||
@ -338,4 +341,7 @@ def start_server(
|
|||||||
app,
|
app,
|
||||||
host=host or "localhost",
|
host=host or "localhost",
|
||||||
port=port or REST_DEFAULT_PORT,
|
port=port or REST_DEFAULT_PORT,
|
||||||
|
workers=settings.uvicorn_workers,
|
||||||
|
reload=settings.uvicorn_reload,
|
||||||
|
timeout_keep_alive=settings.uvicorn_timeout_keep_alive,
|
||||||
)
|
)
|
||||||
|
@ -174,6 +174,11 @@ class Settings(BaseSettings):
|
|||||||
# telemetry logging
|
# telemetry logging
|
||||||
verbose_telemetry_logging: bool = False
|
verbose_telemetry_logging: bool = False
|
||||||
|
|
||||||
|
# uvicorn settings
|
||||||
|
uvicorn_workers: int = 1
|
||||||
|
uvicorn_reload: bool = False
|
||||||
|
uvicorn_timeout_keep_alive: int = 5
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def letta_pg_uri(self) -> str:
|
def letta_pg_uri(self) -> str:
|
||||||
if self.pg_uri:
|
if self.pg_uri:
|
||||||
|
Loading…
Reference in New Issue
Block a user