human behavior: classifier gate, pacing, splitting, quiet hours, stable prompt prefix
This commit is contained in:
@@ -14,8 +14,8 @@ def entry(channel: str, text: str = "x"):
|
||||
|
||||
|
||||
class TestSystemPromptTemplate(unittest.TestCase):
|
||||
def test_template_substitution(self):
|
||||
"""ENV-10: {date}/{memory} substituted; missing news file leaves {news} literal."""
|
||||
def test_dynamic_context_in_suffix(self):
|
||||
"""ENV-10: date/memory reach the system message via the context suffix (ENV-20)."""
|
||||
config = {"system": "Date {date} memory {memory} news {news}", "history-limit": 5, "news": "/nonexistent/news.txt"}
|
||||
responder = AIResponder(config, "chat")
|
||||
responder.memory = "MEMSTR"
|
||||
@@ -23,7 +23,7 @@ class TestSystemPromptTemplate(unittest.TestCase):
|
||||
system = messages[0]["content"]
|
||||
self.assertIn(time.strftime("%Y-%m-%d"), system)
|
||||
self.assertIn("MEMSTR", system)
|
||||
self.assertIn("{news}", system) # left literal — file does not exist
|
||||
self.assertNotIn("{news}", system) # placeholders stripped since ENV-20
|
||||
|
||||
|
||||
class TestHistoryShrink(unittest.TestCase):
|
||||
|
||||
Reference in New Issue
Block a user