152 Commits

Author SHA1 Message Date
zrguo
ead82a8dbd update delete_by_doc_id 2025-06-09 18:52:34 +08:00
yangdx
38b862e993 Remove unsed functions 2025-05-18 07:16:52 +08:00
sa9arr
36b606d0db Fix: Correct GraphML to JSON mapping in xml_to_json function 2025-05-17 19:32:25 +05:45
yangdx
2845e268e4 Ensure priority_limit_async_func_call decorator receive callable 2025-05-13 02:00:01 +08:00
yangdx
4d57370c94 Refactor: Move get_env_value from api.config to utils
Relocates the `get_env_value` utility function
from `lightrag.api.config` to `lightrag.utils` to decouple
LightRAG core from API Server
2025-05-10 08:58:18 +08:00
yangdx
3eb3b170ab Remove list_of_list_to_dict function 2025-05-07 18:01:23 +08:00
yangdx
156244e260 Refactor: Unify naive context to JSON format
- Merges 'mix' mode query handling into 'hybrid' mode, simplifying query logic by removing the dedicated `mix_kg_vector_query` function
- Standardizes vector search result by using JSON string format to build context
- Fixes a bug in `query_with_keywords` ensuring `hl_keywords` and `ll_keywords` are correctly passed to `kg_query_with_keywords`
2025-05-07 17:42:14 +08:00
yangdx
3146309fde Change function name from list_of_list_to_json to list_of_list_to_dict 2025-05-07 10:52:26 +08:00
yangdx
dbfcf30801 Fix linting 2025-05-06 22:03:40 +08:00
yangdx
c8ecfa2d68 feat: Centralize configuration and update defaults
This commit introduces `lightrag/constants.py` to centralize default values for various configurations across the API and core components.

Key changes:
- Added `constants.py` to centralize default values
- Improved the `get_env_value` function in `api/config.py` to correctly handle string "None" as a None value and to catch `TypeError` during value conversion.
- Updated the default `SUMMARY_LANGUAGE` to "English"
- Set default `WORKERS` to 2
2025-05-06 22:00:43 +08:00
yangdx
a36abce8d6 Update commnents 2025-05-05 11:26:31 +08:00
yangdx
62fd4a0540 Optimize log messages 2025-04-30 13:53:03 +08:00
yangdx
81953e6d46 Enhance the robustness of concurrency control and scheduling logic 2025-04-29 13:38:11 +08:00
yangdx
1afcbcbfb5 Fix race condition for health_check and ensure_workers 2025-04-29 00:08:52 +08:00
yangdx
1fc26127d5 Fix linting 2025-04-28 23:21:34 +08:00
yangdx
0ecae90002 Enhance the function's robustness 2025-04-28 22:52:31 +08:00
yangdx
e30afe8686 fix(utils): Fix TypeError in priority_limit_async_func_call when comparing Future objects 2025-04-28 21:07:01 +08:00
yangdx
2d59ac1ecb Remove deprecated embedding cache logic 2025-04-28 18:51:43 +08:00
yangdx
5a393e563e remove duplicate priority setting for merge summerization 2025-04-28 18:37:51 +08:00
yangdx
140b1b3cbb Add priority control for limited async decorator 2025-04-28 18:12:29 +08:00
yangdx
02e9055f9d Fix linting 2025-04-24 20:04:42 +08:00
yangdx
f6129857a1 Improve quantize and dequantize handling of embedding 2025-04-24 20:03:01 +08:00
yangdx
6977db3dd1 Remove the single quotation marks that enclose the names of the entities 2025-04-23 21:30:07 +08:00
yangdx
21c0bb7abf Merge branch 'context_format_csv_to_json' 2025-04-22 12:25:50 +08:00
yangdx
e7063b5f1e Remove embedding_cache_config 2025-04-22 00:28:17 +08:00
yangdx
85684164f0 Fix linting 2025-04-21 20:18:05 +08:00
yangdx
17f5439952 Remove space between chinese chars and Egnlish symbols 2025-04-21 19:21:30 +08:00
孟超
8064a2339f change process_combine_contexts params type to list[dict[str, str]] 2025-04-21 12:08:12 +08:00
mengchao
510a6adfbc Fix linting 2025-04-20 19:28:25 +08:00
mengchao
f2f3a2721d Refactor context handling to convert data from CSV to JSON format for improved compatibility with LLM, replacing the list_of_list_to_csv function with list_of_list_to_json 2025-04-20 19:24:05 +08:00
孟超
6d486f5813 json dumps without ascii 2025-04-19 15:28:07 +08:00
孟超
a20d68d865 Revise the context format of chunks from CSV to JSON to enhance compatibility with LLM 2025-04-19 15:18:33 +08:00
drahnreb
9c6b5aefcb fix linting 2025-04-18 16:24:43 +02:00
drahnreb
0f949dd5d7 fix truncation with global_config tokenizer 2025-04-18 16:24:43 +02:00
drahnreb
20ba1eb9c2 add: to optionally replace default tiktoken Tokenizer with a custom one 2025-04-18 16:24:43 +02:00
yangdx
bffb9dbdb0 Fix linting 2025-04-17 23:00:34 +08:00
yangdx
a3ca134e97 Fix special chars problem for Postgres 2025-04-17 22:58:36 +08:00
yangdx
2b387fd9e5 Fix cache persistence bugs 2025-04-16 01:27:02 +08:00
yangdx
2e95947c40 Fix: disable LLM cache recording while enable_llm_cache is disabled 2025-04-15 21:01:44 +08:00
yangdx
5c1d4201f9 Fix linting 2025-04-14 12:08:56 +08:00
yangdx
89d1e68d97 Move graph edit function implemention to a utils_graph.py to educe the size of lightray.py 2025-04-14 03:06:23 +08:00
yangdx
6174554c58 Fix linting 2025-04-12 20:50:21 +08:00
yangdx
2ac66c3531 Remove chinese quotes in entity name 2025-04-12 20:45:41 +08:00
yangdx
0eed5eb718 feat: implement entity/relation name and description normalization
- Remove spaces between Chinese characters
- Remove spaces between Chinese and English/numbers
- Preserve spaces within English text and numbers
- Replace Chinese parentheses with English parentheses
- Replace Chinese dash with English dash
2025-04-12 19:26:02 +08:00
yangdx
3007dff153 Add env FORCE_LLM_SUMMARY_ON_MERGE 2025-04-10 17:29:07 +08:00
yangdx
496f87a1e6 Fix linting 2025-04-10 03:58:04 +08:00
yangdx
8d858da4d0 Fix LLM cache now work for nodes and edges merging 2025-04-10 03:57:36 +08:00
IcySugar000
8aa3cd799a Fix: Fixed null value handling and ensure exceptions are avoided 2025-04-09 11:32:05 +08:00
choizhang
164faf94e2 feat(TokenTracker): Add context manager support to simplify token tracking 2025-03-30 00:59:23 +08:00
yangdx
c590d5878c refactor: standardize .env loading behavior across modules
- Use .env from current folder for each lightrag instance
- Allow different .env files for different instances
- Make OS env vars take precedence over .env file
2025-03-29 03:37:23 +08:00