From 076548d0a33ec73341f2975c3764963a4c338867 Mon Sep 17 00:00:00 2001 From: Vali Malinoiu <0x4139@gmail.com> Date: Tue, 23 Jul 2024 15:24:49 +0300 Subject: [PATCH] fix llama-server ui: Replace URL.parse Method in llama-server ui --- examples/server/public/index-new.html | 2 +- examples/server/public/index.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/server/public/index-new.html b/examples/server/public/index-new.html index bf2b0a3f0..c87dd8f1e 100644 --- a/examples/server/public/index-new.html +++ b/examples/server/public/index-new.html @@ -225,7 +225,7 @@ throw new Error("already running"); } controller.value = new AbortController(); - for await (const chunk of llama(prompt, llamaParams, { controller: controller.value, api_url: URL.parse('.', document.baseURI).href })) { + for await (const chunk of llama(prompt, llamaParams, { controller: controller.value, api_url: new URL('.', document.baseURI).href })) { const data = chunk.data; if (data.stop) { while ( diff --git a/examples/server/public/index.html b/examples/server/public/index.html index a15424613..48628a960 100644 --- a/examples/server/public/index.html +++ b/examples/server/public/index.html @@ -479,7 +479,7 @@ throw new Error("already running"); } controller.value = new AbortController(); - for await (const chunk of llama(prompt, llamaParams, { controller: controller.value, api_url: URL.parse('.', document.baseURI).href })) { + for await (const chunk of llama(prompt, llamaParams, { controller: controller.value, api_url: new URL('.', document.baseURI).href })) { const data = chunk.data; if (data.stop) {