Skip to content

Commit b7e8bad

Browse files
0x4139arthw
authored andcommitted
server : fix URL.parse in the UI (ggml-org#8646)
1 parent e2d7ec4 commit b7e8bad

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)