zrguo
|
1c7247c5ab
|
Merge pull request #142 from yrangana/fix/status-case-mismatch-enum
Fix status comparison case mismatch in processor.py
|
2025-10-20 15:46:31 +08:00 |
|
Yasiru Rangana
|
e70cf8d38a
|
fix: use DocStatus.PROCESSED enum instead of hardcoded uppercase string
## Problem
Status comparisons used hardcoded uppercase string "PROCESSED" which
didn't match LightRAG's DocStatus enum that stores lowercase "processed".
This caused text_processed to always return False even when documents
were successfully processed.
**Evidence:**
- LightRAG's DocStatus enum (lightrag/base.py): PROCESSED = "processed"
- RAGAnything's DocStatus enum (raganything/base.py:11): PROCESSED = "processed"
- Current code checked: doc_status == "PROCESSED" (uppercase) ❌
- Actual value from LightRAG: "processed" (lowercase) ✓
**Impact:**
- is_document_fully_processed() always returned False
- get_document_processing_status() showed text_processed as False
- Multimodal processing logic incorrectly detected status
## Solution
Replace hardcoded string literals with DocStatus.PROCESSED enum constant
(already imported at line 14).
**Changes:**
- Line 481: doc_status == "PROCESSED" → DocStatus.PROCESSED
- Line 486: doc_status == "PROCESSED" → DocStatus.PROCESSED
- Line 1355: doc_status.get("status") == "PROCESSED" → DocStatus.PROCESSED
- Line 1387: doc_status.get("status") == "PROCESSED" → DocStatus.PROCESSED
- Updated comments (lines 463, 478) for consistency
**Benefits:**
1. ✅ Fixes case mismatch bug - enum auto-converts to lowercase
2. ✅ Type-safe - IDE/linter catches errors
3. ✅ Maintainable - single source of truth (no magic strings)
4. ✅ Future-proof - if enum changes, code updates automatically
5. ✅ Follows Python best practices
**Compatibility:**
- Works with LightRAG v1.4.9.2+
- Compatible with LightRAG v1.4.9.3 (which added PREPROCESSED status)
- No breaking changes
**References:**
- LightRAG DocStatus: lightrag/base.py
- RAGAnything DocStatus: raganything/base.py:11
- Related: LightRAG v1.4.9.3 added PREPROCESSED = "multimodal_processed"
|
2025-10-19 23:36:54 +11:00 |
|
zrguo
|
8079053506
|
Update README_zh.md
|
2025-10-16 14:53:16 +08:00 |
|
zrguo
|
e6af42be94
|
Update README.md
|
2025-10-16 14:49:16 +08:00 |
|
zrguo
|
e7273346e1
|
fix lint
|
2025-10-15 14:38:57 +08:00 |
|
zrguo
|
3c5c3fa3d5
|
Update Citation
|
2025-10-15 14:23:54 +08:00 |
|
chaohuang-ai
|
9207cbed46
|
Update README.md
|
2025-10-15 10:57:22 +08:00 |
|
chaohuang-ai
|
ba464f459a
|
Update README.md
|
2025-10-15 10:56:30 +08:00 |
|
zrguo
|
806ac9ba3e
|
Merge pull request #122 from LaansDole/main
feat: RAG-Anything runs offline
|
2025-10-13 10:56:37 +08:00 |
|
laansdole
|
ab552321ae
|
chores: refactor examples
|
2025-10-04 21:27:41 +07:00 |
|
laansdole
|
0f6d3ea83a
|
feat: implement tiktoken env variables
|
2025-10-04 21:26:59 +07:00 |
|
laansdole
|
10ee99952a
|
docs: update decision records
|
2025-10-04 21:25:53 +07:00 |
|
Do Le Long An
|
0ac3dc6bf7
|
Merge branch 'HKUDS:main' into main
|
2025-09-26 15:30:13 +07:00 |
|
chaohuang-ai
|
1e0568543f
|
Update README.md
|
2025-09-25 09:34:30 +08:00 |
|
laansdole
|
8757265825
|
chores: refactor
|
2025-09-24 13:56:13 +07:00 |
|
laansdole
|
06011b0e6a
|
fix: lint
|
2025-09-24 13:52:24 +07:00 |
|
laansdole
|
d7bec4e472
|
feat: RAG-Anything runs offline
|
2025-09-24 13:38:53 +07:00 |
|
chaohuang-ai
|
d30e71502e
|
Update README.md
|
2025-09-22 20:57:02 +08:00 |
|
zrguo
|
214eb0f94d
|
update
v1.2.8
|
2025-09-22 11:11:40 +08:00 |
|
zrguo
|
1d48f24b4a
|
fix lint
|
2025-09-22 10:42:35 +08:00 |
|
zrguo
|
8e0e05d497
|
Merge pull request #99 from LaansDole/main
Feat: LM Studio integration example and uv implementation
|
2025-09-22 10:21:59 +08:00 |
|
zrguo
|
fcd21ea31d
|
Merge pull request #103 from hongdongjian/dev
feat: Add support for Chinese characters in PDF generation
|
2025-09-22 10:21:14 +08:00 |
|
Do Le Long An
|
df99bfb82f
|
Merge branch 'HKUDS:main' into main
|
2025-09-19 16:16:36 +07:00 |
|
hongdongjian
|
7e5e691650
|
feat: Add support for Chinese characters in PDF generation
|
2025-09-16 16:20:43 +08:00 |
|
zrguo
|
8d170e52c8
|
fix lint
|
2025-09-16 15:48:20 +08:00 |
|
zrguo
|
ba3f737c87
|
Merge pull request #106 from liz-in-tech/fix-cleanup-warning
fix: replace __del__ with atexit to fix RAGAnything cleanup warning
|
2025-09-16 15:40:18 +08:00 |
|
zrguo
|
48087eac78
|
Add log info
|
2025-09-16 15:32:12 +08:00 |
|
zrguo
|
d63798f05c
|
fix lint
|
2025-09-16 11:31:35 +08:00 |
|
zrguo
|
991794361f
|
Compatible with new fields
|
2025-09-16 11:10:26 +08:00 |
|
zrguo
|
30b6e2358b
|
Merge pull request #113 from HKUDS/ui
Add RAGAnything processing to LightRAG's webui
|
2025-09-16 10:20:56 +08:00 |
|
laansdole
|
c16208de29
|
fix: unified env variables with other types
|
2025-09-13 18:29:09 +07:00 |
|
hzywhite
|
ba3c0154dd
|
Update processor.py
|
2025-09-11 22:35:19 +08:00 |
|
liz
|
260044f449
|
fix: replace __del__ with atexit to fix RAGAnything cleanup warning
|
2025-09-09 17:10:36 +08:00 |
|
laansdole
|
8d8805c66f
|
fix: lightrag combatibility
|
2025-09-06 15:45:36 +07:00 |
|
Do Le Long An
|
2a3d222140
|
Merge branch 'HKUDS:main' into main
|
2025-09-06 15:01:38 +07:00 |
|
hzywhite
|
bcd6cc16c0
|
Update processor.py
|
2025-09-05 20:30:47 +08:00 |
|
hzywhite
|
de2824f816
|
summary
|
2025-09-05 14:57:00 +08:00 |
|
hzywhite
|
9872b86d13
|
summary
|
2025-09-05 14:56:35 +08:00 |
|
laansdole
|
b9f5e9d7d3
|
chores: refactor
|
2025-09-03 16:17:39 +07:00 |
|
laansdole
|
0b0c20aa7a
|
fix: lmstudio implementation
|
2025-09-03 14:57:54 +07:00 |
|
laansdole
|
0d73279aab
|
chores: refactor
|
2025-09-03 14:27:53 +07:00 |
|
laansdole
|
12855ec5bb
|
feat: lmstudio implementation
|
2025-09-03 14:26:28 +07:00 |
|
zrguo
|
c3ca5dd756
|
Merge pull request #97 from HKUDS/ui
Add RAGAnything processing to LightRAG's webui
|
2025-09-03 15:11:11 +08:00 |
|
hzywhite
|
6877983a71
|
summary
|
2025-09-02 18:19:56 +08:00 |
|
laansdole
|
4f879408e3
|
feat: lmstudio and uv implementation
|
2025-09-02 16:03:38 +07:00 |
|
hzywhite
|
92cf72fe8a
|
summary
|
2025-09-02 16:38:41 +08:00 |
|
hzywhite
|
c6d805005e
|
Update processor.py
|
2025-09-02 06:18:52 +08:00 |
|
hzywhite
|
ec858868ee
|
Update processor.py
|
2025-09-02 06:17:27 +08:00 |
|
hzywhite
|
6781662a3e
|
summary
|
2025-09-01 23:04:03 +08:00 |
|
hzywhite
|
dc3a46f247
|
summary
|
2025-09-01 22:14:07 +08:00 |
|