71 Commits

Author SHA1 Message Date
Yannick Stephan
ccb117e1c6
Merge pull request #846 from ArnoChenFx/db-connection-and-storage-lifecycle
Refactor Database Connection Management and Improve Storage Lifecycle Handling
2025-02-18 22:39:31 +01:00
ArnoChen
bfc548edf2 change init=False to default=None for db fields to prevent no attribute error 2025-02-19 04:55:59 +08:00
ArnoChen
f50604b2d3 improve conditional checks for db instance 2025-02-19 04:53:15 +08:00
ArnoChen
e194e04226 refactor database connection management and improve storage lifecycle handling
update
2025-02-19 03:49:05 +08:00
Yannick Stephan
2524e02428 remove tqdm and cleaned readme and ollama 2025-02-18 19:58:03 +01:00
Yannick Stephan
46e1865b98 cleanup code 2025-02-18 16:58:11 +01:00
Saifeddine ALOUI
f7ef4c7ee8
Update postgres_impl.py 2025-02-18 16:10:26 +01:00
Saifeddine ALOUI
b4e0c47607
Update postgres_impl.py 2025-02-18 10:29:07 +01:00
Saifeddine ALOUI
fec7889458
Update postgres_impl.py 2025-02-18 10:27:38 +01:00
Saifeddine ALOUI
9b9f989160
Update postgres_impl.py 2025-02-18 10:24:19 +01:00
Saifeddine ALOUI
a15d164d87
Update postgres_impl.py 2025-02-18 10:16:00 +01:00
Saifeddine ALOUI
941c89521c
Debug 2025-02-18 10:12:08 +01:00
Saifeddine ALOUI
becf76a528
Debuggging 2025-02-18 10:07:57 +01:00
Saifeddine ALOUI
8f6f4c249a
Added more drops 2025-02-18 10:01:21 +01:00
Saifeddine ALOUI
f02c881fd3
Added drop for Doc status 2025-02-18 09:57:10 +01:00
Saifeddine ALOUI
6a0366cb24
Fixed indentation bug 2025-02-18 09:39:10 +01:00
Saifeddine ALOUI
f11900451a
Addded drop to postgresql 2025-02-18 09:10:50 +01:00
Yannick Stephan
80272cbf16 fixed edge 2025-02-17 23:20:10 +01:00
Yannick Stephan
66c4b01fdd remove drops unused 2025-02-17 23:16:23 +01:00
Yannick Stephan
49bea486a7 cleaned code 2025-02-16 16:04:35 +01:00
Yannick Stephan
2b2c81a722 added some comments 2025-02-16 16:04:07 +01:00
Yannick Stephan
2bf238396e updated wrong status 2025-02-16 15:52:59 +01:00
Yannick Stephan
a1607bbcb9 Merge remote-tracking branch 'origin/main' into make-clear-what-implemented-or-not
# Conflicts:
#	lightrag/base.py
#	lightrag/kg/json_doc_status_impl.py
#	lightrag/kg/mongo_impl.py
#	lightrag/kg/postgres_impl.py
2025-02-16 15:29:16 +01:00
Yannick Stephan
0e7aff96bb back to not making breaks 2025-02-16 15:08:50 +01:00
Yannick Stephan
9a5fbaaa5f removed unused methods 2025-02-16 14:50:04 +01:00
Yannick Stephan
a0844bca28 cleaned import 2025-02-16 14:45:45 +01:00
Yannick Stephan
3fef8201c6 added final, required methods and cleaned import 2025-02-16 14:38:09 +01:00
ArnoChen
893b645506 unify doc status retrieval with get_docs_by_status 2025-02-16 21:28:58 +08:00
Yannick Stephan
931c31fa8c cleaned code 2025-02-16 13:55:30 +01:00
Yannick Stephan
882190a515 updated clean of what implemented on DocStatusStorage 2025-02-16 13:53:59 +01:00
Yannick Stephan
71a18d1de9 updated clean of what implemented on BaseKVStorage 2025-02-16 13:31:12 +01:00
Yannick Stephan
3eba41aab6 updated clean of what implemented on BaseVectorStorage 2025-02-16 13:24:42 +01:00
yangdx
7017f114e1 Merge branch 'main' into select-datastore-in-api-server 2025-02-13 11:25:52 +08:00
yangdx
76164a1b17 Use namespace for graph_name before falling back to env or default value
- Update graph_name initialization
- Add namespace override support
- Maintain backward compatibility
- Prioritize namespace over env variable
2025-02-13 04:52:54 +08:00
yangdx
ed73ea4076 Fix linting 2025-02-13 04:12:00 +08:00
yangdx
f01f57d0da refactor: make cosine similarity threshold a required config parameter
• Remove default threshold from env var
• Add validation for missing threshold
• Move default to lightrag.py config init
• Update all vector DB implementations
• Improve threshold validation consistency
2025-02-13 03:25:48 +08:00
yangdx
7a89916bab Add method to retrieve in-progress documents in DocStatusStorage
• Add get_processing_docs() abstract method
• Override get_processing_docs() in PG storage
• Method retrieves docs with PROCESSING status
• Keep consistent with existing status methods
2025-02-13 01:27:27 +08:00
yangdx
7c7cac1cfd fix: remove unnecessary param binding, use direct workspace string interpolation 2025-02-13 00:39:40 +08:00
yangdx
3372af7c3d refactor: remove injected db field from PGDocStatusStorage, it must be injected after object is created 2025-02-12 22:54:22 +08:00
yangdx
7b79427097 refactor: improve database initialization by centralizing db instance injection
- Move db configs to separate methods
- Remove db field defaults in storage classes
- Add _initialize_database_if_needed method
- Inject db instances during initialization
- Clean up storage implementation code
2025-02-12 22:25:34 +08:00
yangdx
fc0f522ed5 Merge branch 'main' into select-datastore-in-api-server 2025-02-12 09:49:18 +08:00
ArnoChen
9daab4340c add MongoDocStatusStorage
remove unnecessary logging

format
2025-02-12 04:13:48 +08:00
zrguo
18acb4a2b1 fix linting error 2025-02-11 22:16:35 +08:00
yangdx
8a56a5ea6c fix: Add content column to doc status and fix SQL parameter indexing
• Add content column to doc status table
• Fix SQL param index in get_by_status query
• Update insert SQL to include content field
2025-02-11 16:11:15 +08:00
Brenon
4723e9b535 fix(postgres): update document status with partial update instead of full upsert 2025-02-10 15:05:44 +03:00
Yannick Stephan
6480ddee5d cleaned code 2025-02-09 19:51:05 +01:00
Yannick Stephan
7d63898015 fixed bugs 2025-02-09 19:21:49 +01:00
Yannick Stephan
93717e6705 cleaned code 2025-02-09 15:36:01 +01:00
Yannick Stephan
82481ecf28 cleaned code 2025-02-09 14:55:52 +01:00
Yannick Stephan
4cce14e65e cleaned import 2025-02-09 11:24:08 +01:00