Move NovelAI endpoints to separate file

This commit is contained in:
Cohee
2023-09-15 17:54:13 +03:00
parent 0f1a0963fd
commit 599904d589
7 changed files with 440 additions and 418 deletions

View File

@@ -159,7 +159,7 @@ async function generateHypeBot() {
abortController = new AbortController();
const response = await fetch('/generate_novelai', {
const response = await fetch('/api/novelai/generate', {
headers: getRequestHeaders(),
body: JSON.stringify(parameters),
method: 'POST',

View File

@@ -170,7 +170,7 @@ class NovelTtsProvider {
async fetchTtsGeneration(inputText, voiceId) {
console.info(`Generating new TTS for voice_id ${voiceId}`)
const response = await fetch(`/novel_tts`,
const response = await fetch(`/api/novelai/generate-voice`,
{
method: 'POST',
headers: getRequestHeaders(),