mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Merge pull request #2412 from harrisonvanderbyl/modelsearch
add search functionality for models
This commit is contained in:
@@ -2877,11 +2877,12 @@
|
|||||||
</div>
|
</div>
|
||||||
<h4 data-i18n="Enter a Model ID">Enter a Model ID</h4>
|
<h4 data-i18n="Enter a Model ID">Enter a Model ID</h4>
|
||||||
<div class="flex-container">
|
<div class="flex-container">
|
||||||
<input id="custom_model_id" class="text_pole wide100p" maxlength="500" value="" autocomplete="off" data-i18n="[placeholder]Example: gpt-3.5-turbo" placeholder="Example: gpt-3.5-turbo">
|
<input list="model_custom_select_fill" id="custom_model_id" class="text_pole wide100p" maxlength="500" value="" autocomplete="off" data-i18n="[placeholder]Example: gpt-3.5-turbo" placeholder="Example: gpt-3.5-turbo">
|
||||||
|
<datalist id="model_custom_select_fill" class="text_pole model_custom_select"></datalist>
|
||||||
</div>
|
</div>
|
||||||
<h4 data-i18n="Available Models">Available Models</h4>
|
<h4 data-i18n="Available Models">Available Models</h4>
|
||||||
<div class="flex-container">
|
<div class="flex-container">
|
||||||
<select id="model_custom_select" class="text_pole"></select>
|
<select id="model_custom_select" class="text_pole model_custom_select"></select>
|
||||||
</div>
|
</div>
|
||||||
<h4 data-i18n="Prompt Post-Processing">Prompt Post-Processing</h4>
|
<h4 data-i18n="Prompt Post-Processing">Prompt Post-Processing</h4>
|
||||||
<select id="custom_prompt_post_processing" class="text_pole" title="Applies additional processing to the prompt before sending it to the API." data-i18n="[title]Applies additional processing to the prompt before sending it to the API.">
|
<select id="custom_prompt_post_processing" class="text_pole" title="Applies additional processing to the prompt before sending it to the API." data-i18n="[title]Applies additional processing to the prompt before sending it to the API.">
|
||||||
|
@@ -1551,10 +1551,10 @@ function saveModelList(data) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (oai_settings.chat_completion_source == chat_completion_sources.CUSTOM) {
|
if (oai_settings.chat_completion_source == chat_completion_sources.CUSTOM) {
|
||||||
$('#model_custom_select').empty();
|
$('.model_custom_select').empty();
|
||||||
$('#model_custom_select').append('<option value="">None</option>');
|
$('.model_custom_select').append('<option value="">None</option>');
|
||||||
model_list.forEach((model) => {
|
model_list.forEach((model) => {
|
||||||
$('#model_custom_select').append(
|
$('.model_custom_select').append(
|
||||||
$('<option>', {
|
$('<option>', {
|
||||||
value: model.id,
|
value: model.id,
|
||||||
text: model.id,
|
text: model.id,
|
||||||
@@ -3164,7 +3164,7 @@ async function getStatusOpen() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (oai_settings.chat_completion_source === chat_completion_sources.CUSTOM) {
|
if (oai_settings.chat_completion_source === chat_completion_sources.CUSTOM) {
|
||||||
$('#model_custom_select').empty();
|
$('.model_custom_select').empty();
|
||||||
data.custom_url = oai_settings.custom_url;
|
data.custom_url = oai_settings.custom_url;
|
||||||
data.custom_include_headers = oai_settings.custom_include_headers;
|
data.custom_include_headers = oai_settings.custom_include_headers;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user