Merge branch 'staging' into tags-as-folders-enhancements
This commit is contained in:
commit
7f909b99f9
|
@ -1279,16 +1279,27 @@
|
|||
<input class="neo-range-slider" type="range" id="min_length_textgenerationwebui" name="volume" min="0" max="2000" step="1" />
|
||||
<input class="neo-range-input" type="number" min="0" max="2000" step="1" data-for="min_length_textgenerationwebui" id="min_length_counter_textgenerationwebui">
|
||||
</div>
|
||||
<div data-newbie-hidden data-tg-type="ooba, koboldcpp, aphrodite, tabby" class="alignitemscenter flex-container flexFlowColumn flexBasis48p flexGrow flexShrink gap0">
|
||||
<small data-i18n="Smoothing Factor">Smoothing Factor</small>
|
||||
<input class="neo-range-slider" type="range" id="smoothing_factor_textgenerationwebui" name="volume" min="0" max="10" step="0.01" />
|
||||
<input class="neo-range-input" type="number" min="0" max="10" step="0.01" data-for="smoothing_factor_textgenerationwebui" id="smoothing_factor_counter_textgenerationwebui">
|
||||
</div>
|
||||
<div data-newbie-hidden data-tg-type="ooba" class="alignitemscenter flex-container flexFlowColumn flexBasis48p flexGrow flexShrink gap0">
|
||||
<small data-i18n="Max Tokens Second">Maximum tokens/second</small>
|
||||
<input class="neo-range-slider" type="range" id="max_tokens_second_textgenerationwebui" name="volume" min="0" max="20" step="1" />
|
||||
<input class="neo-range-input" type="number" min="0" max="20" step="1" data-for="max_tokens_second_textgenerationwebui" id="max_tokens_second_counter_textgenerationwebui">
|
||||
</div>
|
||||
<div data-newbie-hidden name="smoothingBlock" class="wide100p">
|
||||
<h4 class="wide100p textAlignCenter">
|
||||
<label data-i18n="Smooth Sampling">Smooth Sampling</label>
|
||||
<div class=" fa-solid fa-circle-info opacity50p " data-i18n="[title]Smooth Sampling" title="Allows you to use quadratic/cubic transformations to adjust the distribution. Lower Smoothing Factor values will be more creative, usually between 0.2-0.3 is the sweetspot (assuming the curve = 1). Higher Smoothing Curve values will make the curve steeper, which will punish low probability choices more aggressively. 1.0 curve is equivalent to only using Smoothing Factor."></div>
|
||||
</h4>
|
||||
<div data-newbie-hidden data-tg-type="ooba, koboldcpp, aphrodite, tabby" class="alignitemscenter flex-container flexFlowColumn flexBasis48p flexGrow flexShrink gap0">
|
||||
<small data-i18n="Smoothing Factor">Smoothing Factor</small>
|
||||
<input class="neo-range-slider" type="range" id="smoothing_factor_textgenerationwebui" name="volume" min="0" max="10" step="0.01" />
|
||||
<input class="neo-range-input" type="number" min="0" max="10" step="0.01" data-for="smoothing_factor_textgenerationwebui" id="smoothing_factor_counter_textgenerationwebui">
|
||||
</div>
|
||||
<div data-newbie-hidden data-tg-type="ooba, koboldcpp, aphrodite, tabby" class="alignitemscenter flex-container flexFlowColumn flexBasis48p flexGrow flexShrink gap0">
|
||||
<small data-i18n="Smoothing Curve">Smoothing Curve</small>
|
||||
<input class="neo-range-slider" type="range" id="smoothing_curve_textgenerationwebui" name="volume" min="1" max="10" step="0.01" />
|
||||
<input class="neo-range-input" type="number" min="1" max="10" step="0.01" data-for="smoothing_curve_textgenerationwebui" id="smoothing_curve_counter_textgenerationwebui">
|
||||
</div>
|
||||
</div>
|
||||
<!--
|
||||
<div data-tg-type="aphrodite" class="alignitemscenter flex-container flexFlowColumn flexBasis48p flexGrow flexShrink gap0" data-i18n="Responses">
|
||||
<small>Responses</small>
|
||||
|
|
|
@ -8511,8 +8511,8 @@ jQuery(async function () {
|
|||
await clearChat();
|
||||
chat.length = 0;
|
||||
|
||||
chat_file_for_del = getCurrentChatDetails().sessionName
|
||||
const isDelChatCheckbox = document.getElementById('del_chat_checkbox').checked
|
||||
chat_file_for_del = getCurrentChatDetails().sessionName;
|
||||
const isDelChatCheckbox = document.getElementById('del_chat_checkbox').checked;
|
||||
|
||||
if (selected_group) {
|
||||
//Fix it; When you're creating a new group chat (but not when initially converting from the existing regular chat), the first greeting message doesn't automatically get translated.
|
||||
|
|
|
@ -604,7 +604,7 @@ async function showExtensionsDetails() {
|
|||
${htmlDefault}
|
||||
${htmlExternal}
|
||||
`;
|
||||
popupPromise = callPopup(`<div class="extensions_info">${html}</div>`, 'text');
|
||||
popupPromise = callPopup(`<div class="extensions_info">${html}</div>`, 'text', '', { okButton: 'Close', wide: true, large: true });
|
||||
} catch (error) {
|
||||
toastr.error('Error loading extensions. See browser console for details.');
|
||||
console.error(error);
|
||||
|
|
|
@ -46,6 +46,42 @@ function getLastMessage() {
|
|||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the last message from the user.
|
||||
* @returns {string} The last message from the user.
|
||||
*/
|
||||
function getLastUserMessage() {
|
||||
if (!Array.isArray(chat) || chat.length === 0) {
|
||||
return '';
|
||||
}
|
||||
|
||||
for (let i = chat.length - 1; i >= 0; i--) {
|
||||
if (chat[i].is_user && !chat[i].is_system) {
|
||||
return chat[i].mes;
|
||||
}
|
||||
}
|
||||
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the last message from the bot.
|
||||
* @returns {string} The last message from the bot.
|
||||
*/
|
||||
function getLastCharMessage() {
|
||||
if (!Array.isArray(chat) || chat.length === 0) {
|
||||
return '';
|
||||
}
|
||||
|
||||
for (let i = chat.length - 1; i >= 0; i--) {
|
||||
if (!chat[i].is_user && !chat[i].is_system) {
|
||||
return chat[i].mes;
|
||||
}
|
||||
}
|
||||
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the ID of the last swipe.
|
||||
* @returns {string} The 1-based ID of the last swipe
|
||||
|
@ -238,6 +274,8 @@ export function evaluateMacros(content, env) {
|
|||
content = content.replace(/{{maxPrompt}}/gi, () => String(getMaxContextSize()));
|
||||
content = content.replace(/{{lastMessage}}/gi, () => getLastMessage());
|
||||
content = content.replace(/{{lastMessageId}}/gi, () => getLastMessageId());
|
||||
content = content.replace(/{{lastUserMessage}}/gi, () => getLastUserMessage());
|
||||
content = content.replace(/{{lastCharMessage}}/gi, () => getLastCharMessage());
|
||||
content = content.replace(/{{firstIncludedMessageId}}/gi, () => getFirstIncludedMessageId());
|
||||
content = content.replace(/{{lastSwipeId}}/gi, () => getLastSwipeId());
|
||||
content = content.replace(/{{currentSwipeId}}/gi, () => getCurrentSwipeId());
|
||||
|
|
|
@ -630,6 +630,7 @@ async function CreateZenSliders(elmnt) {
|
|||
if (sliderID == 'min_temp_textgenerationwebui' ||
|
||||
sliderID == 'max_temp_textgenerationwebui' ||
|
||||
sliderID == 'dynatemp_exponent_textgenerationwebui' ||
|
||||
sliderID == 'smoothing_curve_textgenerationwebui' ||
|
||||
sliderID == 'smoothing_factor_textgenerationwebui') {
|
||||
decimals = 2;
|
||||
}
|
||||
|
@ -690,6 +691,7 @@ async function CreateZenSliders(elmnt) {
|
|||
sliderID == 'top_k' ||
|
||||
sliderID == 'rep_pen_slope' ||
|
||||
sliderID == 'smoothing_factor_textgenerationwebui' ||
|
||||
sliderID == 'smoothing_curve_textgenerationwebui' ||
|
||||
sliderID == 'min_length_textgenerationwebui') {
|
||||
offVal = 0;
|
||||
}
|
||||
|
|
|
@ -112,6 +112,7 @@ const settings = {
|
|||
max_temp: 2.0,
|
||||
dynatemp_exponent: 1.0,
|
||||
smoothing_factor: 0.0,
|
||||
smoothing_curve: 1.0,
|
||||
max_tokens_second: 0,
|
||||
seed: -1,
|
||||
preset: 'Default',
|
||||
|
@ -182,6 +183,7 @@ const setting_names = [
|
|||
'max_temp',
|
||||
'dynatemp_exponent',
|
||||
'smoothing_factor',
|
||||
'smoothing_curve',
|
||||
'max_tokens_second',
|
||||
'encoder_rep_pen',
|
||||
'freq_pen',
|
||||
|
@ -658,6 +660,7 @@ jQuery(function () {
|
|||
'typical_p_textgenerationwebui': 1, // Added entry
|
||||
'guidance_scale_textgenerationwebui': 1,
|
||||
'smoothing_factor_textgenerationwebui': 0,
|
||||
'smoothing_curve_textgenerationwebui': 1,
|
||||
};
|
||||
|
||||
for (const [id, value] of Object.entries(inputs)) {
|
||||
|
@ -1002,6 +1005,7 @@ export function getTextGenGenerationData(finalPrompt, maxTokens, isImpersonate,
|
|||
'dynatemp_range': settings.dynatemp ? (settings.max_temp - settings.min_temp) / 2 : 0,
|
||||
'dynatemp_exponent': settings.dynatemp ? settings.dynatemp_exponent : 1,
|
||||
'smoothing_factor': settings.smoothing_factor,
|
||||
'smoothing_curve': settings.smoothing_curve,
|
||||
'max_tokens_second': settings.max_tokens_second,
|
||||
'sampler_priority': settings.type === OOBA ? settings.sampler_priority : undefined,
|
||||
'samplers': settings.type === LLAMACPP ? settings.samplers : undefined,
|
||||
|
|
|
@ -207,7 +207,7 @@ const DREAMGEN_KEYS = [
|
|||
'presence_penalty',
|
||||
'stop',
|
||||
'stream',
|
||||
'minimum_message_content_tokens'
|
||||
'minimum_message_content_tokens',
|
||||
];
|
||||
|
||||
// https://docs.together.ai/reference/completions
|
||||
|
|
|
@ -6,7 +6,7 @@ const SOURCES = {
|
|||
secretKey: SECRET_KEYS.NOMICAI,
|
||||
url: 'api-atlas.nomic.ai/v1/embedding/text',
|
||||
model: 'nomic-embed-text-v1.5',
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue