app.py 371 B

123456789101112
  1. from fastapi import FastAPI
  2. from .memory_factory import build_memories
  3. from .routes import build_router
  4. def create_app() -> FastAPI:
  5. """Create the FastAPI app and register all mem0 server routes."""
  6. app = FastAPI(title="mem0 server")
  7. memory_conv, memory_know = build_memories()
  8. app.include_router(build_router(memory_conv, memory_know))
  9. return app