add metadata support to RAG

This commit is contained in:
2025-12-02 21:22:03 +01:00
parent 841d79f26b
commit e6914ed4a4
18 changed files with 2013 additions and 38 deletions

View File

@@ -40,6 +40,7 @@ class RagDocument(Base):
file_type = Column(String(50), nullable=False) # pdf, docx, txt, etc.
file_size = Column(BigInteger, nullable=False) # file size in bytes
mime_type = Column(String(100), nullable=True)
source_url = Column(String(500), nullable=True, index=True) # original source URL
# Processing status
status = Column(
@@ -93,6 +94,7 @@ class RagDocument(Base):
"file_type": self.file_type,
"size": self.file_size,
"mime_type": self.mime_type,
"source_url": self.source_url,
"status": self.status,
"processing_error": self.processing_error,
"converted_content": self.converted_content,