X-Git-Url: https://vgcfreebox.myrthtech.pt/gitweb/alentejosemlei.git/blobdiff_plain/74f66efcf4edca34868cc1e7aed13c0ed370ea8c..6bbe17d84dbe471b53705d9276637ac98a44c376:/redis_bridge.py?ds=inline diff --git a/redis_bridge.py b/redis_bridge.py index 4aebb3a..a45944e 100644 --- a/redis_bridge.py +++ b/redis_bridge.py @@ -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] - 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.", - "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", - "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 "target_speech" not in agent_brain: agent_brain["target_speech"] = "" if not agent_brain["speech"].strip(): agent_brain["speech"] = "*grunts quietly*"