]> vgcfreebox.myrthtech.pt Git - alentejosemlei.git/blobdiff - redis_bridge.py
agent puppeteer method
[alentejosemlei.git] / redis_bridge.py
index 4aebb3ab5de0985393063194d9ba10c77da8dfa4..a45944e8d595bb62bad99de76ad30ad34a006e3a 100644 (file)
@@ -184,17 +184,20 @@ async def process_message(r, session, message_data):
         Your "action" key MUST be exactly one of the following words:
         [WANDER, PATROL, FOLLOW, GUARD, GO_TO, INTERACT, USE_OBJECT, RETURN_TO_POST, ATTACK, REST, STEALTH, SEARCH, UNSTEALTH, PEACE, COMMAND]
         
         Your "action" key MUST be exactly one of the following words:
         [WANDER, PATROL, FOLLOW, GUARD, GO_TO, INTERACT, USE_OBJECT, RETURN_TO_POST, ATTACK, REST, STEALTH, SEARCH, UNSTEALTH, PEACE, COMMAND]
         
-        EMOTION RULE:
-        Your "emotion" key MUST be exactly one of the following words: 
-        [NEUTRAL, LAUGHING, ANGRY, PLEADING, BOW, TAUNT, CHEER]. Do not invent new emotions. Do not perform writen emotions in text with **.
+       ACTION RULE:
+        Your "action" key MUST be exactly one of the following words:
+        [WANDER, PATROL, FOLLOW, GUARD, GO_TO, INTERACT, USE_OBJECT, RETURN_TO_POST, ATTACK, REST, STEALTH, SEARCH, UNSTEALTH, PEACE, COMMAND, CONVERSE]
         
         
+        - Use CONVERSE if you want to initiate a back-and-forth dialogue with a standard, unintelligent NPC. You will write their response for them.
+
         YOUR RESPONSE MUST BE A SINGLE, VALID JSON OBJECT. YOU MUST USE THIS EXACT TEMPLATE:
         {{
             "thought": "Your internal reasoning here.",
         YOUR RESPONSE MUST BE A SINGLE, VALID JSON OBJECT. YOU MUST USE THIS EXACT TEMPLATE:
         {{
             "thought": "Your internal reasoning here.",
-            "speech": "You MUST say something out loud. If you don't want to talk, output something your character would do.",
+            "speech": "What YOU say out loud.",
             "emotion": "MACRO WORD",
             "action": "MACRO WORD",
             "emotion": "MACRO WORD",
             "action": "MACRO WORD",
-            "action_target": "Target name"
+            "action_target": "Target name",
+            "target_speech": "If action is CONVERSE, write what the target NPC replies back to you here. Otherwise, leave blank."
         }}
         """
         
         }}
         """
         
@@ -250,6 +253,7 @@ async def process_message(r, session, message_data):
             if "emotion" not in agent_brain: agent_brain["emotion"] = "NEUTRAL" 
             if "action" not in agent_brain: agent_brain["action"] = "GUARD"
             if "action_target" not in agent_brain: agent_brain["action_target"] = ""
             if "emotion" not in agent_brain: agent_brain["emotion"] = "NEUTRAL" 
             if "action" not in agent_brain: agent_brain["action"] = "GUARD"
             if "action_target" not in agent_brain: agent_brain["action_target"] = ""
+            if "target_speech" not in agent_brain: agent_brain["target_speech"] = ""
             
             if not agent_brain["speech"].strip():
                 agent_brain["speech"] = "*grunts quietly*"
             
             if not agent_brain["speech"].strip():
                 agent_brain["speech"] = "*grunts quietly*"