#2085 Implement async token counting

This commit is contained in:
Cohee
2024-04-13 21:05:31 +03:00
parent ba397dd2a8
commit 1c4bad35b2
5 changed files with 229 additions and 26 deletions

View File

@ -42,7 +42,7 @@ import {
promptManagerDefaultPromptOrders,
} from './PromptManager.js';
import { getCustomStoppingStrings, persona_description_positions, power_user } from './power-user.js';
import { forceCharacterEditorTokenize, getCustomStoppingStrings, persona_description_positions, power_user } from './power-user.js';
import { SECRET_KEYS, secret_state, writeSecret } from './secrets.js';
import { getEventSourceStream } from './sse-stream.js';
@ -4429,6 +4429,7 @@ $(document).ready(async function () {
toggleChatCompletionForms();
saveSettingsDebounced();
reconnectOpenAi();
forceCharacterEditorTokenize();
eventSource.emit(event_types.CHATCOMPLETION_SOURCE_CHANGED, oai_settings.chat_completion_source);
});