mirror of
https://github.com/zylon-ai/private-gpt.git
synced 2025-12-22 07:40:12 +01:00
Refactor UI state management (#1191)
* Added logs at generation of the UI, and generate the UI in an object * Make ingest script more verbose in case of an error at ingestion time * Removed the explicit state in the UI containing ingested files * Make script of ingestion a bit more verbose by displaying stack traces * Change the browser tab title of privateGPT ui to `My Private GPT`
This commit is contained in:
parent
55e626eac7
commit
a666fd5b73
3 changed files with 170 additions and 137 deletions
|
|
@ -69,8 +69,10 @@ def _do_ingest(changed_path: Path) -> None:
|
|||
logger.info(f"Started ingesting {changed_path}")
|
||||
ingest_service.ingest(changed_path.name, changed_path)
|
||||
logger.info(f"Completed ingesting {changed_path}")
|
||||
except Exception as e:
|
||||
logger.error(f"Failed to ingest document: {changed_path}. Error: {e}")
|
||||
except Exception:
|
||||
logger.exception(
|
||||
f"Failed to ingest document: {changed_path}, find the exception attached"
|
||||
)
|
||||
|
||||
|
||||
path = Path(args.folder)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue