Skip to content

Commit 076548d

Browse files
committed
fix llama-server ui: Replace URL.parse Method in llama-server ui
1 parent 938943c commit 076548d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

examples/server/public/index-new.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@
225225
throw new Error("already running");
226226
}
227227
controller.value = new AbortController();
228-
for await (const chunk of llama(prompt, llamaParams, { controller: controller.value, api_url: URL.parse('.', document.baseURI).href })) {
228+
for await (const chunk of llama(prompt, llamaParams, { controller: controller.value, api_url: new URL('.', document.baseURI).href })) {
229229
const data = chunk.data;
230230
if (data.stop) {
231231
while (

examples/server/public/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,7 @@
479479
throw new Error("already running");
480480
}
481481
controller.value = new AbortController();
482-
for await (const chunk of llama(prompt, llamaParams, { controller: controller.value, api_url: URL.parse('.', document.baseURI).href })) {
482+
for await (const chunk of llama(prompt, llamaParams, { controller: controller.value, api_url: new URL('.', document.baseURI).href })) {
483483
const data = chunk.data;
484484

485485
if (data.stop) {

0 commit comments

Comments
 (0)