From 4c69c458ab22ca7a5dd25cf8e7d7aa4e8a404cf8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iv=C3=A1n=20Mart=C3=ADnez?= Date: Thu, 21 Dec 2023 17:13:46 +0100 Subject: [PATCH] Improve ingest logs (#1438) --- private_gpt/server/ingest/ingest_service.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/private_gpt/server/ingest/ingest_service.py b/private_gpt/server/ingest/ingest_service.py index 3b8373d44..aa2f73c39 100644 --- a/private_gpt/server/ingest/ingest_service.py +++ b/private_gpt/server/ingest/ingest_service.py @@ -73,6 +73,7 @@ def _ingest_data(self, file_name: str, file_data: AnyStr) -> list[IngestedDoc]: def ingest_file(self, file_name: str, file_data: Path) -> list[IngestedDoc]: logger.info("Ingesting file_name=%s", file_name) documents = self.ingest_component.ingest(file_name, file_data) + logger.info("Finished ingestion file_name=%s", file_name) return [IngestedDoc.from_document(document) for document in documents] def ingest_text(self, file_name: str, text: str) -> list[IngestedDoc]: @@ -89,6 +90,7 @@ def ingest_bin_data( def bulk_ingest(self, files: list[tuple[str, Path]]) -> list[IngestedDoc]: logger.info("Ingesting file_names=%s", [f[0] for f in files]) documents = self.ingest_component.bulk_ingest(files) + logger.info("Finished ingestion file_name=%s", [f[0] for f in files]) return [IngestedDoc.from_document(document) for document in documents] def list_ingested(self) -> list[IngestedDoc]: