mirror of
https://github.com/HKUDS/LightRAG.git
synced 2025-11-11 15:23:49 +00:00
Add max_gleaning to env
This commit is contained in:
parent
b32c3825cc
commit
479865a271
@ -58,6 +58,8 @@ SUMMARY_LANGUAGE=English
|
|||||||
# FORCE_LLM_SUMMARY_ON_MERGE=6
|
# FORCE_LLM_SUMMARY_ON_MERGE=6
|
||||||
### Max tokens for entity/relations description after merge
|
### Max tokens for entity/relations description after merge
|
||||||
# MAX_TOKEN_SUMMARY=500
|
# MAX_TOKEN_SUMMARY=500
|
||||||
|
### Maximum number of entity extraction attempts for ambiguous content
|
||||||
|
# ENTITY_EXTRACT_MAX_GLEANING=1
|
||||||
|
|
||||||
### Number of parallel processing documents(Less than MAX_ASYNC/2 is recommended)
|
### Number of parallel processing documents(Less than MAX_ASYNC/2 is recommended)
|
||||||
# MAX_PARALLEL_INSERT=2
|
# MAX_PARALLEL_INSERT=2
|
||||||
|
|||||||
@ -7,6 +7,7 @@ consistency and makes maintenance easier.
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
# Default values for environment variables
|
# Default values for environment variables
|
||||||
|
DEFAULT_MAX_GLEANING = 1
|
||||||
DEFAULT_MAX_TOKEN_SUMMARY = 500
|
DEFAULT_MAX_TOKEN_SUMMARY = 500
|
||||||
DEFAULT_FORCE_LLM_SUMMARY_ON_MERGE = 6
|
DEFAULT_FORCE_LLM_SUMMARY_ON_MERGE = 6
|
||||||
DEFAULT_WOKERS = 2
|
DEFAULT_WOKERS = 2
|
||||||
|
|||||||
@ -22,6 +22,7 @@ from typing import (
|
|||||||
Dict,
|
Dict,
|
||||||
)
|
)
|
||||||
from lightrag.constants import (
|
from lightrag.constants import (
|
||||||
|
DEFAULT_MAX_GLEANING,
|
||||||
DEFAULT_MAX_TOKEN_SUMMARY,
|
DEFAULT_MAX_TOKEN_SUMMARY,
|
||||||
DEFAULT_FORCE_LLM_SUMMARY_ON_MERGE,
|
DEFAULT_FORCE_LLM_SUMMARY_ON_MERGE,
|
||||||
)
|
)
|
||||||
@ -124,7 +125,9 @@ class LightRAG:
|
|||||||
# Entity extraction
|
# Entity extraction
|
||||||
# ---
|
# ---
|
||||||
|
|
||||||
entity_extract_max_gleaning: int = field(default=1)
|
entity_extract_max_gleaning: int = field(
|
||||||
|
default=get_env_value("MAX_GLEANING", DEFAULT_MAX_GLEANING, int)
|
||||||
|
)
|
||||||
"""Maximum number of entity extraction attempts for ambiguous content."""
|
"""Maximum number of entity extraction attempts for ambiguous content."""
|
||||||
|
|
||||||
summary_to_max_tokens: int = field(
|
summary_to_max_tokens: int = field(
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user