mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-02-21 14:40:48 +01:00
Render prompt manager when switching APIs
This commit is contained in:
parent
908bf7a61d
commit
9106696f2f
@ -5452,20 +5452,7 @@ function changeMainAPI() {
|
|||||||
getHordeModels();
|
getHordeModels();
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (oai_settings.chat_completion_source) {
|
setupChatCompletionPromptManager(oai_settings);
|
||||||
case chat_completion_sources.SCALE:
|
|
||||||
case chat_completion_sources.OPENROUTER:
|
|
||||||
case chat_completion_sources.WINDOWAI:
|
|
||||||
case chat_completion_sources.CLAUDE:
|
|
||||||
case chat_completion_sources.OPENAI:
|
|
||||||
case chat_completion_sources.AI21:
|
|
||||||
case chat_completion_sources.MAKERSUITE:
|
|
||||||
case chat_completion_sources.MISTRALAI:
|
|
||||||
case chat_completion_sources.CUSTOM:
|
|
||||||
default:
|
|
||||||
setupChatCompletionPromptManager(oai_settings);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////
|
////////////////////////////////////////////////////
|
||||||
|
@ -482,7 +482,10 @@ function setOpenAIMessageExamples(mesExamplesArray) {
|
|||||||
*/
|
*/
|
||||||
function setupChatCompletionPromptManager(openAiSettings) {
|
function setupChatCompletionPromptManager(openAiSettings) {
|
||||||
// Do not set up prompt manager more than once
|
// Do not set up prompt manager more than once
|
||||||
if (promptManager) return promptManager;
|
if (promptManager) {
|
||||||
|
promptManager.render(false);
|
||||||
|
return promptManager;
|
||||||
|
}
|
||||||
|
|
||||||
promptManager = new PromptManager();
|
promptManager = new PromptManager();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user