Skip to content

Commit d2937c2

Browse files
committed
added search endpoint
1 parent 9605c36 commit d2937c2

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

backend/main.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,11 @@ async def status(self, job_id: str):
148148

149149
@modal.fastapi_endpoint(method="POST")
150150
async def upload(self, file: UploadFile = None):
151+
"""
152+
Video upload endpoint - accepts video file uploads and starts background processing.
153+
Returns a job ID for polling status.
154+
"""
155+
# TODO: Add error handling for file types and sizes
151156
import uuid
152157

153158
if file is None:
@@ -184,3 +189,14 @@ async def upload(self, file: UploadFile = None):
184189
"message": "Video uploaded successfully, processing in background"
185190
}
186191

192+
@modal.fastapi_endpoint(method="POST")
193+
async def search(self, query: str):
194+
"""Search endpoint - accepts a text query and returns semantic search results."""
195+
logger.info(f"[Search] Query: {query}")
196+
197+
# TODO: Implement search and rerank logic and use class models here
198+
199+
return {
200+
"query": query,
201+
"status": "success"
202+
}

0 commit comments

Comments
 (0)