feat: Update query endpoint to return paginated investment responses with fund details
This commit is contained in:
+7
-2
@@ -6,7 +6,7 @@ from dotenv import load_dotenv
|
||||
from fastapi import FastAPI, File, Form, UploadFile
|
||||
from pydantic import BaseModel
|
||||
from routers import companies, investors, projects
|
||||
from schemas.router_schemas import InvestorList
|
||||
from schemas.router_schemas import InvestmentResponse, PaginatedResponse
|
||||
from services.llm_parser import InvestorProcessor
|
||||
from services.querying import QueryProcessor
|
||||
|
||||
@@ -84,11 +84,16 @@ async def parse_csv(
|
||||
return results
|
||||
|
||||
|
||||
@app.post("/query", response_model=InvestorList, tags=["Querying"])
|
||||
@app.post(
|
||||
"/query", response_model=PaginatedResponse[InvestmentResponse], tags=["Querying"]
|
||||
)
|
||||
async def query_investors(request: QueryRequest):
|
||||
"""
|
||||
Query investors using natural language.
|
||||
|
||||
Returns fund-level matches (one row per fund) with investor details.
|
||||
This ensures only relevant funds are included in the response.
|
||||
|
||||
Supports queries like:
|
||||
- "Show me seed stage investors"
|
||||
- "Find fintech investors in Silicon Valley"
|
||||
|
||||
Reference in New Issue
Block a user