DocuRAG / Api /app /modules /querySearch /routes /querySearch_route.py
abadesalex's picture
Update to Qdrant db
47b5f0c
raw
history blame
719 Bytes
from fastapi import APIRouter, Depends, Form
from fastapi.responses import JSONResponse
from app.db_local_storage.in_memory_db import query_response_storage
from app.modules.querySearch.controllers.querySearch_controller import (
QuerySearchController,
)
from app.modules.querySearch.dependecies import get_query_search_controller
router = APIRouter()
@router.post("/query_search")
async def handle_query_search(
q: str = Form(...),
controller: QuerySearchController = Depends(get_query_search_controller),
):
return await controller.handle_query_search(q)
@router.get("/get_messages")
async def get_messages():
return JSONResponse(status_code=200, content={"data": query_response_storage})