listing-radar/dev_backend/main.py

21 lines
723 B
Python

import sys
import os
# Add the project root to sys.path to allow imports from model_export
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
from fastapi import FastAPI, status
from starlette.middleware.base import BaseHTTPMiddleware, RequestResponseEndpoint
from dotenv import load_dotenv
from db_setup import get_qdrant_client,get_session
from mysql_process.views import app_router as mysql_router
from vector_db_router.views import app_router as vector_db_router
load_dotenv()
api = FastAPI(
docs_url="/docs",
redoc_url="/redocs",
)
api.include_router(mysql_router,prefix="/mysql",tags=["mysql_process"])
api.include_router(vector_db_router,prefix="/collection",tags=["vector_db"])