Skip to content

Commit b65f548

Browse files
committed
refactor: Create chunk_metadata dictionary to store doc_id key-value pairs and preserve original metadata of each data chunk
1 parent c046366 commit b65f548

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

embedder_service/routers/embed.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,7 @@ async def data_chunking(request:DataRequest, chunker) -> List[Dict[str, Any]]:
9696
'end_char': chunk_end,
9797
'page_number': None,
9898
'chunk_index': len(chunk_data),
99-
# 'metadata': chunk_metadata # {"doc_id": request.doc_id}
100-
'metadata': {"doc_id": request.doc_id}
99+
'metadata': chunk_metadata
101100
})
102101

103102
current_pos = chunk_end

0 commit comments

Comments
 (0)