mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Move Horde and SD endpoints into separate files
This commit is contained in:
@@ -622,7 +622,7 @@ async function loadSamplers() {
|
||||
}
|
||||
|
||||
async function loadHordeSamplers() {
|
||||
const result = await fetch('/horde_samplers', {
|
||||
const result = await fetch('/api/horde/sd-samplers', {
|
||||
method: 'POST',
|
||||
headers: getRequestHeaders(),
|
||||
});
|
||||
@@ -721,7 +721,7 @@ async function loadModels() {
|
||||
}
|
||||
|
||||
async function loadHordeModels() {
|
||||
const result = await fetch('/horde_models', {
|
||||
const result = await fetch('/api/horde/sd-models', {
|
||||
method: 'POST',
|
||||
headers: getRequestHeaders(),
|
||||
});
|
||||
@@ -1084,7 +1084,7 @@ async function generateExtrasImage(prompt) {
|
||||
* @returns {Promise<{format: string, data: string}>} - A promise that resolves when the image generation and processing are complete.
|
||||
*/
|
||||
async function generateHordeImage(prompt) {
|
||||
const result = await fetch('/horde_generateimage', {
|
||||
const result = await fetch('/api/horde/generate-image', {
|
||||
method: 'POST',
|
||||
headers: getRequestHeaders(),
|
||||
body: JSON.stringify({
|
||||
|
@@ -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);
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user