INNER CODE UNIT · Python
api_vector_search
marc-shade/world-intel-mcp · src/world_intel_mcp/dashboard/app.py:653
async def api_vector_search(request):
"""POST endpoint for semantic search against the vector store."""
_ensure_fetcher()
if _vector_store is None:
return JSONResponse(
{"error": "Vector store not available (Qdrant not running)"},
status_code=503,
headers={"Access-Control-Allow-Origin": "*"},
)
try:
body = await request.json()
except Exception:
return JSONResponse(
{"error": "Invalid JSON body"},
status_code=400,
headers={"Access-Control-Allow-Origin": "*"},
)