Add event type for text completion generation request settings ready
This commit is contained in:
parent
d5bf9fc28c
commit
fc289126fa
|
@ -397,6 +397,7 @@ export const event_types = {
|
|||
GENERATE_BEFORE_COMBINE_PROMPTS: 'generate_before_combine_prompts',
|
||||
GROUP_MEMBER_DRAFTED: 'group_member_drafted',
|
||||
WORLD_INFO_ACTIVATED: 'world_info_activated',
|
||||
TEXT_COMPLETION_SETTINGS_READY: 'text_completion_settings_ready',
|
||||
};
|
||||
|
||||
export const eventSource = new EventEmitter();
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
import {
|
||||
eventSource,
|
||||
event_types,
|
||||
getRequestHeaders,
|
||||
getStoppingStrings,
|
||||
max_context,
|
||||
|
@ -1048,6 +1050,8 @@ export function getTextGenGenerationData(finalPrompt, maxTokens, isImpersonate,
|
|||
params = Object.assign(params, llamaCppParams);
|
||||
}
|
||||
|
||||
eventSource.emitAndWait(event_types.TEXT_COMPLETION_SETTINGS_READY, params);
|
||||
|
||||
return params;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue