fix: numpy versions
@@ -35,12 +35,12 @@ for skill in LIST_OF_SCRIPTED_TOPICS:
class EmotionSkillScenario:
def __init__(self, steps, jokes, advices, logger):
self.emotion_precision = {
- "anger": 0.9,
- "fear": 0.894,
- "joy": 1,
- "love": 0.778,
- "sadness": 1,
- "surprise": 0.745,
+ "anger": 0.6,
+ "fear": 0.8,
+ "joy": 0.8,
+ "love": 0.8,
+ "sadness": 0.8,
+ "surprise": 0.7,
"neutral": 0,
}
self.steps = steps
@@ -128,7 +128,7 @@ class EmotionSkillScenario:
state = random.choice(step["next_step"])
elif state == "sad_and_lonely" and just_asked_about_jokes and is_no:
reply = "Actually, I love jokes but not now. Dead serious about that."
- confidence = 1.0
+ confidence = 0.99
state = ""
elif state == "offered_advice":
# we offered an advice
@@ -140,7 +140,7 @@ class EmotionSkillScenario:
state = random.choice(step["next_step"])
else:
state = ""
- confidence = 0.95
+ confidence = 0.8
else:
# provide advices and offer another one
reply = self._random_choice(self.advices[emotion], prev_jokes_advices)
@@ -153,7 +153,7 @@ class EmotionSkillScenario:
prev_jokes_advices.append(reply)
if len(prev_jokes_advices) == len(self.advices[emotion]):
state = "sad_and_lonely_end"
- confidence = 1.0 if is_yes else 0.95
+ confidence = 1.0 if is_yes else 0.8
else:
if emotion in ["sadness", "fear", "anger"] and "joy" in state:
state = "sad_and_lonely"
@@ -169,7 +169,7 @@ class EmotionSkillScenario:
link = link_to([link], human_attributes=human_attr)
link["phrase"] = reply
# reply += link['phrase']
- confidence = 0.95
+ confidence = 0.8
emotion_skill_attributes = {"state": state, "emotion": emotion, "prev_jokes_advices": prev_jokes_advices}
if "joy" in state:
@@ -242,7 +242,7 @@ class EmotionSkillScenario:
if talk_about_emotion(annotated_user_phrase, prev_annotated_bot_phrase):
reply = f"OK. {random.choice(skill_trigger_phrases())}"
attr["can_continue"] = MUST_CONTINUE
- confidence = 1
+ confidence = 1.0
elif emotion != "neutral" or state != "":
reply, confidence, link, emotion_skill_attributes = self._get_reply_and_conf(
annotated_user_phrase, prev_bot_phrase, emotion, emotion_skill_attributes, human_attributes
