Unverified Commit 371dfc11 authored by Timothy Jaeryang Baek's avatar Timothy Jaeryang Baek Committed by GitHub
Browse files

Merge branch 'dev' into debug_print

parents f74f2ea7 a1faa307
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
} from '$lib/stores'; } from '$lib/stores';
import { copyToClipboard, splitStream, convertMessagesToHistory } from '$lib/utils'; import { copyToClipboard, splitStream, convertMessagesToHistory } from '$lib/utils';
import { generateChatCompletion, generateTitle, cancelChatCompletion } from '$lib/apis/ollama'; import { generateChatCompletion, generateTitle, cancelOllamaRequest } from '$lib/apis/ollama';
import { import {
addTagById, addTagById,
createNewChat, createNewChat,
...@@ -382,7 +382,7 @@ ...@@ -382,7 +382,7 @@
if (stopResponseFlag) { if (stopResponseFlag) {
controller.abort('User: Stop Response'); controller.abort('User: Stop Response');
await cancelChatCompletion(localStorage.token, currentRequestId); await cancelOllamaRequest(localStorage.token, currentRequestId);
} }
currentRequestId = null; currentRequestId = null;
...@@ -843,7 +843,7 @@ ...@@ -843,7 +843,7 @@
shareEnabled={messages.length > 0} shareEnabled={messages.length > 0}
initNewChat={async () => { initNewChat={async () => {
if (currentRequestId !== null) { if (currentRequestId !== null) {
await cancelChatCompletion(localStorage.token, currentRequestId); await cancelOllamaRequest(localStorage.token, currentRequestId);
currentRequestId = null; currentRequestId = null;
} }
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
} from '$lib/constants'; } from '$lib/constants';
import { WEBUI_NAME, config, user, models, settings } from '$lib/stores'; import { WEBUI_NAME, config, user, models, settings } from '$lib/stores';
import { cancelChatCompletion, generateChatCompletion } from '$lib/apis/ollama'; import { cancelOllamaRequest, generateChatCompletion } from '$lib/apis/ollama';
import { generateOpenAIChatCompletion } from '$lib/apis/openai'; import { generateOpenAIChatCompletion } from '$lib/apis/openai';
import { splitStream } from '$lib/utils'; import { splitStream } from '$lib/utils';
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
// const cancelHandler = async () => { // const cancelHandler = async () => {
// if (currentRequestId) { // if (currentRequestId) {
// const res = await cancelChatCompletion(localStorage.token, currentRequestId); // const res = await cancelOllamaRequest(localStorage.token, currentRequestId);
// currentRequestId = null; // currentRequestId = null;
// loading = false; // loading = false;
// } // }
...@@ -95,7 +95,7 @@ ...@@ -95,7 +95,7 @@
const { value, done } = await reader.read(); const { value, done } = await reader.read();
if (done || stopResponseFlag) { if (done || stopResponseFlag) {
if (stopResponseFlag) { if (stopResponseFlag) {
await cancelChatCompletion(localStorage.token, currentRequestId); await cancelOllamaRequest(localStorage.token, currentRequestId);
} }
currentRequestId = null; currentRequestId = null;
...@@ -181,7 +181,7 @@ ...@@ -181,7 +181,7 @@
const { value, done } = await reader.read(); const { value, done } = await reader.read();
if (done || stopResponseFlag) { if (done || stopResponseFlag) {
if (stopResponseFlag) { if (stopResponseFlag) {
await cancelChatCompletion(localStorage.token, currentRequestId); await cancelOllamaRequest(localStorage.token, currentRequestId);
} }
currentRequestId = null; currentRequestId = null;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment