From e3b62421fcb0c80e30bbd65fcd75ab706ebe5cdf Mon Sep 17 00:00:00 2001 From: yhjun1026 <460342015@qq.com> Date: Thu, 26 Oct 2023 11:00:16 +0800 Subject: [PATCH] bugfix(ChatExcel): ChatExcel Language confusion bug 1.Fix ChatExcel Language confusion bug --- .../scene/chat_data/chat_excel/excel_learning/prompt.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pilot/scene/chat_data/chat_excel/excel_learning/prompt.py b/pilot/scene/chat_data/chat_excel/excel_learning/prompt.py index ee82b51a0..fbc24b28e 100644 --- a/pilot/scene/chat_data/chat_excel/excel_learning/prompt.py +++ b/pilot/scene/chat_data/chat_excel/excel_learning/prompt.py @@ -33,11 +33,18 @@ _DEFAULT_TEMPLATE_ZH = """ {response} """ -RESPONSE_FORMAT_SIMPLE = { +_RESPONSE_FORMAT_SIMPLE_ZH = { "DataAnalysis": "数据内容分析总结", "ColumnAnalysis": [{"column name1": "字段1介绍,专业术语解释(请尽量简单明了)"}], "AnalysisProgram": ["1.分析方案1,图表展示方式1", "2.分析方案2,图表展示方式2"], } +_RESPONSE_FORMAT_SIMPLE_EN = { + "DataAnalysis": "Data content analysis summary", + "ColumnAnalysis": [{"column name1": "Introduction to Column 1 and explanation of professional terms (please try to be as simple and clear as possible)"}], + "AnalysisProgram": ["1. Analysis plan 1, chart display type 1", "2. Analysis plan 2, chart display type 2"], +} + +RESPONSE_FORMAT_SIMPLE =(_RESPONSE_FORMAT_SIMPLE_EN if CFG.LANGUAGE == "en" else _RESPONSE_FORMAT_SIMPLE_ZH) _DEFAULT_TEMPLATE = (