Ingestion Speedup Multiple strategy (#1309)

This commit is contained in:
lopagela 2023-11-25 20:12:09 +01:00 committed by GitHub
parent 546ba33e6f
commit bafdd3baf1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 515 additions and 195 deletions

View file

@ -157,10 +157,8 @@ class PrivateGptUi:
def _upload_file(self, files: list[str]) -> None:
logger.debug("Loading count=%s files", len(files))
for file in files:
logger.info("Loading file=%s", file)
path = Path(file)
self._ingest_service.ingest(file_name=path.name, file_data=path)
paths = [Path(file) for file in files]
self._ingest_service.bulk_ingest([(str(path.name), path) for path in paths])
def _build_ui_blocks(self) -> gr.Blocks:
logger.debug("Creating the UI blocks")