From f06d8c80ea6c07aaa3c2e8eda15cfc287f81c903 Mon Sep 17 00:00:00 2001 From: SouthFox Date: Tue, 13 Aug 2024 00:46:55 +0800 Subject: [PATCH] fix: use relative path for api --- static/script.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/script.js b/static/script.js index 9026693..f52ad7c 100644 --- a/static/script.js +++ b/static/script.js @@ -37,7 +37,7 @@ async function sendMessage() { async function generateText(prompt) { try { - const response = await fetch("/generate_text_stream", { + const response = await fetch("./generate_text_stream", { method: "POST", headers: { "Content-Type": "application/json",