From 6009c258868935e2010fdb8fc0b6b67ceedf1625 Mon Sep 17 00:00:00 2001 From: choizhang Date: Thu, 10 Apr 2025 17:02:28 +0800 Subject: [PATCH] fix(RetrievalTesting): Limit the length of conversation history records --- lightrag_webui/src/features/RetrievalTesting.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/lightrag_webui/src/features/RetrievalTesting.tsx b/lightrag_webui/src/features/RetrievalTesting.tsx index 1c3fb2db..c74f3548 100644 --- a/lightrag_webui/src/features/RetrievalTesting.tsx +++ b/lightrag_webui/src/features/RetrievalTesting.tsx @@ -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 })) }