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',
|
GENERATE_BEFORE_COMBINE_PROMPTS: 'generate_before_combine_prompts',
|
||||||
GROUP_MEMBER_DRAFTED: 'group_member_drafted',
|
GROUP_MEMBER_DRAFTED: 'group_member_drafted',
|
||||||
WORLD_INFO_ACTIVATED: 'world_info_activated',
|
WORLD_INFO_ACTIVATED: 'world_info_activated',
|
||||||
|
TEXT_COMPLETION_SETTINGS_READY: 'text_completion_settings_ready',
|
||||||
};
|
};
|
||||||
|
|
||||||
export const eventSource = new EventEmitter();
|
export const eventSource = new EventEmitter();
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
import {
|
import {
|
||||||
|
eventSource,
|
||||||
|
event_types,
|
||||||
getRequestHeaders,
|
getRequestHeaders,
|
||||||
getStoppingStrings,
|
getStoppingStrings,
|
||||||
max_context,
|
max_context,
|
||||||
|
@ -1048,6 +1050,8 @@ export function getTextGenGenerationData(finalPrompt, maxTokens, isImpersonate,
|
||||||
params = Object.assign(params, llamaCppParams);
|
params = Object.assign(params, llamaCppParams);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
eventSource.emitAndWait(event_types.TEXT_COMPLETION_SETTINGS_READY, params);
|
||||||
|
|
||||||
return params;
|
return params;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue