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