INNER CODE UNIT · Python

docs

cqzyys/lang-agent · lang-agent-backend/lang_agent/main.py:152

    def docs():
        return RedirectResponse(url="/docs")

    @app.get("/health")
    def get_health():
        return {"status": "OK"}

    # 全局异常处理
    register_exception_handlers(app)

    app.include_router(router_v1)
    uvicorn.run(app, host=host, port=port)


if __name__ == "__main__":
    parser = argparse.ArgumentParser()
    parser.add_argument("--host", type=str, default=os.getenv("APP_HOST", "0.0.0.0"))
    parser.add_argument("--port", type=int, default=int(os.getenv("APP_PORT", "8810")))

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…