Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion src/agentscope_runtime/engine/app/agent_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -878,7 +878,14 @@ def _apply_runtime_configs(self, kwargs: dict):
custom_endpoints = kwargs.pop("custom_endpoints")
self.restore_custom_endpoints(custom_endpoints)

def run(self, host=HOST, port=PORT, web_ui=False, **kwargs):
def run(
self,
host=HOST,
port=PORT,
web_ui=False,
timeout_keep_alive=120,
**kwargs,
):
"""Launch the application server and optional Web UI."""

self._apply_runtime_configs(kwargs)
Expand Down Expand Up @@ -913,6 +920,7 @@ def run(self, host=HOST, port=PORT, web_ui=False, **kwargs):
port=port,
log_level="info",
access_log=True,
timeout_keep_alive=timeout_keep_alive,
)
else:
uvicorn.run(
Expand All @@ -921,6 +929,7 @@ def run(self, host=HOST, port=PORT, web_ui=False, **kwargs):
port=port,
log_level="info",
access_log=True,
timeout_keep_alive=timeout_keep_alive,
)

except KeyboardInterrupt:
Expand Down
1 change: 1 addition & 0 deletions src/agentscope_runtime/sandbox/manager/server/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,7 @@ def main():
port=settings.PORT,
workers=settings.WORKERS,
reload=settings.DEBUG,
timeout_keep_alive=settings.TIMEOUT_KEEP_ALIVE,
)


Expand Down
1 change: 1 addition & 0 deletions src/agentscope_runtime/sandbox/manager/server/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ class Settings(BaseSettings):
PORT: int = 8000
WORKERS: int = 1
DEBUG: bool = False
TIMEOUT_KEEP_ALIVE: int = 120
BEARER_TOKEN: Optional[str] = None

# Runtime Manager settings
Expand Down