4593 Commits

Author SHA1 Message Date
yangdx
e5e3f0f878 Fix(Ollama option): change stop option from string to list and add fallback global temperature setting 2025-08-04 19:43:14 +08:00
yangdx
f8a880ac66 Improved binding options testing and documentation 2025-08-04 18:21:55 +08:00
yangdx
7b3a9c09ca Fix: add missing colume to LLM cache of PostgreSQL implementation 2025-08-04 11:12:59 +08:00
yangdx
223f4cdf62 Mark deprecated fields with TODO comments 2025-08-04 11:11:57 +08:00
yangdx
3bac19df5a Bump core version to 1.4.7 and api version to 0198 2025-08-04 10:55:41 +08:00
yangdx
63496698a1 Fix: ensure data migration is handled by single-process
- Wrap migration logic with get_data_init_lock() to ensure single-process execution
- Prevent race conditions when multiple processes start simultaneously
v1.4.6
2025-08-04 01:47:20 +08:00
yangdx
e04d8ed8a7 Improved storage drop logging with namespace details
- Added namespace and workspace to drop logs
2025-08-04 00:56:39 +08:00
Daniel.y
7de0276a57
Merge pull request #1904 from HKUDS/optimize-doc-delete
feat(performance): Optimize Document Deletion with Entity/Relation Indexing
2025-08-04 00:39:02 +08:00
yangdx
5513155808 Fix namespace tablename translate error
- Reorder namespace table map for PostgreSQL
- Ensure specific namespaces come first
2025-08-04 00:21:20 +08:00
yangdx
daf2633dc2 Bump api version to 0198 2025-08-03 23:04:42 +08:00
yangdx
2f1d1b69e5 Bump api version to 0197 2025-08-03 23:03:48 +08:00
yangdx
7505195303 fix: add full_entities and full_relations to clear_documents storage list 2025-08-03 23:02:58 +08:00
yangdx
952d1feb07 feat: Add support for KV_STORE_FULL_ENTITIES and KV_STORE_FULL_RELATIONS namespaces in PGKVStorage
- Add LIGHTRAG_FULL_ENTITIES and LIGHTRAG_FULL_RELATIONS table schemas
- Implement complete CRUD operations for both namespaces
- Add automatic table creation and migration support
- Add SQL templates and namespace mappings
- Ensure workspace isolation and proper indexing
2025-08-03 22:54:56 +08:00
yangdx
bf9a6d699b Fix(lightrag): Handle undirected edges in data migration
The `_migrate_entity_relation_data` function previously processed directed edges from `get_all_edges`, which could lead to duplicates (e.g., (A,B) and (B,A)) and an incorrect relation count.

This commit normalizes edges by sorting their source and target nodes before adding them to the relation set. This ensures all edges are treated as undirected and are properly deduplicated.
2025-08-03 22:14:24 +08:00
yangdx
e8d8afa846 Removed auto storage management from LightRAG instance creation
- The `initialize_storages` method must be explicitly called after LightRAG creation.
The `finalize_storages` method should be called before LightRAG destyoyed.
- Added explicit data migration check
2025-08-03 12:42:57 +08:00
yangdx
06efab4af2 Revert "Remove auto_manage_storages_states option"
This reverts commit bfe6657b316f7e50bc9c5f0cc71d9fbb2b605ddd.
2025-08-03 12:12:13 +08:00
yangdx
d2dd137f83 feat: implement get_all_nodes and get_all_edges methods for graph storage backends
Add get_all_nodes() and get_all_edges() methods to Neo4JStorage, PGGraphStorage, MongoGraphStorage, and MemgraphStorage classes. These methods return all nodes and edges in the graph with consistent formatting matching NetworkXStorage for compatibility across different storage backends.
2025-08-03 11:02:37 +08:00
yangdx
bfe6657b31 Remove auto_manage_storages_states option
- Always manage storage states by LightRAG
- Remove rag.initialize_storages() from all examples
2025-08-03 10:29:36 +08:00
yangdx
091f2b42c3 feat(performance): Optimize document deletion with entity/relation index
- Introduces an index mapping documents to their corresponding entities and relations. This significantly speeds up `adelete_by_doc_id` by replacing slow graph traversal with a fast key-value lookup.
- Refactors the ingestion pipeline (`merge_nodes_and_edges`) to populate this new index. Adds a one-time data migration script to backfill the index for existing data.
2025-08-03 09:19:02 +08:00
yangdx
2f0aa7ed12 Optimize graph query by simplifying MATCH pattern
- Simplify MATCH clause to ()-[r]-()
- Remove node type constraints
- Improve query performance
2025-08-02 12:54:22 +08:00
Daniel.y
a417f7c168
Merge pull request #1899 from danielaskdd/kv-storage-workspace
Fix: workspace isolation problem for json KV storage
2025-08-02 11:36:20 +08:00
yangdx
e00690b41b Fix: workspace isolation problem for json KV storage
- Use workspace+namespace as final_namespace identifier
- Update all related storage operations
- Maintain backward compatibility
2025-08-02 11:30:19 +08:00
Daniel.y
f6b90fe482
Merge pull request #1897 from danielaskdd/json-repair
refactor: improve JSON parsing reliability with json-repair library
2025-08-01 20:15:44 +08:00
yangdx
d98fe6f340 Move json-repair to main dependencies 2025-08-01 19:59:39 +08:00
yangdx
32af45ff46 refactor: improve JSON parsing reliability with json-repair library
Replace regex-based JSON extraction with json-repair for better handling of malformed LLM responses. Remove deprecated JSON parsing utilities and clean up keyword_extraction parameter across LLM providers.

