mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Enhance Vertex AI model selection by adding data-mode attributes
- Updated index.html to include data-mode attributes for model optgroups, distinguishing between express and full modes. - Modified openai.js to show/hide model groups based on the selected authentication mode, improving user experience and functionality.
This commit is contained in:
@@ -5538,23 +5538,15 @@ function onVertexAIAuthModeChange() {
|
||||
if (authMode === 'express') {
|
||||
$('#vertexai_express_config').show();
|
||||
$('#vertexai_full_config').hide();
|
||||
$('#vertexai_express_models').show();
|
||||
// Hide all full version model groups
|
||||
$('#vertexai_full_gemini_25').hide();
|
||||
$('#vertexai_full_gemini_20').hide();
|
||||
$('#vertexai_full_gemini_15').hide();
|
||||
$('#vertexai_full_gemma').hide();
|
||||
$('#vertexai_full_learnlm').hide();
|
||||
// Show express mode model groups and hide full version model groups
|
||||
$('#model_vertexai_select optgroup[data-mode="express"]').show();
|
||||
$('#model_vertexai_select optgroup[data-mode="full"]').hide();
|
||||
} else {
|
||||
$('#vertexai_express_config').hide();
|
||||
$('#vertexai_full_config').show();
|
||||
$('#vertexai_express_models').hide();
|
||||
// Show all full version model groups
|
||||
$('#vertexai_full_gemini_25').show();
|
||||
$('#vertexai_full_gemini_20').show();
|
||||
$('#vertexai_full_gemini_15').show();
|
||||
$('#vertexai_full_gemma').show();
|
||||
$('#vertexai_full_learnlm').show();
|
||||
// Hide express mode model groups and show full version model groups
|
||||
$('#model_vertexai_select optgroup[data-mode="express"]').hide();
|
||||
$('#model_vertexai_select optgroup[data-mode="full"]').show();
|
||||
}
|
||||
|
||||
saveSettingsDebounced();
|
||||
|
Reference in New Issue
Block a user