Kaballas commited on
Commit
a6aed15
Β·
1 Parent(s): 2617623
Files changed (1) hide show
  1. app.py +5 -13
app.py CHANGED
@@ -1,18 +1,10 @@
1
  from fastapi import FastAPI
2
- from fastmcp import create_server # ➊ import the FastMCP factory
3
 
4
- # ── Parent FastAPI app ───────────────────────────────────────────
5
  app = FastAPI()
 
 
6
 
7
- # ── Mount the existing FastMCP server under /sse/ ────────────────
8
- #
9
- # FastMCP already returns a FastAPI/Starlette app, so you can plug it
10
- # straight into your main application.
11
- #
12
- vector_app = create_server(transport="sse") # keep any flags you need
13
- app.mount("/sse", vector_app) # /sse/ now serves the API
14
-
15
- # ── Minimal health-check route for Hugging Face and Docker ───────
16
- @app.get("/", tags=["health"])
17
- async def root():
18
  return {"status": "ok"}
 
1
  from fastapi import FastAPI
2
+ from fastmcp import create_server
3
 
 
4
  app = FastAPI()
5
+ vector_app = create_server(transport="sse")
6
+ app.mount("/sse", vector_app)
7
 
8
+ @app.get("/")
9
+ def root():
 
 
 
 
 
 
 
 
 
10
  return {"status": "ok"}