mirror of
https://github.com/zylon-ai/private-gpt.git
synced 2025-12-22 04:30:11 +01:00
feat(API): Ingest plain text (#1417)
* Add ingest/text route to ingest plain text * Add new ingest text test and adapt ingest/file ones * Include new API in docs * Remove duplicated logic
This commit is contained in:
parent
059f35840a
commit
6eeb95ec7f
6 changed files with 198 additions and 17 deletions
|
|
@ -48,7 +48,7 @@ class LocalIngestWorker:
|
|||
try:
|
||||
if changed_path.exists():
|
||||
logger.info(f"Started ingesting file={changed_path}")
|
||||
self.ingest_service.ingest(changed_path.name, changed_path)
|
||||
self.ingest_service.ingest_file(changed_path.name, changed_path)
|
||||
logger.info(f"Completed ingesting file={changed_path}")
|
||||
except Exception:
|
||||
logger.exception(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue