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