diff --git a/frontend/src/components/DocumentChunks.tsx b/frontend/src/components/DocumentChunks.tsx index ccdd5129..c7ed739f 100644 --- a/frontend/src/components/DocumentChunks.tsx +++ b/frontend/src/components/DocumentChunks.tsx @@ -156,14 +156,18 @@ const DocumentChunks: React.FC = ({ const handleAddChunk = (title: string, text: string) => { try { + const metadata = { + source: path || documentName, + source_id: documentId, + title: title, + }; + userService .addChunk( { id: documentId, text: text, - metadata: { - title: title, - }, + metadata: metadata, }, token, )