Remove last usage of getAPIServerUrl
Now that we're not using this in the tokenizers code, we can remove it.
This commit is contained in:
parent
014416546c
commit
499d158c11
|
@ -871,7 +871,7 @@ async function getStatusKobold() {
|
||||||
|
|
||||||
const url = '/getstatus';
|
const url = '/getstatus';
|
||||||
|
|
||||||
let endpoint = getAPIServerUrl();
|
let endpoint = api_server;
|
||||||
|
|
||||||
if (!endpoint) {
|
if (!endpoint) {
|
||||||
console.warn('No endpoint for status check');
|
console.warn('No endpoint for status check');
|
||||||
|
@ -919,7 +919,9 @@ async function getStatusKobold() {
|
||||||
async function getStatusTextgen() {
|
async function getStatusTextgen() {
|
||||||
const url = '/api/textgenerationwebui/status';
|
const url = '/api/textgenerationwebui/status';
|
||||||
|
|
||||||
let endpoint = getAPIServerUrl();
|
let endpoint = textgen_settings.type === MANCER ?
|
||||||
|
MANCER_SERVER :
|
||||||
|
api_server_textgenerationwebui;
|
||||||
|
|
||||||
if (!endpoint) {
|
if (!endpoint) {
|
||||||
console.warn('No endpoint for status check');
|
console.warn('No endpoint for status check');
|
||||||
|
@ -999,23 +1001,6 @@ export function resultCheckStatus() {
|
||||||
stopStatusLoading();
|
stopStatusLoading();
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO(valadaptive): remove the usage of this function in the tokenizers code, then remove the function entirely
|
|
||||||
export function getAPIServerUrl() {
|
|
||||||
if (main_api == 'textgenerationwebui') {
|
|
||||||
if (textgen_settings.type === MANCER) {
|
|
||||||
return MANCER_SERVER;
|
|
||||||
}
|
|
||||||
|
|
||||||
return api_server_textgenerationwebui;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (main_api == 'kobold') {
|
|
||||||
return api_server;
|
|
||||||
}
|
|
||||||
|
|
||||||
return '';
|
|
||||||
}
|
|
||||||
|
|
||||||
export async function selectCharacterById(id) {
|
export async function selectCharacterById(id) {
|
||||||
if (characters[id] == undefined) {
|
if (characters[id] == undefined) {
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue