yangdx
48b67d3077
Handle missing WebUI assets gracefully without blocking server startup
...
- Change build check from error to warning
- Redirect to /docs when WebUI unavailable
- Add webui_available to health endpoint
- Only mount /webui if assets exist
- Return status tuple from build check
2025-11-25 02:51:55 +08:00
yangdx
e22ac52ebc
Auto-initialize pipeline status in LightRAG.initialize_storages()
...
• Remove manual initialize_pipeline_status calls
• Auto-init in initialize_storages method
• Update error messages for clarity
• Warn on workspace conflicts
2025-11-17 12:54:33 +08:00
yangdx
52c812b9a0
Fix workspace isolation for pipeline status across all operations
...
- Fix final_namespace error in get_namespace_data()
- Fix get_workspace_from_request return type
- Add workspace param to pipeline status calls
2025-11-17 12:54:33 +08:00
yangdx
926960e957
Refactor workspace handling to use default workspace and namespace locks
...
- Remove DB-specific workspace configs
- Add default workspace auto-setting
- Replace global locks with namespace locks
- Simplify pipeline status management
- Remove redundant graph DB locking
2025-11-17 12:54:33 +08:00
yangdx
e5addf4d94
Improve embedding config priority and add debug logging
...
• Fix embedding_dim priority logic
• Add final config logging
2025-11-17 12:54:32 +08:00
yangdx
6b2af2b579
Refactor embedding function creation with proper attribute inheritance
...
- Extract max_token_size from providers
- Avoid double-wrapping EmbeddingFunc
- Improve configuration priority logic
- Add comprehensive debug logging
- Return complete EmbeddingFunc instance
2025-11-17 12:54:32 +08:00
yangdx
14a6c24ed7
Add configurable embedding token limit with validation
...
- Add EMBEDDING_TOKEN_LIMIT env var
- Set max_token_size on embedding func
- Add token limit property to LightRAG
- Validate summary length vs limit
- Log warning when limit exceeded
2025-11-17 12:54:32 +08:00
yangdx
7b7f93d77c
Implement lazy configuration initialization for API server
...
• Add lazy config initialization
• Maintain backward compatibility
• Support programmatic usage
• Add gunicorn dependency
• Explicit config in entry points
2025-11-17 12:54:32 +08:00
BukeLy
18a4870229
fix: Add default workspace support for backward compatibility
...
Fixes two compatibility issues in workspace isolation:
1. Problem: lightrag_server.py calls initialize_pipeline_status()
without workspace parameter, causing pipeline to initialize in
global namespace instead of rag's workspace.
Solution: Add set_default_workspace() mechanism in shared_storage.
LightRAG.initialize_storages() now sets default workspace, which
initialize_pipeline_status() uses when called without parameters.
2. Problem: /health endpoint hardcoded to use "pipeline_status",
cannot return workspace-specific status or support frontend
workspace selection.
Solution: Add LIGHTRAG-WORKSPACE header support. Endpoint now
extracts workspace from header or falls back to server default,
returning correct workspace-specific pipeline status.
Changes:
- lightrag/kg/shared_storage.py: Add set/get_default_workspace()
- lightrag/lightrag.py: Call set_default_workspace() in initialize_storages()
- lightrag/api/lightrag_server.py: Add get_workspace_from_request() helper,
update /health endpoint to support LIGHTRAG-WORKSPACE header
Testing:
- Backward compatibility: Old code works without modification
- Multi-instance safety: Explicit workspace passing preserved
- /health endpoint: Supports both default and header-specified workspaces
Related: #2353
2025-11-17 12:54:20 +08:00
yangdx
a624a9508a
Add Gemini to APIs requiring embedding dimension parameter
2025-11-08 03:54:50 +08:00
yangdx
de4ed73652
Add Gemini embedding support
...
- Implement gemini_embed function
- Add gemini to embedding binding choices
- Add L2 normalization for dims < 3072
2025-11-08 03:34:30 +08:00
yangdx
0b2a15c452
Centralize embedding_send_dim config through args instead of env var
2025-11-08 01:52:23 +08:00
yangdx
03cc6262c4
Prohibit direct access to internal functions of EmbeddingFunc.
...
• Fix similarity search error in query stage
• Remove redundant null checks
• Improve log readability
2025-11-08 01:43:36 +08:00
yangdx
d95efcb9ad
Fix linting
2025-11-07 21:27:54 +08:00
yangdx
ce28f30ca6
Add embedding_dim parameter support to embedding functions
...
• Pass embedding_dim to jina_embed call
• Pass embedding_dim to openai_embed call
2025-11-07 21:23:59 +08:00
yangdx
c14f25b7f8
Add mandatory dimension parameter handling for Jina API compliance
2025-11-07 21:08:34 +08:00
yangdx
d8a6355e41
Merge branch 'main' into apply-dim-to-embedding-call
2025-11-07 20:48:22 +08:00
yangdx
33a1482f7f
Add optional embedding dimension parameter control via env var
...
* Add EMBEDDING_SEND_DIM environment variable
* Update Jina/OpenAI embed functions
* Add send_dimensions to EmbeddingFunc
* Auto-inject embedding_dim when enabled
* Add parameter validation warnings
2025-11-07 20:46:40 +08:00
yangdx
fc40a36968
Add timeout support to Gemini LLM and improve parameter handling
...
• Add timeout parameter to Gemini client
• Convert timeout seconds to milliseconds
• Update function signatures consistently
• Add Gemini thinking config example
• Clean up parameter documentation
2025-11-07 15:50:14 +08:00
yangdx
6e36ff41e1
Fix linting
2025-11-06 16:01:24 +08:00
yangdx
5f49cee20f
Merge branch 'main' into VOXWAVE-FOUNDRY/main
2025-11-06 15:37:35 +08:00
yangdx
7ccc1fdd27
Add frontend rebuild warning indicator to version display
...
- Return bool from check_frontend_build()
- Add ⚠️ symbol to outdated versions
- Show tooltip with rebuild message
- Add translations for warning text
- Fix tailwind config filename typo
2025-10-31 06:09:46 +08:00
yangdx
d5bcd14c6f
Refactor service deployment to use direct process execution
...
- Remove bash wrapper script
- Update systemd service configuration
- Improve process management for gunicorn
- Simplify shared storage cleanup logic
- Update documentation for deployment
2025-10-29 18:55:47 +08:00
yangdx
6489aaa7f0
Remove worker_exit hook and improve cleanup logging
...
• Remove unreliable worker_exit function
• Add debug logs for cleanup modes
• Move DEBUG_LOCKS to top of file
2025-10-29 15:15:13 +08:00
yangdx
4a46d39c93
Replace GUNICORN_CMD_ARGS with custom LIGHTRAG_GUNICORN_MODE flag
...
• Use custom env var for mode detection
• Improve Gunicorn mode reliability
2025-10-29 14:06:03 +08:00
yangdx
816feefd84
Fix cleanup coordination between Gunicorn and UvicornWorker lifecycles
...
• Document UvicornWorker hook limitations
• Add GUNICORN_CMD_ARGS cleanup guard
• Prevent double cleanup in workers
2025-10-29 13:53:46 +08:00
yangdx
72b29659c9
Fix worker process cleanup to prevent shared resource conflicts
...
• Add worker_exit hook in gunicorn config
• Add shutdown_manager parameter in finalize_share_data of share_storage
• Prevent Manager shutdown in workers
• Remove custom signal handlers
2025-10-29 13:33:21 +08:00
yangdx
88d12beae2
Add offline Swagger UI support with custom static file serving
...
- Disable default docs URL
- Add custom /docs endpoint
- Mount static Swagger UI files
- Include OAuth2 redirect handler
- Support offline documentation access
2025-10-28 02:23:08 +08:00
Humphry
0b3d31507e
extended to use gemini, sswitched to use gemini-flash-latest
2025-10-20 13:17:16 +03:00
yangdx
012aaada22
Update Swagger API key status description text
2025-10-18 09:40:44 +08:00
yangdx
46ac5dac53
Improve API description formatting and add ReDoc link
2025-10-17 16:24:01 +08:00
yangdx
f45dce347a
Fix cache control error of index.html
...
• Retrun no-cache for all HTML responses not just .html files
• Prevent force browser refresh action after front-end rebuild
2025-10-17 12:43:04 +08:00
yangdx
64900b5457
Add frontend source code update warning
...
- Add frontend freshness check logic
- Warn when rebuild needed
- Remove --production from install docs
2025-10-14 10:59:21 +08:00
yangdx
a8bbce3ae7
Use frozen lockfile for consistent frontend builds
2025-10-14 03:34:55 +08:00
yangdx
ee45ab5104
Move frontend build check from setup.py to runtime server startup
...
• Remove complex setup.py build checks
• Add runtime frontend validation
• Update install docs with uv/bun steps
• Simplify setup.py to minimal form
• Check webui before server starts
2025-10-14 02:21:26 +08:00
yangdx
5eb4a4b799
feat: simplify citations, add reference merging, and restructure API response format
2025-09-24 14:30:10 +08:00
yangdx
6b953fa53d
Remove auto-scan-at-startup feature and related documentation
...
• Remove --auto-scan-at-startup arg
• Delete auto scan docs sections
• Remove startup scanning logic
2025-09-23 16:24:53 +08:00
yangdx
a1df76a4ea
Optimize LLM/embedding config caching to reduce repeated parsing overhead
...
• Add LLMConfigCache class for smart caching
• Pre-process OpenAI/Ollama configurations
• Create optimized function factories
• Reduce redundant option parsing calls
2025-09-05 16:36:08 +08:00
yangdx
ae09b5c656
refactor: eliminate conditional imports and simplify LightRAG initialization
...
- Remove conditional import block, replace with lazy loading factory functions
- Add create_llm_model_func() and create_llm_model_kwargs() for clean configuration
- Update wrapper functions with lazy imports for better performance
- Unify LightRAG initialization, eliminating duplicate conditional branches
- Reduce code complexity by 33% while maintaining full backward compatibility
2025-08-31 00:18:29 +08:00
yangdx
332202c111
Fix lambda closure bug in embedding function configuration
...
• Replace lambda with proper async function
• Capture config values at creation time
• Avoid closure variable reference issues
• Add factory function for embeddings
• Remove test file for closure bug
2025-08-30 23:43:34 +08:00
avchauzov
414d47d12a
fix(server): Resolve lambda closure bug in embedding_func
...
Fixes #2023 . Resolves an issue where the embedding function would incorrectly fall back to the OpenAI provider if the server's configuration arguments were mutated after initialization. This was caused by a lambda function capturing a reference to the mutable 'args' object instead of capturing the configuration values at creation time.
2025-08-30 14:43:33 +02:00
yangdx
925e631a9a
refac: Add robust time out handling for LLM request
2025-08-29 13:50:35 +08:00
yangdx
ff0a18e08c
Unify SUMMARY_LANGUANGE and ENTITY_TYPES implementation method
2025-08-27 12:23:22 +08:00
Thibo Rosemplatt
c3aabfc251
Merge branch 'main' into entityTypesServerSupport
2025-08-26 21:48:20 +02:00
yangdx
cb0fe38b9a
Fix linting
2025-08-26 02:22:34 +08:00
yangdx
de2daf6565
refac: Rename summary_max_tokens to summary_context_size, comprehensive parameter validation for summary configuration
...
- Update algorithm logic in operate.py for better token management
- Fix health endpoint to use correct parameter names
2025-08-26 01:35:50 +08:00
Thibo Rosemplatt
f5938f76bc
Azure OpenAI requires import of OpenAILLMOptions (missing)
2025-08-24 00:28:49 +02:00
Thibo Rosemplatt
d054ec5d00
Added entity_types as a user defined variable (via .env)
2025-08-23 20:16:11 +02:00
yangdx
1be9a54c8d
Rename ENABLE_RERANK to RERANK_BY_DEFAULT and update default to true
2025-08-23 09:46:51 +08:00
yangdx
47485b130d
refac(ui): Show rerank binding info on status card
...
- Remove separate ENABLE_RERANK flag in favor of rerank_binding="null"
- Change default rerank binding from "cohere" to "null" (disabled)
- Update UI to display both rerank binding and model information
2025-08-23 02:04:14 +08:00