mirror of
https://github.com/Cinnamon/kotaemon.git
synced 2026-02-23 19:49:37 +01:00
fix: page number in knet
This commit is contained in:
@@ -91,6 +91,9 @@ class KnetRetrievalPipeline(BaseFileIndexRetriever):
|
||||
chunks = yaml.safe_load(response.content)
|
||||
for chunk in chunks:
|
||||
metadata = chunk["node"]["metadata"]
|
||||
metadata["page_label"] = metadata.get(
|
||||
"pageIdx", metadata.get("parentPageIdx", "")
|
||||
)
|
||||
metadata["type"] = metadata_translation.get(
|
||||
metadata.pop("content_type", ""), ""
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user