summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2026-06-20 19:03:11 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2026-06-20 19:03:11 +0100
commit34e296b7897edd39c3a00b0999180097aebaee6d (patch)
tree185f02d6fe534cf69ecf5a99d3b9d052660c0b05 /scripts
parentReplace the remaining legacy image stuff (diff)
downloadtoy-34e296b7897edd39c3a00b0999180097aebaee6d.zip
Replace += with .add for messages in summon
Fixes the issue where the message log changes were not propagate back out of the function resulting in no summoning state and a repetition of the relationship statement.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/toy.groovy8
1 files changed, 4 insertions, 4 deletions
diff --git a/scripts/toy.groovy b/scripts/toy.groovy
index b89f6b0..0866893 100644
--- a/scripts/toy.groovy
+++ b/scripts/toy.groovy
@@ -261,16 +261,16 @@ return new Object() {
for (def n = 1; n <= limit; n++) {
switch (n) {
case 1:
- messages += [role: "user", content: "I am in another room. Write only a demand for my presence."];
+ messages.add([role: "user", content: "I am in another room. Write only a demand for my presence."]);
break;
case limit:
- messages += [role: "user", content: "I am still in another room. Write only a final demand for my presence."];
+ messages.add([role: "user", content: "I am still in another room. Write only a final demand for my presence."]);
break;
default:
- messages += [role: "user", content: "I am still in another room. Write only another demand for my presence."];
+ messages.add([role: "user", content: "I am still in another room. Write only another demand for my presence."]);
break;
}
- messages += [role: "assistant", content: llmPresent(callAPI_chat(messages)).message];
+ messages.add([role: "assistant", content: llmPresent(callAPI_chat(messages)).message]);
//playBackgroundSound(n == limit ? "shortwhip.wav" : "bell.wav");
if (showButton("...", timeMax) < timeMax) {
executeTrigger("toySummonSuccess", n);