mirror of
https://github.com/HKUDS/LightRAG.git
synced 2025-12-02 01:46:30 +00:00
Disable conversation history by default
- Set default history_turns to 0 - Mark history_turns as deprecated - Remove history_turns from example - Update documentation comments
This commit is contained in:
parent
755a08edec
commit
c6bd9f0329
@ -334,7 +334,8 @@ class QueryParam:
|
||||
Format: [{"role": "user/assistant", "content": "message"}].
|
||||
"""
|
||||
|
||||
history_turns: int = 3
|
||||
# Deprated: history message have negtive effect on query performance
|
||||
history_turns: int = 0
|
||||
"""Number of complete conversation turns (user-assistant pairs) to consider in the response context."""
|
||||
|
||||
ids: list[str] | None = None
|
||||
|
||||
@ -335,7 +335,8 @@ class QueryParam:
|
||||
Format: [{"role": "user/assistant", "content": "message"}].
|
||||
"""
|
||||
|
||||
history_turns: int = 3
|
||||
# Deprated: history message have negtive effect on query performance
|
||||
history_turns: int = 0
|
||||
"""Number of complete conversation turns (user-assistant pairs) to consider in the response context."""
|
||||
|
||||
ids: list[str] | None = None
|
||||
@ -614,7 +615,6 @@ conversation_history = [
|
||||
query_param = QueryParam(
|
||||
mode="mix", # or any other mode: "local", "global", "hybrid"
|
||||
conversation_history=conversation_history, # Add the conversation history
|
||||
history_turns=3 # Number of recent conversation turns to consider
|
||||
)
|
||||
|
||||
# Make a query that takes into account the conversation history
|
||||
|
||||
@ -53,7 +53,6 @@ OLLAMA_EMULATING_MODEL_TAG=latest
|
||||
########################
|
||||
# LLM responde cache for query (Not valid for streaming response)
|
||||
ENABLE_LLM_CACHE=true
|
||||
# HISTORY_TURNS=0
|
||||
# COSINE_THRESHOLD=0.2
|
||||
### Number of entities or relations retrieved from KG
|
||||
# TOP_K=40
|
||||
|
||||
@ -100,6 +100,7 @@ class QueryParam:
|
||||
Format: [{"role": "user/assistant", "content": "message"}].
|
||||
"""
|
||||
|
||||
# Deprecated: history message have negtive effect on query performance
|
||||
history_turns: int = int(os.getenv("HISTORY_TURNS", str(DEFAULT_HISTORY_TURNS)))
|
||||
"""Number of complete conversation turns (user-assistant pairs) to consider in the response context."""
|
||||
|
||||
|
||||
@ -25,9 +25,10 @@ DEFAULT_CHUNK_TOP_K = 10
|
||||
DEFAULT_MAX_ENTITY_TOKENS = 10000
|
||||
DEFAULT_MAX_RELATION_TOKENS = 10000
|
||||
DEFAULT_MAX_TOTAL_TOKENS = 30000
|
||||
DEFAULT_HISTORY_TURNS = 0
|
||||
DEFAULT_COSINE_THRESHOLD = 0.2
|
||||
DEFAULT_RELATED_CHUNK_NUMBER = 5
|
||||
# Deprated: history message have negtive effect on query performance
|
||||
DEFAULT_HISTORY_TURNS = 0
|
||||
|
||||
# Rerank configuration defaults
|
||||
DEFAULT_ENABLE_RERANK = True
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user