From 84b09aa5da83a491ef43d26a5f70f24ec9b8ade7 Mon Sep 17 00:00:00 2001 From: yangdx Date: Mon, 28 Jul 2025 02:51:36 +0800 Subject: [PATCH] feat: add threshold status line to StatusCard with i18n support - Add cosine_threshold, min_rerank_score, related_chunk_number to LightragStatus type --- lightrag_webui/src/api/lightrag.ts | 3 +++ lightrag_webui/src/components/status/StatusCard.tsx | 2 ++ lightrag_webui/src/locales/ar.json | 3 ++- lightrag_webui/src/locales/en.json | 3 ++- lightrag_webui/src/locales/fr.json | 3 ++- lightrag_webui/src/locales/zh.json | 3 ++- lightrag_webui/src/locales/zh_TW.json | 3 ++- 7 files changed, 15 insertions(+), 5 deletions(-) diff --git a/lightrag_webui/src/api/lightrag.ts b/lightrag_webui/src/api/lightrag.ts index 958a6f27..e3b2d1cb 100644 --- a/lightrag_webui/src/api/lightrag.ts +++ b/lightrag_webui/src/api/lightrag.ts @@ -51,6 +51,9 @@ export type LightragStatus = { max_async: number embedding_func_max_async: number embedding_batch_num: number + cosine_threshold: number + min_rerank_score: number + related_chunk_number: number } update_status?: Record core_version?: string diff --git a/lightrag_webui/src/components/status/StatusCard.tsx b/lightrag_webui/src/components/status/StatusCard.tsx index e1e7ad03..a084ea13 100644 --- a/lightrag_webui/src/components/status/StatusCard.tsx +++ b/lightrag_webui/src/components/status/StatusCard.tsx @@ -18,6 +18,8 @@ const StatusCard = ({ status }: { status: LightragStatus | null }) => { {status.input_directory} {t('graphPanel.statusCard.summarySettings')}: {status.configuration.summary_language} / LLM summary on {status.configuration.force_llm_summary_on_merge.toString()} fragments + {t('graphPanel.statusCard.threshold')}: + cosine {status.configuration.cosine_threshold} / rerank_score {status.configuration.min_rerank_score} / max_related {status.configuration.related_chunk_number} {t('graphPanel.statusCard.maxParallelInsert')}: {status.configuration.max_parallel_insert} diff --git a/lightrag_webui/src/locales/ar.json b/lightrag_webui/src/locales/ar.json index c77ab73c..da22805c 100644 --- a/lightrag_webui/src/locales/ar.json +++ b/lightrag_webui/src/locales/ar.json @@ -270,7 +270,8 @@ "rerankerConfig": "تكوين إعادة الترتيب", "rerankerBindingHost": "نقطة نهاية إعادة الترتيب", "rerankerModel": "نموذج إعادة الترتيب", - "lockStatus": "حالة القفل" + "lockStatus": "حالة القفل", + "threshold": "العتبة" }, "propertiesView": { "editProperty": "تعديل {{property}}", diff --git a/lightrag_webui/src/locales/en.json b/lightrag_webui/src/locales/en.json index 1b9cb306..0dadc0d1 100644 --- a/lightrag_webui/src/locales/en.json +++ b/lightrag_webui/src/locales/en.json @@ -270,7 +270,8 @@ "rerankerConfig": "Reranker Configuration", "rerankerBindingHost": "Reranker Endpoint", "rerankerModel": "Reranker Model", - "lockStatus": "Lock Status" + "lockStatus": "Lock Status", + "threshold": "Threshold" }, "propertiesView": { "editProperty": "Edit {{property}}", diff --git a/lightrag_webui/src/locales/fr.json b/lightrag_webui/src/locales/fr.json index 6a83e505..92866562 100644 --- a/lightrag_webui/src/locales/fr.json +++ b/lightrag_webui/src/locales/fr.json @@ -270,7 +270,8 @@ "rerankerConfig": "Configuration du reclassement", "rerankerBindingHost": "Point de terminaison de reclassement", "rerankerModel": "Modèle de reclassement", - "lockStatus": "État des verrous" + "lockStatus": "État des verrous", + "threshold": "Seuil" }, "propertiesView": { "editProperty": "Modifier {{property}}", diff --git a/lightrag_webui/src/locales/zh.json b/lightrag_webui/src/locales/zh.json index ca9b312f..495a684e 100644 --- a/lightrag_webui/src/locales/zh.json +++ b/lightrag_webui/src/locales/zh.json @@ -270,7 +270,8 @@ "rerankerConfig": "重排序配置", "rerankerBindingHost": "重排序端点", "rerankerModel": "重排序模型", - "lockStatus": "锁状态" + "lockStatus": "锁状态", + "threshold": "阈值" }, "propertiesView": { "editProperty": "编辑{{property}}", diff --git a/lightrag_webui/src/locales/zh_TW.json b/lightrag_webui/src/locales/zh_TW.json index 7240e93c..4d748895 100644 --- a/lightrag_webui/src/locales/zh_TW.json +++ b/lightrag_webui/src/locales/zh_TW.json @@ -270,7 +270,8 @@ "rerankerConfig": "重排序設定", "rerankerBindingHost": "重排序端點", "rerankerModel": "重排序模型", - "lockStatus": "鎖定狀態" + "lockStatus": "鎖定狀態", + "threshold": "閾值" }, "propertiesView": { "editProperty": "編輯{{property}}",