First implementation for switching models for TabbyAPI

ToDo:
- Inform when API is ready after loading
- Fix display of loaded/selected model
- Verify that API key is admin key
This commit is contained in:
Kristan Schlikow
2024-03-16 18:23:53 +01:00
parent afeaca0fe0
commit 3e75c7cc38
5 changed files with 101 additions and 3 deletions

View File

@ -22,7 +22,7 @@ import {
parseTabbyLogprobs,
} from './scripts/textgen-settings.js';
const { MANCER, TOGETHERAI, OOBA, APHRODITE, OLLAMA, INFERMATICAI, DREAMGEN, OPENROUTER } = textgen_types;
const { MANCER, TOGETHERAI, OOBA, APHRODITE, OLLAMA, INFERMATICAI, DREAMGEN, OPENROUTER , TABBY } = textgen_types;
import {
world_info,
@ -1149,6 +1149,9 @@ async function getStatusTextgen() {
} else if (textgen_settings.type === APHRODITE) {
loadAphroditeModels(data?.data);
online_status = textgen_settings.aphrodite_model;
} else if (textgen_settings.type === TABBY) {
loadTabbyApiModels(data?.data);
online_status = textgen_settings.tabby_api_model;
} else {
online_status = data?.result;
}