From 57a32392a5b9ce7d99eaae0f4a3edbb5d244fc35 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Fri, 19 Jun 2026 12:35:58 +0100 Subject: Allow modules to inject into the system and user intro prompts --- scripts/toy.groovy | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'scripts/toy.groovy') diff --git a/scripts/toy.groovy b/scripts/toy.groovy index c23e31c..6ee876c 100644 --- a/scripts/toy.groovy +++ b/scripts/toy.groovy @@ -404,7 +404,6 @@ ${jspec.collect{ k, v -> "\"${k}\": ${v}" }.join(",\n")} ])?.choices?[0]?.message?.content); } - // TODO add module support final chatInitialMessages = { String ... extra -> def messages = [ [role: "system", content: """ @@ -417,8 +416,12 @@ You are permanently in role-play mode as ${DOMME.title} ${DOMME.fullName}. ${DOMME.prompt} ${loadString("intro.name")} is your slave. ${extra.join('\n')} +${eachModule("systemPrompt").findAll().join('\n')}; """], - [role: "user", content: "I am ${loadString("intro.name")}"] + [role: "user", content: """ +I am ${loadString("intro.name")} +${eachModule("userIntroPrompt").findAll().join('\n')}; + """] ]; def relationship = loadString("toy.${DOMME.id}.relationship"); if (relationship) { -- cgit v1.3