82 lines
8.0 KiB
HTML
82 lines
8.0 KiB
HTML
<div>
|
||
System-wide Replacement Macros (in order of evaluation):
|
||
</div>
|
||
<ul>
|
||
<li><tt>{{pipe}}</tt> – only for slash command batching. Replaced with the returned result of the previous command.</li>
|
||
<li><tt>{{newline}}</tt> – just inserts a newline.</li>
|
||
<li><tt>{{original}}</tt> – global prompts defined in API settings. Only valid in Advanced Definitions prompt overrides.</li>
|
||
<li><tt>{{input}}</tt> – the user input</li>
|
||
<li><tt>{{charPrompt}}</tt> – the Character's Main Prompt override</li>
|
||
<li><tt>{{charJailbreak}}</tt> – the Character's Jailbreak Prompt override</li>
|
||
<li><tt>{{description}}</tt> – the Character's Description</li>
|
||
<li><tt>{{personality}}</tt> – the Character's Personality</li>
|
||
<li><tt>{{scenario}}</tt> – the Character's Scenario</li>
|
||
<li><tt>{{persona}}</tt> – your current Persona Description</li>
|
||
<li><tt>{{mesExamples}}</tt> – the Character's Dialogue Examples</li>
|
||
<li><tt>{{mesExamplesRaw}}</tt> – unformatted Dialogue Examples <b>(only for Story String)</b></li>
|
||
<li><tt>{{user}}</tt> – your current Persona username</li>
|
||
<li><tt>{{char}}</tt> – the Character's name</li>
|
||
<li><tt>{{group}}</tt> – a comma-separated list of group member names or the character name in solo chats. Alias: {{charIfNotGroup}}</li>
|
||
<li><tt>{{model}}</tt> – a text generation model name for the currently selected API. <b>Can be inaccurate!</b></li>
|
||
<li><tt>{{lastMessage}}</tt> - the text of the latest chat message.</li>
|
||
<li><tt>{{lastMessageId}}</tt> – index # of the latest chat message. Useful for slash command batching.</li>
|
||
<li><tt>{{firstIncludedMessageId}}</tt> - the ID of the first message included in the context. Requires generation to be ran at least once in the current session.</li>
|
||
<li><tt>{{currentSwipeId}}</tt> – the 1-based ID of the current swipe in the last chat message. Empty string if the last message is user or prompt-hidden.</li>
|
||
<li><tt>{{lastSwipeId}}</tt> – the number of swipes in the last chat message. Empty string if the last message is user or prompt-hidden.</li>
|
||
<li><tt>{{// (note)}}</tt> – you can leave a note here, and the macro will be replaced with blank content. Not visible for the AI.</li>
|
||
<li><tt>{{time}}</tt> – the current time</li>
|
||
<li><tt>{{date}}</tt> – the current date</li>
|
||
<li><tt>{{weekday}}</tt> – the current weekday</li>
|
||
<li><tt>{{isotime}}</tt> – the current ISO time (24-hour clock)</li>
|
||
<li><tt>{{isodate}}</tt> – the current ISO date (YYYY-MM-DD)</li>
|
||
<li><tt>{{datetimeformat …}}</tt> – the current date/time in the specified format, e. g. for German date/time: <tt>{{datetimeformat DD.MM.YYYY HH:mm}}</tt></li>
|
||
<li><tt>{{time_UTC±#}}</tt> – the current time in the specified UTC time zone offset, e.g. UTC-4 or UTC+2</li>
|
||
<li><tt>{{idle_duration}}</tt> – the time since the last user message was sent</li>
|
||
<li><tt>{{bias "text here"}}</tt> – sets a behavioral bias for the AI until the next user input. Quotes around the text are important.</li>
|
||
<li><tt>{{roll:(formula)}}</tt> – rolls a dice. (ex: <tt>>{{roll:1d6}}</tt> will roll a 6-sided dice and return a number between 1 and 6)</li>
|
||
<li><tt>{{random:(args)}}</tt> – returns a random item from the list. (ex: <tt>{{random:1,2,3,4}}</tt> will return 1 of the 4 numbers at random. Works with text lists too.</li>
|
||
<li><tt>{{random::(arg1)::(arg2)}}</tt> – alternative syntax for random that allows to use commas in the list items.</li>
|
||
<li><tt>{{banned "text here"}}</tt> – dynamically add text in the quotes to banned words sequences, if Text Generation WebUI backend used. Do nothing for others backends. Can be used anywhere (Character description, WI, AN, etc.) Quotes around the text are important.</li>
|
||
</ul>
|
||
<div>
|
||
Instruct Mode and Context Template Macros:
|
||
</div>
|
||
<div>
|
||
<small>(enabled in the Advanced Formatting settings)</small>
|
||
</div>
|
||
<ul>
|
||
<li><tt>{{maxPrompt}}</tt> – max allowed prompt length in tokens = (context size - response length)</li>
|
||
<li><tt>{{exampleSeparator}}</tt> – context template example dialogues separator</li>
|
||
<li><tt>{{chatStart}}</tt> – context template chat start line</li>
|
||
<li><tt>{{instructSystemPrompt}}</tt> – instruct system prompt</li>
|
||
<li><tt>{{instructSystemPromptPrefix}}</tt> – instruct system prompt prefix sequence</li>
|
||
<li><tt>{{instructSystemPromptSuffix}}</tt> – instruct system prompt suffix sequence</li>
|
||
<li><tt>{{instructUserPrefix}}</tt> – instruct user prefix sequence</li>
|
||
<li><tt>{{instructUserSuffix}}</tt> – instruct user suffix sequence</li>
|
||
<li><tt>{{instructAssistantPrefix}}</tt> – instruct assistant prefix sequence</li>
|
||
<li><tt>{{instructAssistantSuffix}}</tt> – instruct assistant suffix sequence</li>
|
||
<li><tt>{{instructFirstAssistantPrefix}}</tt> – instruct assistant first output sequence</li>
|
||
<li><tt>{{instructLastAssistantPrefix}}</tt> – instruct assistant last output sequence</li>
|
||
<li><tt>{{instructSystemPrefix}}</tt> – instruct system message prefix sequence</li>
|
||
<li><tt>{{instructSystemSuffix}}</tt> – instruct system message suffix sequence</li>
|
||
<li><tt>{{instructUserFiller}}</tt> – instruct first user message filler</li>
|
||
<li><tt>{{instructStop}}</tt> – instruct stop sequence</li>
|
||
</ul>
|
||
<div>
|
||
Chat variables Macros:
|
||
</div>
|
||
<div><small>Local variables = unique to the current chat</small></div>
|
||
<div><small>Global variables = works in any chat for any character</small></div>
|
||
<ul>
|
||
<li><tt>{{getvar::name}}</tt> – replaced with the value of the local variable "name"</li>
|
||
<li><tt>{{setvar::name::value}}</tt> – replaced with empty string, sets the local variable "name" to "value"</li>
|
||
<li><tt>{{addvar::name::increment}}</tt> – replaced with empty strings, adds a numeric value of "increment" to the local variable "name"</li>
|
||
<li><tt>{{incvar::name}}</tt> – replaced with the result of the increment of value of the variable "name" by 1</li>
|
||
<li><tt>{{decvar::name}}</tt> – replaced with the result of the decrement of value of the variable "name" by 1</li>
|
||
<li><tt>{{getglobalvar::name}}</tt> – replaced with the value of the global variable "name"</li>
|
||
<li><tt>{{setglobalvar::name::value}}</tt> – replaced with empty string, sets the global variable "name" to "value"</li>
|
||
<li><tt>{{addglobalvar::name::value}}</tt> – replaced with empty string, adds a numeric value of "increment" to the global variable "name"</li>
|
||
<li><tt>{{incglobalvar::name}}</tt> – replaced with the result of the increment of value of the global variable "name" by 1</li>
|
||
<li><tt>{{decglobalvar::name}}</tt> – replaced with the result of the decrement of value of the global variable "name" by 1</li>
|
||
</ul>
|