Merge pull request #762 from ollama-webui/continue

feat: stop continue regeneration
This commit is contained in:
Timothy Jaeryang Baek 2024-02-16 17:00:04 -05:00 committed by GitHub
commit 67053d28c4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 8 additions and 2 deletions

View File

@ -65,7 +65,7 @@
await tick();
if (tooltipInstance) {
tooltipInstance[0].destroy();
tooltipInstance[0]?.destroy();
}
renderLatex();

View File

@ -709,6 +709,9 @@
if (messages.length != 0 && messages.at(-1).done == true) {
const responseMessage = history.messages[history.currentId];
responseMessage.done = false;
await tick();
const modelTag = $models.filter((m) => m.name === responseMessage.model).at(0);
if (modelTag?.external) {

View File

@ -18,7 +18,7 @@
} from '$lib/stores';
import { copyToClipboard, splitStream, convertMessagesToHistory } from '$lib/utils';
import { generateChatCompletion, generateTitle } from '$lib/apis/ollama';
import { generateChatCompletion, generateTitle, cancelChatCompletion } from '$lib/apis/ollama';
import {
addTagById,
createNewChat,
@ -711,6 +711,9 @@
if (messages.length != 0 && messages.at(-1).done == true) {
const responseMessage = history.messages[history.currentId];
responseMessage.done = false;
await tick();
const modelTag = $models.filter((m) => m.name === responseMessage.model).at(0);
if (modelTag?.external) {