CoolFace
Modelpublic

aigenrec/luminabackend

sourceHugging Faceupdated 10mo agoView on Hugging Face
0likes
notes.py21 linesDownload Raw Back to endpoints
1from fastapi import APIRouter, HTTPException, Depends
2from typing import Any
3from services.notes_service import notes_service
4from models.schemas import NotesGenerateRequest, NotesGenerateResponse
5
6router = APIRouter()
7
8@router.post("/generate", response_model=NotesGenerateResponse)
9async def generate_notes(request: NotesGenerateRequest) -> Any:
10    """Generate notes for a project"""
11    try:
12        content = await notes_service.generate_notes(
13            project_id=request.project_id,
14            note_type=request.note_type,
15            topic=request.topic,
16            selected_documents=request.selected_documents
17        )
18        return {"content": content}
19    except Exception as e:
20        raise HTTPException(status_code=500, detail=str(e))
21