Skip to content

Commit

Permalink
server : fix URL.parse in the UI (ggerganov#8646)
Browse files Browse the repository at this point in the history
  • Loading branch information
0x4139 authored Jul 23, 2024
1 parent 64cf50a commit b841d07
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion examples/server/public/index-new.html
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
2 changes: 1 addition & 1 deletion examples/server/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit b841d07

Please sign in to comment.