mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-01-19 13:01:09 +01:00
Add event for chat completion settings ready
This commit is contained in:
parent
c8ed8e06f1
commit
caf236d60a
@ -415,6 +415,7 @@ export const event_types = {
|
|||||||
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',
|
TEXT_COMPLETION_SETTINGS_READY: 'text_completion_settings_ready',
|
||||||
|
CHAT_COMPLETION_SETTINGS_READY: 'chat_completion_settings_ready',
|
||||||
CHARACTER_FIRST_MESSAGE_SELECTED: 'character_first_message_selected',
|
CHARACTER_FIRST_MESSAGE_SELECTED: 'character_first_message_selected',
|
||||||
// TODO: Naming convention is inconsistent with other events
|
// TODO: Naming convention is inconsistent with other events
|
||||||
CHARACTER_DELETED: 'characterDeleted',
|
CHARACTER_DELETED: 'characterDeleted',
|
||||||
|
@ -1847,6 +1847,8 @@ async function sendOpenAIRequest(type, messages, signal) {
|
|||||||
generate_data['seed'] = oai_settings.seed;
|
generate_data['seed'] = oai_settings.seed;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
await eventSource.emit(event_types.CHAT_COMPLETION_SETTINGS_READY, generate_data);
|
||||||
|
|
||||||
const generate_url = '/api/backends/chat-completions/generate';
|
const generate_url = '/api/backends/chat-completions/generate';
|
||||||
const response = await fetch(generate_url, {
|
const response = await fetch(generate_url, {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
|
Loading…
Reference in New Issue
Block a user