diff --git a/response_selectors/convers_evaluation_based_selector/tag_based_selection.py b/response_selectors/convers_evaluation_based_selector/tag_based_selection.py index 8b0b42233b..aaeb663924 100644 --- a/response_selectors/convers_evaluation_based_selector/tag_based_selection.py +++ b/response_selectors/convers_evaluation_based_selector/tag_based_selection.py @@ -429,15 +429,7 @@ def tag_based_response_selection(dialog, candidates, scores, confidences, bot_ut ) skill_name = cand_uttr["skill_name"] _is_dialog_abandon = get_dialog_breakdown_annotations(cand_uttr) and PRIORITIZE_NO_DIALOG_BREAKDOWN - _is_just_prompt = ( - cand_uttr["skill_name"] == "dummy_skill" - and any( - [ - question_type in cand_uttr.get("type", "") - for question_type in ["normal_question", "link_to_for_response_selector"] - ] - ) - ) or cand_uttr.get("response_parts", []) == ["prompt"] + _is_just_prompt = cand_uttr.get("response_parts", []) == ["prompt"] if cand_uttr["confidence"] == 1.0: # for those hypotheses where developer forgot to set tag to MUST_CONTINUE cand_uttr["can_continue"] = MUST_CONTINUE diff --git a/skills/dummy_skill/connector.py b/skills/dummy_skill/connector.py index 6af1968bc1..1baac00f25 100644 --- a/skills/dummy_skill/connector.py +++ b/skills/dummy_skill/connector.py @@ -222,7 +222,7 @@ async def send(self, payload: Dict, callback: Callable): logger.info("Found special nounphrases for questions. Return question with the same nounphrase.") cands += [choice(questions_same_nps)] confs += [0.5] - attrs += [{"type": "nounphrase_question"}] + attrs += [{"type": "nounphrase_question", "response_parts": ["prompt"]}] human_attrs += [{}] bot_attrs += [{}] @@ -267,13 +267,13 @@ async def send(self, payload: Dict, callback: Callable): else: confs += [0.05] # Use it only as response selector retrieve skill output modifier cands += [link_to_question] - attrs += [{"type": "link_to_for_response_selector"}] + attrs += [{"type": "link_to_for_response_selector", "response_parts": ["prompt"]}] human_attrs += [human_attr] bot_attrs += [{}] elif is_russian: cands += [random.choice(RUSSIAN_RANDOM_QUESTIONS)] confs += [0.8] - attrs += [{"type": "link_to_for_response_selector"}] + attrs += [{"type": "link_to_for_response_selector", "response_parts": ["prompt"]}] human_attrs += [{}] bot_attrs += [{}] @@ -293,7 +293,7 @@ async def send(self, payload: Dict, callback: Callable): logger.info("Found special nounphrases for facts. Return fact with the same nounphrase.") cands += [choice(facts_same_nps)] confs += [0.5] - attrs += [{"type": "nounphrase_fact"}] + attrs += [{"type": "nounphrase_fact", "response_parts": ["body"]}] human_attrs += [{}] bot_attrs += [{}]