Skip to content

feat(server): add Notebook Q&A RAG Chat API endpoint (POST /api/extended/chat) #200

Description

@allenporter

Feature Request: Notebook Q&A / RAG Chat API (POST /api/extended/chat)

Summary
Add a server endpoint POST /api/extended/chat to allow conversational multi-turn Q&A over transcribed notebooks.

Details
While the backend currently provides vector semantic search (/api/extended/search), returning raw matching page chunks, it lacks a high-level conversational synthesis endpoint that takes a user query, retrieves relevant embeddings, and calls Gemini to synthesize an answer with page citations.

Proposed API Specification

POST /api/extended/chat
Request:
{
  "prompt": "What were the key architectural decisions made in Sprint Planning?",
  "fileId": 739205171027902477,
  "top_n": 5
}

Response:
{
  "success": true,
  "answer": "The team decided to migrate SQLite database schemas using Alembic...",
  "citations": [
    { "fileId": 739205171027902477, "fileName": "Architecture.note", "pageIndex": 0 }
  ]
}

MCP Considerations
Consider whether this endpoint can reuse or complement the MCP server tools (supernote/server/mcp/server.py).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions