From 430141b5502e4392fd829f52d3e10c3a59916d05 Mon Sep 17 00:00:00 2001 From: "qinyong@9artedu.com" Date: Mon, 29 Jun 2026 09:12:20 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/chat_qa/deduplication_qa/d_qa.py | 2 +- app/chat_qa/graph.py | 4 ++-- app/dto/quality_score.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/chat_qa/deduplication_qa/d_qa.py b/app/chat_qa/deduplication_qa/d_qa.py index 9a1b1b6..b00bd14 100644 --- a/app/chat_qa/deduplication_qa/d_qa.py +++ b/app/chat_qa/deduplication_qa/d_qa.py @@ -101,7 +101,7 @@ async def select_best_qa(qa_group: list) -> str: 3. **信息密度**:单位字数内有效信息更多,无冗余废话 4. **实用性**:对用户实际解决问题的帮助程度 {qa_text} -请直接输出最完整结果。格式:{"question": "xxxxx", "answer": "bbbb"} +请直接输出最完整结果。格式:{{"question": "xxxxx", "answer": "bbbb"}} """ prompt = PromptTemplate(template=prompt, input_variables=["qa_text"]) diff --git a/app/chat_qa/graph.py b/app/chat_qa/graph.py index c87c61e..b4cbc84 100644 --- a/app/chat_qa/graph.py +++ b/app/chat_qa/graph.py @@ -65,8 +65,8 @@ if __name__ == '__main__': await embedding_client.close() - start = datetime(2026, 5, 29) - end = datetime(2026, 6, 16) + start = datetime(2026, 6, 23) + end = datetime(2026, 6, 25) result = [] temp = start diff --git a/app/dto/quality_score.py b/app/dto/quality_score.py index 09ab1ee..a0080de 100644 --- a/app/dto/quality_score.py +++ b/app/dto/quality_score.py @@ -25,4 +25,4 @@ class QualityScore: self.clarity ] valid_scores = [s if s is not None else 0 for s in scores] - return sum(s * w for s, w in zip(valid_scores, weights)) * 10 # 转换为百分制 \ No newline at end of file + return sum(float(s) * w for s, w in zip(valid_scores, weights)) * 10 # 转换为百分制 \ No newline at end of file