Extend debounce duration of logprobs renderer

This commit is contained in:
Cohee 2024-02-24 15:03:57 +02:00
parent 9287ff18de
commit eaadfea639
2 changed files with 2 additions and 2 deletions

View File

@ -2666,8 +2666,8 @@ class StreamingProcessor {
} }
const continueMsg = this.type === 'continue' ? this.messageAlreadyGenerated : undefined; const continueMsg = this.type === 'continue' ? this.messageAlreadyGenerated : undefined;
await saveChatConditional();
saveLogprobsForActiveMessage(this.messageLogprobs.filter(Boolean), continueMsg); saveLogprobsForActiveMessage(this.messageLogprobs.filter(Boolean), continueMsg);
await saveChatConditional();
activateSendButtons(); activateSendButtons();
showSwipeButtons(); showSwipeButtons();
setGenerationProgress(0); setGenerationProgress(0);

View File

@ -466,7 +466,7 @@ function convertTokenIdLogprobsToText(input) {
} }
export function initLogprobs() { export function initLogprobs() {
const debouncedRender = debounce(renderAlternativeTokensView, 250); const debouncedRender = debounce(renderAlternativeTokensView, 500);
$('#logprobsViewerClose').click(onToggleLogprobsPanel); $('#logprobsViewerClose').click(onToggleLogprobsPanel);
$('#option_toggle_logprobs').click(onToggleLogprobsPanel); $('#option_toggle_logprobs').click(onToggleLogprobsPanel);
eventSource.on(event_types.CHAT_CHANGED, debouncedRender); eventSource.on(event_types.CHAT_CHANGED, debouncedRender);