Merge pull request #1187 from danielaskdd/pipeline-file-path

feat: Add file name display in WebUI
This commit is contained in:
Daniel.y
2025-03-25 23:02:16 +08:00
committed by GitHub
12 changed files with 267 additions and 186 deletions

View File

@@ -1 +1 @@
__api_version__ = "1.2.5"
__api_version__ = "1.2.6"

View File

@@ -91,6 +91,7 @@ class DocStatusResponse(BaseModel):
chunks_count: Optional[int] = None
error: Optional[str] = None
metadata: Optional[dict[str, Any]] = None
file_path: str
class DocsStatusesResponse(BaseModel):
@@ -370,7 +371,7 @@ async def pipeline_enqueue_file(rag: LightRAG, file_path: Path) -> bool:
# Insert into the RAG queue
if content:
await rag.apipeline_enqueue_documents(content)
await rag.apipeline_enqueue_documents(content, file_paths=file_path.name)
logger.info(f"Successfully fetched and enqueued file: {file_path.name}")
return True
else:
@@ -890,6 +891,7 @@ def create_document_routes(
chunks_count=doc_status.chunks_count,
error=doc_status.error,
metadata=doc_status.metadata,
file_path=doc_status.file_path,
)
)
return response

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1,17 +1,17 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="0" />
<link rel="icon" type="image/svg+xml" href="logo.png" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Lightrag</title>
<script type="module" crossorigin src="/webui/assets/index-DJ53id6i.js"></script>
<link rel="stylesheet" crossorigin href="/webui/assets/index-BwFyYQzx.css">
</head>
<body>
<div id="root"></div>
</body>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="0" />
<link rel="icon" type="image/svg+xml" href="logo.png" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Lightrag</title>
<script type="module" crossorigin src="/webui/assets/index-CSLDmoSD.js"></script>
<link rel="stylesheet" crossorigin href="/webui/assets/index-CR7GLPiB.css">
</head>
<body>
<div id="root"></div>
</body>
</html>