This interface defines the structure of a document within a Knowledge Base.
export interface KnowledgeBaseDocument {
    id?: string;
    knowledge_base_id?: string;
    name?: string;
    type?: 'pdf' | 'txt' | 'md' | 'docx' | 'html';
    size?: number;
    token_count?: number;
    status?: 'processing' | 'ready' | 'failed';
    uploaded_at?: string;
}

Properties

  • id (string, optional): The unique identifier of the document.
  • knowledge_base_id (string, optional): The ID of the knowledge base this document belongs to.
  • name (string, optional): The name of the document.
  • type (string, optional): The type of the document (e.g., ‘pdf’, ‘txt’, ‘md’).
  • size (number, optional): The size of the document in bytes.
  • token_count (number, optional): The number of tokens in the document.
  • status (string, optional): The processing status of the document (‘processing’, ‘ready’, or ‘failed’).
  • uploaded_at (string, optional): The timestamp when the document was uploaded.