taolib.symphony.server.app#

Symphony HTTP 服务器(可选)。

提供 REST JSON API 和 HTML 仪表板,用于监控编排状态。

Attributes#

Functions#

lifespan(→ collections.abc.AsyncGenerator[None])

应用生命周期管理。

create_app(→ fastapi.FastAPI)

创建 Symphony FastAPI 应用实例。

Module Contents#

taolib.symphony.server.app.logger#
async taolib.symphony.server.app.lifespan(app: fastapi.FastAPI) collections.abc.AsyncGenerator[None]#

应用生命周期管理。

taolib.symphony.server.app.create_app(orchestrator: object | None = None) fastapi.FastAPI#

创建 Symphony FastAPI 应用实例。

参数:

orchestrator -- 编排器实例,会被挂载到 app.state.orchestrator, 供路由通过 request.app.state.orchestrator 访问。

返回:

配置好的 FastAPI 应用。