fix/gcs/resolve_game_conflicts: add handle games check
@@ -19,6 +19,7 @@ from common.universal_templates import is_switch_topic, if_chat_about_particular
from common.utils import get_skill_outputs_from_dialog, is_yes
from common.game_cooperative_skill import game_skill_was_proposed, GAMES_COMPILED_PATTERN
+from common.gaming import GAMES_WITH_AT_LEAST_1M_COPIES_SOLD_COMPILED_PATTERN
from common.dialogflow_framework.programy.text_preprocessing import clean_text
from router import run_skills as skill
@@ -125,6 +126,12 @@ def respond():
dialog["human_utterances"][-1],
bot_utterance,
compiled_pattern=GAMES_COMPILED_PATTERN,
+ ) and GAMES_WITH_AT_LEAST_1M_COPIES_SOLD_COMPILED_PATTERN.search(last_utter_text):
+ confidence = 0
+ elif not is_active_last_answer and if_chat_about_particular_topic(
+ dialog["human_utterances"][-1],
+ bot_utterance,
+ compiled_pattern=GAMES_COMPILED_PATTERN,
):
confidence = 1
elif is_active_last_answer:
