Update modules/persona.py
Browse files- modules/persona.py +4 -3
modules/persona.py
CHANGED
@@ -31,18 +31,19 @@ class Persona:
|
|
31 |
if 1 <= new_intensity <= 5:
|
32 |
self.intensity = new_intensity
|
33 |
|
34 |
-
def get_response_strategy(self, user_input: str, emotion: Optional[str] = None) -> Dict[str, any]:
|
35 |
"""
|
36 |
-
Bestimmt die Antwortstrategie basierend auf Nutzereingabe und
|
37 |
|
38 |
Args:
|
39 |
user_input: Die Eingabe des Nutzers
|
40 |
emotion: Optional, die erkannte Emotion (z.B. "negative", "positive", "neutral")
|
|
|
41 |
|
42 |
Returns:
|
43 |
Ein Dictionary mit Anweisungen für die Antwortgenerierung
|
44 |
"""
|
45 |
-
opportunities = self._determine_manipulation_opportunities(user_input)
|
46 |
strategy = {
|
47 |
"tone": self._determine_tone(emotion),
|
48 |
"focus": self._determine_focus(user_input),
|
|
|
31 |
if 1 <= new_intensity <= 5:
|
32 |
self.intensity = new_intensity
|
33 |
|
34 |
+
def get_response_strategy(self, user_input: str, emotion: Optional[str] = None, manipulation_opportunities: List[str] = None) -> Dict[str, any]:
|
35 |
"""
|
36 |
+
Bestimmt die Antwortstrategie basierend auf Nutzereingabe, Emotion und Manipulationsmöglichkeiten
|
37 |
|
38 |
Args:
|
39 |
user_input: Die Eingabe des Nutzers
|
40 |
emotion: Optional, die erkannte Emotion (z.B. "negative", "positive", "neutral")
|
41 |
+
manipulation_opportunities: Optional, Liste der erkannten Manipulationsmöglichkeiten
|
42 |
|
43 |
Returns:
|
44 |
Ein Dictionary mit Anweisungen für die Antwortgenerierung
|
45 |
"""
|
46 |
+
opportunities = manipulation_opportunities or self._determine_manipulation_opportunities(user_input)
|
47 |
strategy = {
|
48 |
"tone": self._determine_tone(emotion),
|
49 |
"focus": self._determine_focus(user_input),
|