From 717e3ccc16c197ce578cf60e9517dfba0789b7a1 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Fri, 19 Jun 2026 17:38:47 +0100 Subject: Replace the tag based image selector with a caption based one In most places. Images are selected now by passing the LLM a list of photo captions and the words spoken, and asking it which image best fits the sentiment. --- scripts/toy.groovy | 27 +++++++-------------------- 1 file changed, 7 insertions(+), 20 deletions(-) (limited to 'scripts/toy.groovy') diff --git a/scripts/toy.groovy b/scripts/toy.groovy index 8b21069..e21f2c8 100644 --- a/scripts/toy.groovy +++ b/scripts/toy.groovy @@ -50,7 +50,11 @@ return new Object() { final getDomme = { domme, set = null -> def d = parseJsonFile("images/toy/$domme/person.json"); + if (new File("images/toy/$domme/$set/set.json").exists()) { + d += parseJsonFile("images/toy/$domme/$set/set.json"); + } d.id = domme; + d.set = set; return d; }; final loadDomme = { domme, set = null -> @@ -241,8 +245,8 @@ return new Object() { return null; }; final llmPresent = { text -> + final image = showImageForText(text); show(text); - def image = showImage(callAPI_imageMatch(text)); return [ message: text, image: image @@ -430,6 +434,7 @@ Speak in the first person only. Forbidden from using quotes. You are permanently in role-play mode as ${DOMME.title} ${DOMME.fullName}. ${DOMME.prompt} +${DOMME.promptSet?:""} ${loadString("intro.name")} is your slave. ${extra.join('\n')} ${eachModule("systemPrompt").findAll().join('\n')}; @@ -446,24 +451,6 @@ ${eachModule("userIntroPrompt").findAll().join('\n')}; return messages; } - final callAPI_imageMatch = { message -> - def tags = [DRESSED, TITS, PUSSY, LINGERIE, TEASE, SIT, BOOTS, KNEEL, STOOD, MEAN, CROP, ASS, SQUAT, SSSH]; - def request = chatInitialMessages(); - request += [role: "assistant", content: message] - request += [role: "user", content: """ -Write only a JSON object. -Complete the following JSON object, scoring each keyword between -10 and 10 against the previous messsage: -{ - ${ tags.collect { tag -> "\"$tag\": number" }.join(',\n') } -} - """ ]; - return parseJsonString(callAPI("chat/completions", [ - model: loadString("toy.chatModel"), - stop: "<", - messages: request - ])?.choices?[0]?.message?.content); - } - String main() { // GO! @@ -472,7 +459,7 @@ Complete the following JSON object, scoring each keyword between -10 and 10 agai setDefault("toy.chatModel", "Lewdiculous/Erosumika-7B-v3-0.2-GGUF-IQ-Imatrix:IMAT"); OWNER = loadString("toy.owner"); - loadDomme(OWNER); + loadDomme(OWNER, loadString("toy.owner.outfit")); modules = loadModules(this); execEvents(false); eachModule("setup"); -- cgit v1.3