Skip to content

Commit

Permalink
Improve ingest logs (#1438)
Browse files Browse the repository at this point in the history
  • Loading branch information
imartinez authored Dec 21, 2023
1 parent 4780540 commit 4c69c45
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions private_gpt/server/ingest/ingest_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]:
Expand All @@ -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]:
Expand Down

0 comments on commit 4c69c45

Please sign in to comment.