mirror of
https://github.com/HKUDS/LightRAG.git
synced 2025-09-25 16:15:44 +00:00
fix(RetrievalTesting): Limit the length of conversation history records
This commit is contained in:
parent
1c1afb4eaf
commit
6009c25886
@ -69,6 +69,7 @@ export default function RetrievalTesting() {
|
||||
query: userMessage.content,
|
||||
conversation_history: prevMessages
|
||||
.filter((m) => m.isError !== true)
|
||||
.slice(-(state.querySettings.history_turns || 0) * 2)
|
||||
.map((m) => ({ role: m.role, content: m.content }))
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user