diff options
| author | Dan Goodliffe <dan.goodliffe@octal.co.uk> | 2026-06-19 17:38:47 +0100 |
|---|---|---|
| committer | Dan Goodliffe <dan.goodliffe@octal.co.uk> | 2026-06-19 17:41:01 +0100 |
| commit | 717e3ccc16c197ce578cf60e9517dfba0789b7a1 (patch) | |
| tree | 2f0b238a95c0e372b1b0479bdacca20e0d75e3de /scripts/toy.groovy | |
| parent | Improve the handling of the dismissal process (diff) | |
| download | toy-717e3ccc16c197ce578cf60e9517dfba0789b7a1.zip | |
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.
Diffstat (limited to 'scripts/toy.groovy')
| -rw-r--r-- | scripts/toy.groovy | 27 |
1 files changed, 7 insertions, 20 deletions
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"); |
