ThereforeGames/unprompted

escape character not working

redstoneguy10ls opened this issue · 3 comments

Due diligence

  • I checked for similar issues and couldn't find any.
  • My WebUI and Unprompted are both up-to-date.
  • I disabled my other extensions but the problem persists.

Describe the bug

as said in the title, adding back ticks won't let the escape character work

Prompt

smiling,deep depth of field,soft delicate beautiful attractive face, beautiful edgOiran_woman , a woman in a [kimono|dress],(wearing a ballgown:1.25),ballgown,(full body picture:1.3),lora:OiranGown:0.9

Log output

No response

Unprompted version

10.11.0

WebUI version

current

Other comments

No response

Hi @redstoneguy10ls,

When you say that the escape character doesn't work, do you mean that the backticks are showing up in your final prompt, or something else?

I am not able to reproduce the issue on v11.0.0:

It is also worth mentioning that the backticks are not necessary for this particular prompt - since [kimono|dress] is not a valid shortcode, Unprompted will assume you want to print it literally.

basically i want to literarily have [kimono|dress] appear in my prompt when called from a choose file like this
[chose]
idk some choise
[kimono|dress]
[/chose]
and currently it stops at the |

Hi @redstoneguy10ls,

Thank you for clarifying. This issue occurs because [choose] splits options by two things: linebreaks and the standard delimiter, which is | by default.

A couple possible solutions:

  1. In your config file (or inside a [config] block), you can change the value of Config.syntax.delimiter to something else. It can be more than one character long, if that helps.

  2. I just released Unprompted v11.0.2, which includes the new special string %PIPE%. If you use this in a prompt, it will circumvent the normal sanitization rules and will be replaced with | after Unprompted finishes processing. Example:

image

Let me know if you have any further questions. Thank you.