301 Commits

Author SHA1 Message Date
yangdx
598eecd06d Refactor: Rename llm_model_max_token_size to summary_max_tokens
This commit renames the parameter 'llm_model_max_token_size' to 'summary_max_tokens' for better clarity, as it specifically controls the token limit for entity relation summaries.
2025-07-28 00:49:08 +08:00
yangdx
d0d57a45b6 feat: add environment variables to /health endpoint and centralize defaults
- Add 9 environment variables to /health endpoint configuration section
- Centralize default constants in lightrag/constants.py for consistency
- Update config.py to use centralized defaults for better maintainability
2025-07-28 00:30:56 +08:00
yangdx
2767212ba0 Fix linting 2025-07-24 12:25:50 +08:00
yangdx
d979e9078f feat: Integrate Jina embeddings API support
- Implemented Jina embedding function
- Add new EMBEDDING_BINDING type of jina for LightRAG Server
- Add env var sample
2025-07-24 12:15:00 +08:00
yangdx
cb3bf3291c Fix: rename rerank parameter from top_k to top_n
The change aligns with the API parameter naming used by Jina and Cohere rerank services, ensuring consistency and clarity.
2025-07-20 00:26:27 +08:00
zrguo
7c882313bb remove chunk_rerank_top_k 2025-07-15 11:52:34 +08:00
yangdx
b03bb48e24 feat: Refine summary logic and add dedicated Ollama num_ctx config
- Refactor the trigger condition for LLM-based summarization of entities and relations. Instead of relying on character length, the summary is now triggered when the number of merged description fragments exceeds a configured threshold. This provides a more robust and logical condition for consolidation.
- Introduce the `OLLAMA_NUM_CTX` environment variable to explicitly configure the context window size (`num_ctx`) for Ollama models. This decouples the model's context length from the `MAX_TOKENS` parameter, which is now specifically used to limit input for summary generation, making the configuration clearer and more flexible.
- Updated `README` files, `env.example`, and default values to reflect these changes.
2025-07-14 01:55:04 +08:00
yangdx
0e3aaa318f Feat: Add keyed lock cleanup and status monitoring 2025-07-13 00:09:00 +08:00
zrguo
d4651d59c1 Add rerank to server 2025-07-08 21:44:20 +08:00
yangdx
ef79088f60 Move max_graph_nodes to global config 2025-07-07 21:53:57 +08:00
yangdx
db22cad2c8 feat: add workspace and MAX_GRAPH_NODES to /health endpoint and webui 2025-07-07 01:39:48 +08:00
yangdx
033098c1bc Feat: Add WORKSPACE support to all storage types 2025-07-07 00:57:21 +08:00
yangdx
c18065a912 Disable document deletion when LLM cache for extraction is off 2025-06-23 22:41:27 +08:00
yangdx
85bed30764 Fix linting 2025-05-21 16:46:36 +08:00
yangdx
45cebc71c5 Refactor: Optimize static file caching for WebUI
- Renamed `NoCacheStaticFiles` to `SmartStaticFiles`.
- Implemented long-term caching (1 year, immutable) for versioned assets in `/webui/assets/`.
- Ensured `index.html` remains un-cached.
- Set correct `Content-Type` for JS and CSS files.
2025-05-21 16:46:18 +08:00
yangdx
0961a21722 Set correct Content-Type header for JavaScript files
• Fix missing Content-Type header for .js files
• Ensure proper MIME type handling
• Improve browser compatibility
2025-05-21 16:17:42 +08:00
yangdx
4d57370c94 Refactor: Move get_env_value from api.config to utils
Relocates the `get_env_value` utility function
from `lightrag.api.config` to `lightrag.utils` to decouple
LightRAG core from API Server
2025-05-10 08:58:18 +08:00
yangdx
c8ecfa2d68 feat: Centralize configuration and update defaults
This commit introduces `lightrag/constants.py` to centralize default values for various configurations across the API and core components.

