Update README

This commit is contained in:
yangdx 2025-07-31 13:00:09 +08:00
parent 9b63a89054
commit 3c530b21b6
3 changed files with 9 additions and 5 deletions

View file

@ -320,7 +320,7 @@ class QueryParam:
max_relation_tokens: int = int(os.getenv("MAX_RELATION_TOKENS", "10000"))
"""Maximum number of tokens allocated for relationship context in unified token control system."""
max_total_tokens: int = int(os.getenv("MAX_TOTAL_TOKENS", "32000"))
max_total_tokens: int = int(os.getenv("MAX_TOTAL_TOKENS", "30000"))
"""Maximum total tokens budget for the entire query context (entities + relations + chunks + system prompt)."""
hl_keywords: list[str] = field(default_factory=list)

View file

@ -327,7 +327,7 @@ class QueryParam:
max_relation_tokens: int = int(os.getenv("MAX_RELATION_TOKENS", "10000"))
"""Maximum number of tokens allocated for relationship context in unified token control system."""
max_total_tokens: int = int(os.getenv("MAX_TOTAL_TOKENS", "32000"))
max_total_tokens: int = int(os.getenv("MAX_TOTAL_TOKENS", "30000"))
"""Maximum total tokens budget for the entire query context (entities + relations + chunks + system prompt)."""
conversation_history: list[dict[str, str]] = field(default_factory=list)

View file

@ -48,15 +48,19 @@ OLLAMA_EMULATING_MODEL_TAG=latest
# LIGHTRAG_API_KEY=your-secure-api-key-here
# WHITELIST_PATHS=/health,/api/*
########################
######################################################################################
### Query Configuration
########################
###
### How to control the context lenght sent to LLM:
### MAX_ENTITY_TOKENS + MAX_RELATION_TOKENS < MAX_TOTAL_TOKENS
### Chunk_Tokens = MAX_TOTAL_TOKENS - Actual_Entity_Tokens - Actual_Reation_Tokens
######################################################################################
# LLM responde cache for query (Not valid for streaming response)
ENABLE_LLM_CACHE=true
# COSINE_THRESHOLD=0.2
### Number of entities or relations retrieved from KG
# TOP_K=40
### Maxmium number or chunks plan to send to LLM
### Maxmium number or chunks for naive vactor search
# CHUNK_TOP_K=10
### control the actual enties send to LLM
# MAX_ENTITY_TOKENS=10000