mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-03-02 02:47:52 +01:00
Return GENERATION_STARTED to original location. Add GENERATION_AFTER_COMMANDS
This commit is contained in:
parent
733fff4e22
commit
7dd8229df6
@ -413,7 +413,7 @@ export const event_types = {
|
||||
MESSAGE_FILE_EMBEDDED: 'message_file_embedded',
|
||||
IMPERSONATE_READY: 'impersonate_ready',
|
||||
CHAT_CHANGED: 'chat_id_changed',
|
||||
GENERATION_ENTERED: 'generation_entered',
|
||||
GENERATION_AFTER_COMMANDS: 'GENERATION_AFTER_COMMANDS',
|
||||
GENERATION_STARTED: 'generation_started',
|
||||
GENERATION_STOPPED: 'generation_stopped',
|
||||
GENERATION_ENDED: 'generation_ended',
|
||||
@ -3346,7 +3346,7 @@ export async function Generate(type, { automatic_trigger, force_name2, quiet_pro
|
||||
generation_started = new Date();
|
||||
|
||||
// Occurs every time, even if the generation is aborted due to slash commands execution
|
||||
await eventSource.emit(event_types.GENERATION_ENTERED, type, { automatic_trigger, force_name2, quiet_prompt, quietToLoud, skipWIAN, force_chid, signal, quietImage }, dryRun);
|
||||
await eventSource.emit(event_types.GENERATION_STARTED, type, { automatic_trigger, force_name2, quiet_prompt, quietToLoud, skipWIAN, force_chid, signal, quietImage }, dryRun);
|
||||
|
||||
// Don't recreate abort controller if signal is passed
|
||||
if (!(abortController && signal)) {
|
||||
@ -3368,7 +3368,7 @@ export async function Generate(type, { automatic_trigger, force_name2, quiet_pro
|
||||
}
|
||||
|
||||
// Occurs only if the generation is not aborted due to slash commands execution
|
||||
await eventSource.emit(event_types.GENERATION_STARTED, type, { automatic_trigger, force_name2, quiet_prompt, quietToLoud, skipWIAN, force_chid, signal, quietImage }, dryRun);
|
||||
await eventSource.emit(event_types.GENERATION_AFTER_COMMANDS, type, { automatic_trigger, force_name2, quiet_prompt, quietToLoud, skipWIAN, force_chid, signal, quietImage }, dryRun);
|
||||
|
||||
if (main_api == 'kobold' && kai_settings.streaming_kobold && !kai_flags.can_use_streaming) {
|
||||
toastr.error('Streaming is enabled, but the version of Kobold used does not support token streaming.', undefined, { timeOut: 10000, preventDuplicates: true });
|
||||
|
Loading…
x
Reference in New Issue
Block a user