Chat: Add AI reply prefixes

Experimentation yields that prefixing a reply with something drives
the AI to possibly produce more targeted and meaningful conversation.

The example I used is showing an AI's "thoughts" in a message via
the use of backticks. By automatically prefixing {{char}}'s thoughts,
the AI generates an internal monologue that the user can also use
for their own responses.

This feature is stable, but in an experimental state for now in terms
of expansion.

Signed-off-by: kingbri <bdashore3@proton.me>
This commit is contained in:
kingbri
2023-07-01 15:27:44 -04:00
parent 6c33dff0ba
commit 080ecec5f2
3 changed files with 63 additions and 24 deletions

View File

@@ -101,6 +101,8 @@ let power_user = {
trim_sentences: false,
include_newline: false,
always_force_name2: false,
user_prompt_bias: '',
show_user_prompt_bias: true,
multigen: false,
multigen_first_chunk: 50,
multigen_next_chunks: 30,
@@ -598,6 +600,8 @@ function loadPowerUserSettings(settings, data) {
$("#waifuMode").prop("checked", power_user.waifuMode);
$("#movingUImode").prop("checked", power_user.movingUI);
$("#noShadowsmode").prop("checked", power_user.noShadows);
$("#start_reply_with").val(power_user.user_prompt_bias);
$("#chat-show-reply-prefix-checkbox").prop("checked", power_user.show_user_prompt_bias);
$("#multigen").prop("checked", power_user.multigen);
$("#multigen_first_chunk").val(power_user.multigen_first_chunk);
$("#multigen_next_chunks").val(power_user.multigen_next_chunks);
@@ -1074,6 +1078,17 @@ $(document).ready(() => {
reloadMarkdownProcessor(power_user.render_formulas);
});
$("#start_reply_with").on('input', function() {
power_user.user_prompt_bias = $(this).val();
saveSettingsDebounced();
});
$("#chat-show-reply-prefix-checkbox").change(function () {
power_user.show_user_prompt_bias = !!$(this).prop("checked");
reloadCurrentChat();
saveSettingsDebounced();
})
$("#multigen").change(function () {
power_user.multigen = $(this).prop("checked");
saveSettingsDebounced();