#1627 Bypass status check and custom model for textgen type
This commit is contained in:
parent
394e703d92
commit
5f93c30a96
|
@ -1850,6 +1850,7 @@
|
||||||
<small data-i18n="Example: http://127.0.0.1:5000 ">Example: http://127.0.0.1:5000</small>
|
<small data-i18n="Example: http://127.0.0.1:5000 ">Example: http://127.0.0.1:5000</small>
|
||||||
<input id="textgenerationwebui_api_url_text" name="textgenerationwebui_api_url" class="text_pole wide100p" maxlength="500" value="" autocomplete="off" data-server-history="ooba_blocking">
|
<input id="textgenerationwebui_api_url_text" name="textgenerationwebui_api_url" class="text_pole wide100p" maxlength="500" value="" autocomplete="off" data-server-history="ooba_blocking">
|
||||||
</div>
|
</div>
|
||||||
|
<input id="custom_model_textgenerationwebui" class="text_pole wide100p" maxlength="500" placeholder="Custom model (optional)" type="text">
|
||||||
</div>
|
</div>
|
||||||
<div data-tg-type="aphrodite">
|
<div data-tg-type="aphrodite">
|
||||||
<div class="flex-container flexFlowColumn">
|
<div class="flex-container flexFlowColumn">
|
||||||
|
@ -1951,6 +1952,10 @@
|
||||||
<input type="checkbox" id="legacy_api_textgenerationwebui" />
|
<input type="checkbox" id="legacy_api_textgenerationwebui" />
|
||||||
<span data-i18n="Legacy API (pre-OAI, no streaming)">Legacy API (pre-OAI, no streaming)</span>
|
<span data-i18n="Legacy API (pre-OAI, no streaming)">Legacy API (pre-OAI, no streaming)</span>
|
||||||
</label>
|
</label>
|
||||||
|
<label data-tg-type="ooba" class="checkbox_label margin-bot-10px" for="bypass_status_check_textgenerationwebui">
|
||||||
|
<input type="checkbox" id="bypass_status_check_textgenerationwebui" />
|
||||||
|
<span data-i18n="Bypass status check">Bypass status check</span>
|
||||||
|
</label>
|
||||||
</form>
|
</form>
|
||||||
<div class="online_status">
|
<div class="online_status">
|
||||||
<div class="online_status_indicator"></div>
|
<div class="online_status_indicator"></div>
|
||||||
|
|
|
@ -954,6 +954,11 @@ async function getStatusTextgen() {
|
||||||
return resultCheckStatus();
|
return resultCheckStatus();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (textgen_settings.type == OOBA && textgen_settings.bypass_status_check) {
|
||||||
|
online_status = 'Status check bypassed';
|
||||||
|
return resultCheckStatus();
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const response = await fetch(url, {
|
const response = await fetch(url, {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
|
|
|
@ -311,6 +311,8 @@ class PresetManager {
|
||||||
'ollama_model',
|
'ollama_model',
|
||||||
'server_urls',
|
'server_urls',
|
||||||
'type',
|
'type',
|
||||||
|
'custom_model',
|
||||||
|
'bypass_status_check',
|
||||||
];
|
];
|
||||||
const settings = Object.assign({}, getSettingsByApiId(this.apiId));
|
const settings = Object.assign({}, getSettingsByApiId(this.apiId));
|
||||||
|
|
||||||
|
|
|
@ -110,6 +110,8 @@ const settings = {
|
||||||
logit_bias: [],
|
logit_bias: [],
|
||||||
n: 1,
|
n: 1,
|
||||||
server_urls: {},
|
server_urls: {},
|
||||||
|
custom_model: '',
|
||||||
|
bypass_status_check: false,
|
||||||
};
|
};
|
||||||
|
|
||||||
export let textgenerationwebui_banned_in_macros = [];
|
export let textgenerationwebui_banned_in_macros = [];
|
||||||
|
@ -163,6 +165,8 @@ const setting_names = [
|
||||||
'sampler_order',
|
'sampler_order',
|
||||||
'n',
|
'n',
|
||||||
'logit_bias',
|
'logit_bias',
|
||||||
|
'custom_model',
|
||||||
|
'bypass_status_check',
|
||||||
];
|
];
|
||||||
|
|
||||||
export function validateTextGenUrl() {
|
export function validateTextGenUrl() {
|
||||||
|
@ -665,6 +669,10 @@ function toIntArray(string) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function getModel() {
|
function getModel() {
|
||||||
|
if (settings.type === OOBA && settings.custom_model) {
|
||||||
|
return settings.custom_model;
|
||||||
|
}
|
||||||
|
|
||||||
if (settings.type === MANCER) {
|
if (settings.type === MANCER) {
|
||||||
return settings.mancer_model;
|
return settings.mancer_model;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue