INNER CODE UNIT · Python

DocumentsResponse

pathwaycom/llm-app · serviette/server/main.py:71

class DocumentsResponse(BaseModel):
    """``GET /api/v1/documents``: the indexed documents whose name or path
    contains ``q``. The list is left out when more than ``limit`` match —
    the caller narrows the search instead of rendering thousands of rows."""

    total: int  # documents in the index
    matched: int  # of them, matching the filter
    truncated: bool  # matched > limit: ``documents`` was not sent
    documents: list[DocumentEntry] = Field(default_factory=list)


class RagResponse(BaseModel):
    answer: str
    sources: list[RetrieveResult]
    # How the answer was produced: "search" (chunk retrieval), "catalog"
    # (the document listing), "document" / "compare" (whole named documents)
    # or "unresolved" (the question named documents that could not be
    # identified). Anything but "search" comes from ``rag.documents``.

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…