Skip to content

Commit 353ef6b

Browse files
author
prima
committed
feat: Prompting improvements to try and help with image gen and actions taken
1 parent 8d56ea2 commit 353ef6b

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

klite.embd

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26069,22 +26069,22 @@ else
2606926069
"name": "generate_image",
2607026070
"description": "Generates or modifies an image using AI based on a prompt. Be specific in the prompt about physical characteristics and settings as names of people may not be known.",
2607126071
"args": {
26072+
"use_existing_image": {
26073+
description: "<set this to true to use an existing image as a starting point. The user will select which image to use. (img2img)>",
26074+
type: "boolean"
26075+
},
2607226076
"prompt": "<prompt to generate image with>",
2607326077
"aspect": {
2607426078
type: "string",
2607526079
description: "<aspect ratio - must be \"landscape\", \"portrait\" or \"square\">"
26076-
},
26077-
"modify_existing_image": {
26078-
description: "<set this to true to modify an existing image with the prompt>",
26079-
type: "boolean"
2608026080
}
2608126081
},
2608226082
"enabled": localsettings.generate_images_mode == 2, // Only enabled if local endpoint exists / is in use
2608326083
"executor": async (action) => {
2608426084
let prompt = action?.args?.prompt
2608526085
let aspect = action?.args?.aspect
2608626086
if (!!prompt) {
26087-
if (!!action?.args?.modify_existing_image)
26087+
if (!!action?.args?.use_existing_image)
2608826088
{
2608926089
waitingFori2iSelection = true
2609026090
addThought(createSysPrompt, `Please click an image as a source for img2img generation`, true)
@@ -26669,7 +26669,9 @@ let checkFinalThoughtsPrompt = `Action: {"command":{"name":"thought","args":{"me
2666926669
}
2667026670

2667126671
let getLastActions = (amountOfActions = 10) => {
26672-
let exclusions = ["Chain of thought repetition detected - ending", "Chain of thought complete", "plan_actions", "Action: {", "Action (words =", "Action taken: ", "Action taken (words ="] // "Action: {", "Action (words =", "Action taken: ", "Action taken (words ="
26672+
let exclusions = ["Chain of thought repetition detected - ending", "Chain of thought complete", "plan_actions"]
26673+
// , "Action: {", "Action (words =", "Action taken: ", "Action taken (words ="
26674+
// "Action: {", "Action (words =", "Action taken: ", "Action taken (words ="
2667326675
return repack_instruct_turns(concat_gametext(true), `{{[INPUT]}}`, `{{[OUTPUT]}}`, `{{[SYSTEM]}}`, true, false).map(msg => {
2667426676
msg.msg = msg.msg.replaceAll("{{[SYSTEM_END]}}", "").replaceAll("{{[INPUT_END]}}", "").replaceAll("{{[OUTPUT_END]}}", "").trim();
2667526677
return msg

0 commit comments

Comments
 (0)