Update modules/persona.py
Browse files- modules/persona.py +18 -0
modules/persona.py
CHANGED
@@ -51,6 +51,24 @@ class Persona:
|
|
51 |
|
52 |
return strategy
|
53 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
54 |
def _determine_tone(self, emotion: Optional[str]) -> str:
|
55 |
"""Bestimmt den Ton basierend auf der erkannten Emotion"""
|
56 |
if emotion == "negative":
|
|
|
51 |
|
52 |
return strategy
|
53 |
|
54 |
+
def _determine_manipulation_opportunities(self, user_input: str) -> List[str]:
|
55 |
+
"""Analysiert die Nutzereingabe auf Manipulationsmöglichkeiten"""
|
56 |
+
opportunities = []
|
57 |
+
|
58 |
+
# Sucht nach Indikatoren für Unsicherheit
|
59 |
+
if any(word in user_input.lower() for word in ["unsicher", "zweifel", "nicht sicher", "bezweifeln"]):
|
60 |
+
opportunities.append("unsicherheit")
|
61 |
+
|
62 |
+
# Sucht nach emotionalen Ausbrüchen
|
63 |
+
if any(word in user_input.lower() for word in ["wütend", "verärgert", "frustriert", "verzweifelt"]):
|
64 |
+
opportunities.append("emotionale_reaktion")
|
65 |
+
|
66 |
+
# Sucht nach Selbstzweifeln
|
67 |
+
if any(word in user_input.lower() for word in ["falsch", "versagt", "nicht gut", "schlecht"]):
|
68 |
+
opportunities.append("selbstzweifel")
|
69 |
+
|
70 |
+
return opportunities
|
71 |
+
|
72 |
def _determine_tone(self, emotion: Optional[str]) -> str:
|
73 |
"""Bestimmt den Ton basierend auf der erkannten Emotion"""
|
74 |
if emotion == "negative":
|