AnuragShirke commited on
Commit
b3c9884
·
1 Parent(s): 786ac47

feat: Add root endpoint for health checks

Browse files
Files changed (1) hide show
  1. src/main.py +6 -0
src/main.py CHANGED
@@ -255,6 +255,12 @@ def calculate_file_hash(file_path: str) -> str:
255
  raise FileProcessingError(f"Failed to calculate file hash: {str(e)}", os.path.basename(file_path))
256
 
257
  # --- API Endpoints ---
 
 
 
 
 
 
258
  @app.post("/upload", response_model=UploadResponse)
259
  async def upload_file(
260
  file: UploadFile = File(...),
 
255
  raise FileProcessingError(f"Failed to calculate file hash: {str(e)}", os.path.basename(file_path))
256
 
257
  # --- API Endpoints ---
258
+ @app.get("/")
259
+ async def root():
260
+ """A simple root endpoint to confirm the API is running."""
261
+ return {"message": "Knowledge Assistant RAG API is running."}
262
+
263
+
264
  @app.post("/upload", response_model=UploadResponse)
265
  async def upload_file(
266
  file: UploadFile = File(...),