toggleExtraPromptAlias
fun toggleExtraPromptAlias(prompt: String, loraAlias: String, type: ExtraType = ExtraType.Lora): String(source)
Toggles the presence of a specific extra prompt alias in the given prompt string.
If the extra prompt alias is not present in the prompt, it adds it with a default value of 1. If the extra prompt alias is already present, it removes it from the prompt.
Return
A new string with the extra prompt alias either added or removed, depending on its initial presence.
Parameters
prompt
The input prompt string to modify. It's expected to be a comma or space-separated list of keywords.
loraAlias
The specific alias of the extra to toggle in the prompt.
type
The type of extra to toggle. Defaults to ExtraType.Lora.