mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
fix items lost on merge
This commit is contained in:
@ -2201,7 +2201,6 @@ async function Generate(type, { automatic_trigger, force_name2, resolve, reject,
|
|||||||
breakdown_bar.empty();
|
breakdown_bar.empty();
|
||||||
|
|
||||||
const total = Object.values(counts).filter(x => !Number.isNaN(x)).reduce((acc, val) => acc + val, 0);
|
const total = Object.values(counts).filter(x => !Number.isNaN(x)).reduce((acc, val) => acc + val, 0);
|
||||||
console.log(`oai start tokens: ${Object.entries(counts)[0][1]}`);
|
|
||||||
|
|
||||||
thisPromptBits.push({
|
thisPromptBits.push({
|
||||||
oaiStartTokens: Object.entries(counts)[0][1],
|
oaiStartTokens: Object.entries(counts)[0][1],
|
||||||
@ -2215,9 +2214,6 @@ async function Generate(type, { automatic_trigger, force_name2, resolve, reject,
|
|||||||
oaiTotalTokens: total,
|
oaiTotalTokens: total,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
console.log(`added OAI prompt bits to array`);
|
|
||||||
|
|
||||||
Object.entries(counts).forEach(([type, value]) => {
|
Object.entries(counts).forEach(([type, value]) => {
|
||||||
if (value === 0) {
|
if (value === 0) {
|
||||||
return;
|
return;
|
||||||
@ -2554,6 +2550,8 @@ function promptItemize(itemizedPrompts, requestedMesId) {
|
|||||||
var worldInfoStringTokensPercentage = ((worldInfoStringTokens / (finalPromptTokens)) * 100).toFixed(2);
|
var worldInfoStringTokensPercentage = ((worldInfoStringTokens / (finalPromptTokens)) * 100).toFixed(2);
|
||||||
var allAnchorsTokensPercentage = ((allAnchorsTokens / (finalPromptTokens)) * 100).toFixed(2);
|
var allAnchorsTokensPercentage = ((allAnchorsTokens / (finalPromptTokens)) * 100).toFixed(2);
|
||||||
var selectedTokenizer = `tiktoken (${oai_settings.openai_model})`;
|
var selectedTokenizer = `tiktoken (${oai_settings.openai_model})`;
|
||||||
|
var oaiSystemTokens = oaiImpersonateTokens + oaiJailbreakTokens + oaiNudgeTokens + oaiStartTokens;
|
||||||
|
var oaiSystemTokensPercentage = ((oaiSystemTokens / (finalPromptTokens)) * 100).toFixed(2);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
//console.log('-- applying % on non-OAI tokens');
|
//console.log('-- applying % on non-OAI tokens');
|
||||||
@ -2603,7 +2601,7 @@ function promptItemize(itemizedPrompts, requestedMesId) {
|
|||||||
</div>
|
</div>
|
||||||
<div class="flex-container ">
|
<div class="flex-container ">
|
||||||
<div class=" flex1 tokenItemizingSubclass">-- NSFW: </div>
|
<div class=" flex1 tokenItemizingSubclass">-- NSFW: </div>
|
||||||
<div class="tokenItemizingSubclass">${oaiSystemTokens}</div>
|
<div class="tokenItemizingSubclass">??</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex-container ">
|
<div class="flex-container ">
|
||||||
<div class=" flex1 tokenItemizingSubclass">-- Nudge: </div>
|
<div class=" flex1 tokenItemizingSubclass">-- Nudge: </div>
|
||||||
|
Reference in New Issue
Block a user