diff --git a/lightrag/api/utils_api.py b/lightrag/api/utils_api.py index cc0d1341..32a453bf 100644 --- a/lightrag/api/utils_api.py +++ b/lightrag/api/utils_api.py @@ -8,7 +8,6 @@ from typing import Optional, List, Tuple import sys from ascii_colors import ASCIIColors import logging -from ascii_colors import ASCIIColors from lightrag.api import __api_version__ from fastapi import HTTPException, Security, Request, status from dotenv import load_dotenv @@ -17,15 +16,18 @@ from starlette.status import HTTP_403_FORBIDDEN from .auth import auth_handler from ..prompt import PROMPTS + def check_env_file(): """ Check if .env file exists and handle user confirmation if needed. Returns True if should continue, False if should exit. """ if not os.path.exists(".env"): - warning_msg = "Warning: .env file not found. Some features may not work properly." + warning_msg = ( + "Warning: .env file not found. Some features may not work properly." + ) ASCIIColors.yellow(warning_msg) - + # Check if running in interactive terminal if sys.stdin.isatty(): response = input("Do you want to continue? (yes/no): ") @@ -34,6 +36,7 @@ def check_env_file(): return False return True + # Load environment variables load_dotenv() diff --git a/lightrag/utils.py b/lightrag/utils.py index e493ea02..07f8c4b7 100644 --- a/lightrag/utils.py +++ b/lightrag/utils.py @@ -75,7 +75,12 @@ class LightragPathFilter(logging.Filter): def __init__(self): super().__init__() # Define paths to be filtered - self.filtered_paths = ["/documents", "/health", "/webui/"] + self.filtered_paths = [ + "/documents", + "/health", + "/webui/", + "/documents/pipeline_status", + ] # self.filtered_paths = ["/health", "/webui/"] def filter(self, record): diff --git a/lightrag_webui/src/features/DocumentManager.tsx b/lightrag_webui/src/features/DocumentManager.tsx index e66066fe..3b4bc933 100644 --- a/lightrag_webui/src/features/DocumentManager.tsx +++ b/lightrag_webui/src/features/DocumentManager.tsx @@ -284,7 +284,7 @@ export default function DocumentManager() {