Move Horde and SD endpoints into separate files

This commit is contained in:
Cohee
2023-09-12 20:45:36 +03:00
parent 51e2a3afcf
commit 66ec17620f
10 changed files with 492 additions and 423 deletions

View File

@ -107,7 +107,7 @@ async function generateHorde(prompt, params, signal) {
"models": horde_settings.models,
};
const response = await fetch("/generate_horde", {
const response = await fetch("/api/horde/generate-text", {
method: 'POST',
headers: {
...getRequestHeaders(),
@ -210,7 +210,7 @@ function loadHordeSettings(settings) {
}
async function showKudos() {
const response = await fetch('/horde_userinfo', {
const response = await fetch('/api/horde/user-info', {
method: 'POST',
headers: getRequestHeaders(),
});
@ -256,7 +256,7 @@ jQuery(function () {
})
$("#horde_api_key").on("input", async function () {
const key = $(this).val().trim();
const key = String($(this).val()).trim();
await writeSecret(SECRET_KEYS.HORDE, key);
});