Merge branch 'main' into edit-node

This commit is contained in:
choizhang
2025-04-13 11:51:55 +08:00
25 changed files with 241 additions and 251 deletions

View File

@@ -102,6 +102,10 @@ lightrag-gunicorn --workers 4
- `--log-level`日志级别默认INFO
- --input-dir指定要扫描文档的目录默认./input
> ** 要求将.env文件置于启动目录中是经过特意设计的**。 这样做的目的是支持用户同时启动多个LightRAG实例并为不同实例配置不同的.env文件。
> **修改.env文件后您需要重新打开终端以使新设置生效**。 这是因为每次启动时LightRAG Server会将.env文件中的环境变量加载至系统环境变量且系统环境变量的设置具有更高优先级。
### 启动时自动扫描
当使用 `--auto-scan-at-startup` 参数启动任何服务器时,系统将自动:

View File

@@ -106,6 +106,8 @@ Here are some commonly used startup parameters:
> The requirement for the .env file to be in the startup directory is intentionally designed this way. The purpose is to support users in launching multiple LightRAG instances simultaneously, allowing different .env files for different instances.
> **After changing the .env file, you need to open a new terminal to make the new settings take effect.** This because the LightRAG Server will load the environment variables from .env into the system environment variables each time it starts, and LightRAG Server will prioritize the settings in the system environment variables.
### Auto scan on startup
When starting any of the servers with the `--auto-scan-at-startup` parameter, the system will automatically:

View File

@@ -1 +1 @@
__api_version__ = "0146"
__api_version__ = "0148"

View File

@@ -499,7 +499,10 @@ async def pipeline_enqueue_file(rag: LightRAG, file_path: Path) -> bool:
content = result.document.export_to_markdown()
else:
if not pm.is_installed("python-docx"): # type: ignore
pm.install("docx")
try:
pm.install("python-docx")
except Exception:
pm.install("docx")
from docx import Document # type: ignore
from io import BytesIO

View File

@@ -308,7 +308,7 @@ class OllamaAPI:
"Cache-Control": "no-cache",
"Connection": "keep-alive",
"Content-Type": "application/x-ndjson",
"X-Accel-Buffering": "no", # 确保在Nginx代理时正确处理流式响应
"X-Accel-Buffering": "no", # Ensure proper handling of streaming responses in Nginx proxy
},
)
else:

View File

@@ -22,7 +22,7 @@ class QueryRequest(BaseModel):
description="The query text",
)
mode: Literal["local", "global", "hybrid", "naive", "mix"] = Field(
mode: Literal["local", "global", "hybrid", "naive", "mix", "bypass"] = Field(
default="hybrid",
description="Query mode",
)

File diff suppressed because one or more lines are too long

View File

@@ -8,7 +8,7 @@
<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-DSVCuARS.js"></script>
<script type="module" crossorigin src="/webui/assets/index-CkwV8nfm.js"></script>
<link rel="stylesheet" crossorigin href="/webui/assets/index-CTB4Vp_z.css">
</head>
<body>