summaryrefslogtreecommitdiff
path: root/scripts/toy.groovy
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2026-06-19 19:08:33 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2026-06-19 19:08:33 +0100
commit856384857c861317ca1551e388b7516873ec28b3 (patch)
treed830c8e091907c751353041ceb65bca2a638eb72 /scripts/toy.groovy
parentReplace the tag based image selector with a caption based one (diff)
downloadtoy-856384857c861317ca1551e388b7516873ec28b3.zip
Remove more of the tag based image selection
Diffstat (limited to 'scripts/toy.groovy')
-rw-r--r--scripts/toy.groovy22
1 files changed, 0 insertions, 22 deletions
diff --git a/scripts/toy.groovy b/scripts/toy.groovy
index e21f2c8..a19b024 100644
--- a/scripts/toy.groovy
+++ b/scripts/toy.groovy
@@ -229,21 +229,6 @@ return new Object() {
}
}
- final compose = { texts ->
- if (!texts || texts.isEmpty()) return null;
- return texts.collect {
- t -> t[getRandom(t.size())]
- }.join(" ").capitalize();
- };
- final present = { imageSpec, texts ->
- if (texts) {
- show(compose(texts));
- }
- if (imageSpec) {
- return showImage(imageSpec);
- }
- return null;
- };
final llmPresent = { text ->
final image = showImageForText(text);
show(text);
@@ -252,13 +237,6 @@ return new Object() {
image: image
];
};
- final matchTags = { spec ->
- return { obj ->
- return spec.collect({ tag, score ->
- return (obj.tags.contains(tag.toString()) ? 1 : -1) * score;
- }).sum();
- };
- };
final triggerHandlers = [];
final addTriggerHandler = { String triggerName, func, defArg = null ->