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 @@
} from '$lib/stores';
import { copyToClipboard, splitStream, convertMessagesToHistory } from '$lib/utils';
import { generateChatCompletion, generateTitle, cancelChatCompletion } from '$lib/apis/ollama';
import { generateChatCompletion, generateTitle, cancelOllamaRequest } from '$lib/apis/ollama';
import {
addTagById,
createNewChat,
......@@ -382,7 +382,7 @@
if (stopResponseFlag) {
controller.abort('User: Stop Response');
await cancelChatCompletion(localStorage.token, currentRequestId);
await cancelOllamaRequest(localStorage.token, currentRequestId);
}
currentRequestId = null;
......@@ -843,7 +843,7 @@
shareEnabled={messages.length > 0}
initNewChat={async () => {
if (currentRequestId !== null) {
await cancelChatCompletion(localStorage.token, currentRequestId);
await cancelOllamaRequest(localStorage.token, currentRequestId);
currentRequestId = null;
}
......
......@@ -13,7 +13,7 @@
} from '$lib/constants';
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 { splitStream } from '$lib/utils';
......@@ -52,7 +52,7 @@
// const cancelHandler = async () => {
// if (currentRequestId) {
// const res = await cancelChatCompletion(localStorage.token, currentRequestId);
// const res = await cancelOllamaRequest(localStorage.token, currentRequestId);
// currentRequestId = null;
// loading = false;
// }
......@@ -95,7 +95,7 @@
const { value, done } = await reader.read();
if (done || stopResponseFlag) {
if (stopResponseFlag) {
await cancelChatCompletion(localStorage.token, currentRequestId);
await cancelOllamaRequest(localStorage.token, currentRequestId);
}
currentRequestId = null;
......@@ -181,7 +181,7 @@
const { value, done } = await reader.read();
if (done || stopResponseFlag) {
if (stopResponseFlag) {
await cancelChatCompletion(localStorage.token, currentRequestId);
await cancelOllamaRequest(localStorage.token, currentRequestId);
}
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