diff options
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/toy/llmSession.groovy | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/scripts/toy/llmSession.groovy b/scripts/toy/llmSession.groovy index 68bbaf0..f140d75 100644 --- a/scripts/toy/llmSession.groovy +++ b/scripts/toy/llmSession.groovy @@ -29,7 +29,8 @@ } def messages = chatInitialMessages("You want to play with ${loadString("intro.name")}. You can dismiss ${loadString("intro.name")} when you wish by writing \"DISMISSED.\" only."); if (summon(messages)) { - while (messages.last().content != "DISMISSED.") { + while (!messages.last().content.toUpperCase().startsWith("DISMISSED") && !messages.last().content.toUpperCase().contains("YOU ARE DISMISSED")) { + llmPresent(messages.last().content); def userInput = getString(null, ""); if (userInput) { messages += [ role: "user", content: userInput ]; @@ -49,7 +50,7 @@ return; } } - messages += [role: "assistant", content: llmPresent(callAPI_chat(messages)).message]; + messages += [role: "assistant", content: callAPI_chat(messages)]; } } else { |