Key changes:
- Added `constants.py` to centralize default values
- Improved the `get_env_value` function in `api/config.py` to correctly handle string "None" as a None value and to catch `TypeError` during value conversion.
- Updated the default `SUMMARY_LANGUAGE` to "English"
- Set default `WORKERS` to 2
2025-05-06 22:00:43 +08:00
yangdx
e7063b5f1e Remove embedding_cache_config 2025-04-22 00:28:17 +08:00
yangdx
37007244c2 Add ENABLE_LLM_CACHE env support 2025-04-09 12:42:17 +08:00
yangdx
8675e4dc6f Remove api tag from swagger 2025-04-09 11:52:11 +08:00
yangdx
299c508f27 Fix webtitle display problem 2025-04-05 02:24:23 +08:00
yangdx
d5da79892f Add webui title to api server 2025-04-04 21:43:52 +08:00
yangdx
caac0479d3 Fix linting 2025-04-04 21:34:13 +08:00
yangdx
95630aa669 Centralize env reading 2025-04-04 21:06:21 +08:00
yangdx
bd2c528dba Merge branch 'optimize-config-management' into clear-doc 2025-04-04 19:46:45 +08:00
Milin
4dbd5e3899 Merge branch 'main' into optimize-config-management
# Conflicts:
#	env.example
#	lightrag/api/utils_api.py
2025-03-31 11:29:29 +08:00
Milin
088fc19318 feat(config): Refactor configuration management
- Optimize JWT Auth module to load configuration via `global_args`.
- Decouple configuration-related code from `utils_api.py`, and add a new `config.py` file for unified configuration management.
- Adjust configuration import in `lightrag_server.py`, `auth.py`, and `document_routes.py` to be introduced through `global_args`.
2025-03-31 11:19:47 +08:00
yangdx
6a51f38cae Remove namespace_prefix from PostgreSQL, maintain consistency with other storage implementation 2025-03-31 02:59:44 +08:00
yangdx
c590d5878c refactor: standardize .env loading behavior across modules
- Use .env from current folder for each lightrag instance
- Allow different .env files for different instances
- Make OS env vars take precedence over .env file
2025-03-29 03:37:23 +08:00
yangdx
affc313a88 Fix linting 2025-03-27 13:26:18 +08:00
yangdx
987cb585e7 fix: auth_mode error in health check end point
- Change AUTH_USERNAME/PASSWORD to AUTH_ACCOUNTS format
- Update docs for new auth configuration
2025-03-27 13:24:14 +08:00
yangdx
d83ae39541 feat: add .env file check on startup
- Show warning if .env is missing
- For CLI startup: prompt for user confirmation
- For service startup: display warning only
2025-03-26 21:08:24 +08:00
yangdx
46f5c5b47f Fix linting 2025-03-26 17:30:06 +08:00
yangdx
1030068459 feat(health-check): add pipeline busy status to health endpoint 2025-03-26 12:41:49 +08:00
Saifeddine ALOUI
2333958a6b upgraded to use current folder's .env if present 2025-03-25 13:45:51 +01:00
Milin
23004546dc Merge branch 'main' 2025-03-25 15:57:14 +08:00
Milin
4dfdb9032c feat(auth): Implement multi-user login support
- Add an `accounts` dictionary in `AuthHandler` to store multiple user account information.
- Modify login logic to support multiple user account verification.
- Update environment variable example, add description for `AUTH_ACCOUNTS` variable.
- Adjust authentication status check logic, use `auth_handler.accounts` to determine if authentication is configured.
2025-03-24 14:34:31 +08:00
yangdx
d05cf286f4 Fix linting 2025-03-24 14:30:17 +08:00
yangdx
9e3994419e Refactor authentication logic and Swagger UI config
- Consolidate authentication dependencies
- Improve Swagger UI security parameters
2025-03-24 14:29:36 +08:00
yangdx
77ab26e5bf Fix linting 2025-03-24 05:39:50 +08:00
yangdx
071302d10f Moved update status logic to document routes.
- Removed update status from health check endpoint
- Added update_status field to PipelineStatusResponse
2025-03-24 05:37:03 +08:00
yangdx
90ef55960d Refactor authentication and whitelist handling
- Combined auth and API key dependencies
- Optimized whitelist path matching
- Added optional API key to OllamaAPI
2025-03-24 05:23:40 +08:00
yangdx
8301f0a523 Move temperature parameter into kwargs for LLM calls
- Applied changes to both OpenAI and Azure OpenAI calls
2025-03-24 03:03:55 +08:00
yangdx
7e8a2c0e9b Added temperature parameter for LLM 2025-03-24 02:02:34 +08:00
yangdx
a444edd9eb Added auth mode status to health check endpoint.
- Introduced auth_mode in health check response
- Updated App.tsx to handle guest mode logic
2025-03-23 02:43:44 +08:00
yangdx
ba07ec86a5 Fix linting 2025-03-23 00:30:18 +08:00
yangdx
31c7923067 Added core and API version to health check
- Bumped API version to 1.2.2
2025-03-23 00:28:50 +08:00
yangdx
0df0ba269d Implemented version display in SiteHeader of webui
- Updated API version to 1.2.0
- Stored versions in localStorage
2025-03-22 01:51:39 +08:00
yangdx
67eee2d2d5 Prioritize OS environment variables over .env file to improve Docker compatibility for the server 2025-03-21 13:27:12 +08:00