Add TogetherAI as a chat completion source, basic

This commit is contained in:
Fayiron
2023-12-16 14:39:30 +01:00
parent 2e6ab8be46
commit 9f2d32524c
5 changed files with 16 additions and 6 deletions

View File

@ -5326,6 +5326,7 @@ function changeMainAPI() {
case chat_completion_sources.OPENAI:
case chat_completion_sources.AI21:
case chat_completion_sources.PALM:
case chat_completion_sources.TOGETHERAI:
default:
setupChatCompletionPromptManager(oai_settings);
break;
@ -7460,6 +7461,11 @@ function connectAPISlash(_, text) {
source: 'palm',
button: '#api_button_openai',
},
'togetherai': {
selected: 'openai',
source: 'togetherai',
button: '#api_button_openai',
},
};
const apiConfig = apiMap[text];
@ -7734,7 +7740,7 @@ jQuery(async function () {
}
registerSlashCommand('dupe', DupeChar, [], ' duplicates the currently selected character', true, true);
registerSlashCommand('api', connectAPISlash, [], '<span class="monospace">(kobold, horde, novel, ooba, oai, claude, windowai, openrouter, scale, ai21, palm)</span> connect to an API', true, true);
registerSlashCommand('api', connectAPISlash, [], '<span class="monospace">(kobold, horde, novel, ooba, oai, claude, windowai, openrouter, scale, ai21, palm, togetherai)</span> connect to an API', true, true);
registerSlashCommand('impersonate', doImpersonate, ['imp'], ' calls an impersonation response', true, true);
registerSlashCommand('delchat', doDeleteChat, [], ' deletes the current chat', true, true);
registerSlashCommand('closechat', doCloseChat, [], ' closes the current chat', true, true);