diff --git a/letta/server/rest_api/app.py b/letta/server/rest_api/app.py index d249a3a2..a4013269 100644 --- a/letta/server/rest_api/app.py +++ b/letta/server/rest_api/app.py @@ -322,6 +322,9 @@ def start_server( app, host=host or "localhost", 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_certfile="certs/localhost.pem", ) @@ -338,4 +341,7 @@ def start_server( app, host=host or "localhost", port=port or REST_DEFAULT_PORT, + workers=settings.uvicorn_workers, + reload=settings.uvicorn_reload, + timeout_keep_alive=settings.uvicorn_timeout_keep_alive, ) diff --git a/letta/settings.py b/letta/settings.py index f5c67d77..2aad93ba 100644 --- a/letta/settings.py +++ b/letta/settings.py @@ -174,6 +174,11 @@ class Settings(BaseSettings): # telemetry logging verbose_telemetry_logging: bool = False + # uvicorn settings + uvicorn_workers: int = 1 + uvicorn_reload: bool = False + uvicorn_timeout_keep_alive: int = 5 + @property def letta_pg_uri(self) -> str: if self.pg_uri: