mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Populate model list from models endpoint
This commit is contained in:
@ -1641,6 +1641,23 @@ function saveModelList(data) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (oai_settings.chat_completion_source == chat_completion_sources.NANOGPT) {
|
||||
$('#model_nanogpt_select').empty();
|
||||
model_list.forEach((model) => {
|
||||
$('#model_nanogpt_select').append(
|
||||
$('<option>', {
|
||||
value: model.id,
|
||||
text: model.id,
|
||||
}));
|
||||
});
|
||||
|
||||
if (!oai_settings.nanogpt_model && model_list.length > 0) {
|
||||
oai_settings.nanogpt_model = model_list[0].id;
|
||||
}
|
||||
|
||||
$('#model_nanogpt_select').val(oai_settings.nanogpt_model).trigger('change');
|
||||
}
|
||||
}
|
||||
|
||||
function appendOpenRouterOptions(model_list, groupModels = false, sort = false) {
|
||||
|
Reference in New Issue
Block a user