mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-01-20 21:41:32 +01:00
Emit events on changing chatcompletion source or model
This commit is contained in:
parent
1281417a97
commit
2805a684a8
@ -257,6 +257,8 @@ export const event_types = {
|
||||
MOVABLE_PANELS_RESET: 'movable_panels_reset',
|
||||
SETTINGS_LOADED_BEFORE: 'settings_loaded_before',
|
||||
SETTINGS_LOADED_AFTER: 'settings_loaded_after',
|
||||
CHATCOMPLETION_SOURCE_CHANGED: 'chatcompletion_source_changed',
|
||||
CHATCOMPLETION_MODEL_CHANGED: 'chatcompletion_model_changed',
|
||||
OAI_BEFORE_CHATCOMPLETION: 'oai_before_chatcompletion',
|
||||
OAI_PRESET_CHANGED: 'oai_preset_changed',
|
||||
WORLDINFO_SETTINGS_UPDATED: 'worldinfo_settings_updated',
|
||||
|
@ -2585,6 +2585,7 @@ async function onModelChange() {
|
||||
}
|
||||
|
||||
saveSettingsDebounced();
|
||||
eventSource.emit(event_types.CHATCOMPLETION_MODEL_CHANGED, value);
|
||||
}
|
||||
|
||||
async function onNewPresetClick() {
|
||||
@ -2918,6 +2919,8 @@ $(document).ready(function () {
|
||||
if (main_api == 'openai') {
|
||||
reconnectOpenAi();
|
||||
}
|
||||
|
||||
eventSource.emit(event_types.CHATCOMPLETION_SOURCE_CHANGED, oai_settings.chat_completion_source);
|
||||
});
|
||||
|
||||
$('#oai_max_context_unlocked').on('input', function () {
|
||||
|
Loading…
Reference in New Issue
Block a user