Context Size (tokens)
@@ -2507,11 +2498,6 @@
-
diff --git a/public/script.js b/public/script.js
index e189331de..c8f3c08bd 100644
--- a/public/script.js
+++ b/public/script.js
@@ -2432,9 +2432,6 @@ function getMaxContextSize() {
}
function parseTokenCounts(counts, thisPromptBits) {
- const breakdown_bar = $('#token_breakdown div:first-child');
- breakdown_bar.empty();
-
const total = Object.values(counts).filter(x => !Number.isNaN(x)).reduce((acc, val) => acc + val, 0);
thisPromptBits.push({
@@ -2448,22 +2445,6 @@ function parseTokenCounts(counts, thisPromptBits) {
oaiConversationTokens: Object.entries(counts)[7][1],
oaiTotalTokens: total,
});
-
- Object.entries(counts).forEach(([type, value]) => {
- if (value === 0) {
- return;
- }
- const percent_value = (value / total) * 100;
- const color = uniqolor(type, { saturation: 50, lightness: 75, }).color;
- const bar = document.createElement('div');
- bar.style.width = `${percent_value}%`;
- bar.classList.add('token_breakdown_segment');
- bar.style.backgroundColor = color + 'AA';
- bar.style.borderColor = color + 'FF';
- bar.innerText = value;
- bar.title = `${type}: ${percent_value.toFixed(2)}%`;
- breakdown_bar.append(bar);
- });
}
function adjustChatsSeparator(mesSendString) {
@@ -3582,10 +3563,8 @@ function changeMainAPI() {
// Hide common settings for OpenAI
if (selectedVal == "openai") {
$("#common-gen-settings-block").css("display", "none");
- //$("#token_breakdown").css("display", "flex");
} else {
$("#common-gen-settings-block").css("display", "block");
- //$("#token_breakdown").css("display", "none");
}
// Hide amount gen for poe
if (selectedVal == "poe") {
diff --git a/public/scripts/openai.js b/public/scripts/openai.js
index 19ee009ed..2b80dd64a 100644
--- a/public/scripts/openai.js
+++ b/public/scripts/openai.js
@@ -102,7 +102,6 @@ const default_settings = {
openai_model: 'gpt-3.5-turbo',
jailbreak_system: false,
reverse_proxy: '',
- oai_breakdown: false,
};
const oai_settings = {
@@ -127,7 +126,6 @@ const oai_settings = {
openai_model: 'gpt-3.5-turbo',
jailbreak_system: false,
reverse_proxy: '',
- oai_breakdown: false,
};
let openai_setting_names;
@@ -460,7 +458,7 @@ async function prepareOpenAIMessages(name2, storyString, worldInfoBefore, worldI
handler_instance.log();
return [
openai_msgs_tosend,
- oai_settings.oai_breakdown ? handler_instance.counts : false,
+ handler_instance.counts,
];
}
@@ -751,7 +749,6 @@ function loadOpenAISettings(data, settings) {
if (settings.nsfw_first !== undefined) oai_settings.nsfw_first = !!settings.nsfw_first;
if (settings.openai_model !== undefined) oai_settings.openai_model = settings.openai_model;
if (settings.jailbreak_system !== undefined) oai_settings.jailbreak_system = !!settings.jailbreak_system;
- if (settings.oai_breakdown !== undefined) oai_settings.oai_breakdown = !!settings.oai_breakdown;
$('#stream_toggle').prop('checked', oai_settings.stream_openai);
@@ -767,7 +764,6 @@ function loadOpenAISettings(data, settings) {
$('#wrap_in_quotes').prop('checked', oai_settings.wrap_in_quotes);
$('#nsfw_first').prop('checked', oai_settings.nsfw_first);
$('#jailbreak_system').prop('checked', oai_settings.jailbreak_system);
- $('#oai_breakdown').prop('checked', oai_settings.oai_breakdown);
if (settings.main_prompt !== undefined) oai_settings.main_prompt = settings.main_prompt;
if (settings.nsfw_prompt !== undefined) oai_settings.nsfw_prompt = settings.nsfw_prompt;
@@ -887,7 +883,7 @@ async function saveOpenAIPreset(name, settings) {
jailbreak_system: settings.jailbreak_system,
impersonation_prompt: settings.impersonation_prompt,
bias_preset_selected: settings.bias_preset_selected,
- oai_breakdown: settings.oai_breakdown,
+ reverse_proxy: settings.reverse_proxy,
};
const savePresetSettings = await fetch(`/savepreset_openai?name=${name}`, {
@@ -1146,12 +1142,12 @@ function onSettingsPresetChange() {
wrap_in_quotes: ['#wrap_in_quotes', 'wrap_in_quotes', true],
nsfw_first: ['#nsfw_first', 'nsfw_first', true],
jailbreak_system: ['#jailbreak_system', 'jailbreak_system', true],
- oai_breakdown: ['#oai_breakdown', 'oai_breakdown', true],
main_prompt: ['#main_prompt_textarea', 'main_prompt', false],
nsfw_prompt: ['#nsfw_prompt_textarea', 'nsfw_prompt', false],
jailbreak_prompt: ['#jailbreak_prompt_textarea', 'jailbreak_prompt', false],
impersonation_prompt: ['#impersonation_prompt_textarea', 'impersonation_prompt', false],
bias_preset_selected: ['#openai_logit_bias_preset', 'bias_preset_selected', false],
+ reverse_proxy: ['#openai_reverse_proxy', 'reverse_proxy', false],
};
for (const [key, [selector, setting, isCheckbox]] of Object.entries(settingsToUpdate)) {
@@ -1319,16 +1315,6 @@ $(document).ready(function () {
saveSettingsDebounced();
});
- $("#oai_breakdown").on('change', function () {
- oai_settings.oai_breakdown = !!$(this).prop("checked");
- if (!oai_settings.oai_breakdown) {
- $("#token_breakdown").css('display', 'none');
- } else {
- $("#token_breakdown").css('display', 'flex');
- }
- saveSettingsDebounced();
- });
-
// auto-select a preset based on character/group name
$(document).on("click", ".character_select", function () {
const chid = $(this).attr('chid');
diff --git a/public/style.css b/public/style.css
index d5bc238d0..7ddd0b5bf 100644
--- a/public/style.css
+++ b/public/style.css
@@ -427,19 +427,6 @@ code {
justify-content: center;
}
-#token_breakdown div {
- display: flex;
- width: 100%;
- justify-content: center;
-}
-
-.token_breakdown_segment {
- min-width: 40px !important;
- border: solid 2px;
- border-radius: 5px;
-}
-
-
#loading_mes {
display: none;
width: 40px;