- Remove locate_json_string_body_from_string() and convert_response_to_json()
- Use json-repair.loads() in extract_keywords_only() for robust parsing
- Clean up LLM interfaces and remove unused parameters
- Add json-repair dependency
2025-08-01 19:36:20 +08:00
Daniel.y
3ae9c63b26
Merge pull request #1895 from danielaskdd/finalize-on-exit
Add graceful shutdown handling for LightRAG server
2025-08-01 12:12:40 +08:00
yangdx
fdf051c234 Add graceful shutdown handling for LightRAG server
- Setup signal handlers for SIGINT/SIGTERM
- Clean up shared resources on shutdown
- Finalize shared data storage
2025-08-01 10:56:18 +08:00
yangdx
790abf148b Add psutil to API dependencies 2025-08-01 10:55:43 +08:00
yangdx
0f624b594a Update webui assets 2025-07-31 23:53:23 +08:00
yangdx
317d233486 Improve select dropdown styling in query settings 2025-07-31 23:52:44 +08:00
Daniel.y
b7ec76e548
Merge pull request #1893 from danielaskdd/fix-core-depend-api
Fix: move OllamaServerInfos class to base module
2025-07-31 23:33:34 +08:00
yangdx
043e1376b3 Bump core version to v1.4.6 and api version to 0196 2025-07-31 23:27:31 +08:00
yangdx
8271e1f6f1 Move OllamaServerInfos class to base module
- Eliminate dependency of the core module on the API module.
2025-07-31 23:24:49 +08:00
Daniel.y
364ae2340d
Merge pull request #1891 from danielaskdd/fix-file-path-error
fix: Add safe handling for missing file_path in PostgreSQL
v1.4.5
2025-07-31 18:11:52 +08:00
yangdx
9a8f58826d fix: Add safe handling for missing file_path and metadata in PostgreSQL doc status functions
- Add null-safe file_path handling with "no-file-path" fallback in get_docs_by_status and get_docs_by_track_id
- Enhance metadata validation to ensure dict type after JSON parsing
- Align PostgreSQL implementation with JSON implementation safety patterns
- Prevent KeyError exceptions when database records have missing fields
2025-07-31 18:07:53 +08:00
yangdx
9d5603d35e Set the default LLM temperature to 1.0 and centralize constant management 2025-07-31 17:15:10 +08:00
yangdx
3c530b21b6 Update README 2025-07-31 13:00:09 +08:00
Daniel.y
9b63a89054
Merge pull request #1889 from danielaskdd/query-param-ui
Refac: add query param reset buttons to webui
2025-07-31 12:38:47 +08:00
yangdx
d3f1ea96de Update webui assets 2025-07-31 12:30:23 +08:00
yangdx
a59f8e7ceb Add reset buttons to query settings controls
- Add reset functionality for all settings
- Include default values for each setting
2025-07-31 12:29:26 +08:00
yangdx
c6bd9f0329 Disable conversation history by default
- Set default history_turns to 0
- Mark history_turns as deprecated
- Remove history_turns from example
- Update documentation comments
2025-07-31 12:28:42 +08:00
yangdx
755a08edec Remove History Turns config option and force value to 0
- Remove History Turns UI component from QuerySettings
- Update settings store version to 17 with migration
- Force history_turns parameter to always be 0 in queries
- Prevent future modifications to history_turns setting
2025-07-31 11:22:48 +08:00
yangdx
5b8989e4d9 Update webui assets 2025-07-31 03:47:35 +08:00
yangdx
47002e645b fix: resolve quick refresh after clearing documents in DocumentManager
- Fix handleDocumentsCleared to use proper 30s idle interval instead of 500ms
- Update smart polling useEffect to depend on complete statusCounts object
- Reset status counts immediately when documents are cleared
2025-07-31 03:45:11 +08:00
Daniel.y
5e2b262094
Merge pull request #1886 from danielaskdd/doc-list-paging
Feat: add document list pagination for webui
2025-07-31 03:05:54 +08:00
yangdx
41de51a4db fix: add missing await in MongoDB get_all_status_counts aggregation
Resolves 'coroutine' object has no attribute 'to_list' error in document pagination endpoint by adding missing await keyword before self._data.aggregate() call.
2025-07-31 02:27:16 +08:00
yangdx
2af8a93dc7 fix: resolve _sort_key error in Redis get_docs_paginated function 2025-07-31 02:16:56 +08:00
yangdx
d0bc5e7c4a Extend path filter to also cover POST requests 2025-07-31 02:06:56 +08:00
yangdx
5282312c64 Update webui assets 2025-07-31 02:01:50 +08:00
yangdx
78b4ff2d0b Bump api version to 0195 2025-07-31 02:00:26 +08:00