Support for new webui 1.5.0 lora features

Prefers trigger words over the model-keyword ones
Uses custom per-lora multiplier if set
This commit is contained in:
DominikDoom
2023-07-26 14:38:51 +02:00
parent b28497764f
commit 2e271aea5c
7 changed files with 132 additions and 36 deletions

View File

@@ -61,6 +61,26 @@ async function loadCSV(path) {
return parseCSV(text);
}
// Fetch API
async function fetchAPI(url, json = true, cache = false) {
if (!cache) {
const appendChar = url.includes("?") ? "&" : "?";
url += `${appendChar}${new Date().getTime()}`
}
let response = await fetch(url);
if (response.status != 200) {
console.error(`Error fetching API endpoint "${url}": ` + response.status, response.statusText);
return null;
}
if (json)
return await response.json();
else
return await response.text();
}
// Debounce function to prevent spamming the autocomplete function
var dbTimeOut;
const debounce = (func, wait = 300) => {