Why this change is needed: The mock LLM function was returning JSON format, which is incorrect for LightRAG's entity extraction. This caused "Complete delimiter can not be found" warnings and resulted in 0 entities/relations being extracted during tests. How it solves it: - Updated mock_llm_func to return correct tuple-delimited format - Format: entity<|#|>name<|#|>type<|#|>description - Format: relation<|#|>source<|#|>target<|#|>keywords<|#|>description - Added proper completion delimiter: <|COMPLETE|> - Now correctly extracts 2 entities and 1 relation Impact: - E2E test now properly validates entity/relation extraction - No more "Complete delimiter" warnings - Tests can now detect extraction-related bugs - Graph files contain actual data (2 nodes, 1 edge) instead of empty graphs Testing: All 11 tests pass in 2.42s with proper entity extraction: - Chunk 1 of 1 extracted 2 Ent + 1 Rel (previously 0 Ent + 0 Rel) - Graph files now 2564 bytes (previously 310 bytes) |
||
|---|---|---|
| .. | ||
| test_aquery_data_endpoint.py | ||
| test_curl_aquery_data.sh | ||
| test_graph_storage.py | ||
| test_lightrag_ollama_chat.py | ||
| test_postgres_retry_integration.py | ||
| test_workspace_isolation.py | ||
| test_write_json_optimization.py | ||