From 8103b200db4166ebedfd2c5cd0e9d59ffc1d682e Mon Sep 17 00:00:00 2001 From: yangdx Date: Wed, 16 Jul 2025 02:20:27 +0800 Subject: [PATCH] Set DEFAULT_HISTORY_TURNS to 0 --- env.example | 2 +- lightrag/constants.py | 2 +- lightrag_webui/src/stores/settings.ts | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/env.example b/env.example index 71bc5788..3f9cb6ee 100644 --- a/env.example +++ b/env.example @@ -50,7 +50,7 @@ OLLAMA_EMULATING_MODEL_TAG=latest ######################## # LLM responde cache for query (Not valid for streaming response ENABLE_LLM_CACHE=true -# HISTORY_TURNS=3 +# HISTORY_TURNS=0 # COSINE_THRESHOLD=0.2 ### Number of entities or relations retrieved from KG # TOP_K=40 diff --git a/lightrag/constants.py b/lightrag/constants.py index 62858364..8ce400be 100644 --- a/lightrag/constants.py +++ b/lightrag/constants.py @@ -18,7 +18,7 @@ DEFAULT_CHUNK_TOP_K = 10 DEFAULT_MAX_ENTITY_TOKENS = 10000 DEFAULT_MAX_RELATION_TOKENS = 10000 DEFAULT_MAX_TOTAL_TOKENS = 32000 -DEFAULT_HISTORY_TURNS = 3 +DEFAULT_HISTORY_TURNS = 0 DEFAULT_ENABLE_RERANK = True DEFAULT_COSINE_THRESHOLD = 0.2 DEFAULT_RELATED_CHUNK_NUMBER = 10 diff --git a/lightrag_webui/src/stores/settings.ts b/lightrag_webui/src/stores/settings.ts index fb0adde0..36a96126 100644 --- a/lightrag_webui/src/stores/settings.ts +++ b/lightrag_webui/src/stores/settings.ts @@ -271,7 +271,8 @@ const useSettingsStoreBase = create()( max_entity_tokens: 10000, max_relation_tokens: 10000, max_total_tokens: 32000, - enable_rerank: true + enable_rerank: true, + history_turns: 0, } } return state