Render prompt manager when switching APIs
This commit is contained in:
parent
908bf7a61d
commit
9106696f2f
|
@ -5452,20 +5452,7 @@ function changeMainAPI() {
|
|||
getHordeModels();
|
||||
}
|
||||
|
||||
switch (oai_settings.chat_completion_source) {
|
||||
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) {
|
||||
// Do not set up prompt manager more than once
|
||||
if (promptManager) return promptManager;
|
||||
if (promptManager) {
|
||||
promptManager.render(false);
|
||||
return promptManager;
|
||||
}
|
||||
|
||||
promptManager = new PromptManager();
|
||||
|
||||
|
|
Loading…
Reference in New Issue