INNER CODE UNIT · Python

resource_init

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

async def resource_init():
    logger.debug("init_mcps start......")
    await resource_manager.init_mcp_map()
    logger.debug("init_mcps end")
    logger.debug("init_models start......")
    resource_manager.init_models()
    logger.debug("init_models end")
    logger.debug("init_vectorstores start......")
    resource_manager.init_vectorstore_map()
    logger.debug("init_vectorstores end")


@asynccontextmanager
async def lifespan(app: FastAPI):
    os.makedirs(Path("lang_agent/tmp"), exist_ok=True)
    logger.debug("setup_database_connection start......")
    setup_database_connection()
    logger.debug("setup_database_connection end")

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…