mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
#2016 Fix NovelAI endpoint
This commit is contained in:
@@ -6,6 +6,7 @@ const { readAllChunks, extractFileFromZipBuffer, forwardFetchResponse } = requir
|
||||
const { jsonParser } = require('../express-common');
|
||||
|
||||
const API_NOVELAI = 'https://api.novelai.net';
|
||||
const IMAGE_NOVELAI = 'https://image.novelai.net';
|
||||
|
||||
// Ban bracket generation, plus defaults
|
||||
const badWordsList = [
|
||||
@@ -238,7 +239,7 @@ router.post('/generate-image', jsonParser, async (request, response) => {
|
||||
|
||||
try {
|
||||
console.log('NAI Diffusion request:', request.body);
|
||||
const generateUrl = `${API_NOVELAI}/ai/generate-image`;
|
||||
const generateUrl = `${IMAGE_NOVELAI}/ai/generate-image`;
|
||||
const generateResult = await fetch(generateUrl, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
@@ -289,7 +290,7 @@ router.post('/generate-image', jsonParser, async (request, response) => {
|
||||
|
||||
try {
|
||||
console.debug('Upscaling image...');
|
||||
const upscaleUrl = `${API_NOVELAI}/ai/upscale`;
|
||||
const upscaleUrl = `${IMAGE_NOVELAI}/ai/upscale`;
|
||||
const upscaleResult = await fetch(upscaleUrl, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
|
Reference in New Issue
Block a user