From 2fb9fe47ebf90059eef6acafd230dc69d76e5547 Mon Sep 17 00:00:00 2001 From: Haibin <1400012807@pku.edu.cn> Date: Tue, 17 Dec 2024 11:13:53 +0800 Subject: [PATCH] fix typo --- data_juicer/ops/mapper/dialog_intent_detection_mapper.py | 2 ++ ...on_mapper copy.py => test_dialog_intent_detection_mapper.py} | 0 2 files changed, 2 insertions(+) rename tests/ops/mapper/{test_dialog_intent_detection_mapper copy.py => test_dialog_intent_detection_mapper.py} (100%) diff --git a/data_juicer/ops/mapper/dialog_intent_detection_mapper.py b/data_juicer/ops/mapper/dialog_intent_detection_mapper.py index 912fa8c3..5b283ad1 100644 --- a/data_juicer/ops/mapper/dialog_intent_detection_mapper.py +++ b/data_juicer/ops/mapper/dialog_intent_detection_mapper.py @@ -141,6 +141,8 @@ def build_input(self, history, query): if self.intent_candidates: input_prompt = self.candidate_template.format( candidate_str=','.join(self.intent_candidates)) + else: + input_prompt = '' if self.max_round > 0: input_prompt += ''.join(history[-self.max_round * 4:]) diff --git a/tests/ops/mapper/test_dialog_intent_detection_mapper copy.py b/tests/ops/mapper/test_dialog_intent_detection_mapper.py similarity index 100% rename from tests/ops/mapper/test_dialog_intent_detection_mapper copy.py rename to tests/ops/mapper/test_dialog_intent_detection_mapper.py