forked from open-webui/open-webui
feat: stop continue regeneration
This commit is contained in:
parent
30f0f34790
commit
5bcbb7810e
3 changed files with 8 additions and 2 deletions
|
@ -65,7 +65,7 @@
|
||||||
await tick();
|
await tick();
|
||||||
|
|
||||||
if (tooltipInstance) {
|
if (tooltipInstance) {
|
||||||
tooltipInstance[0].destroy();
|
tooltipInstance[0]?.destroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
renderLatex();
|
renderLatex();
|
||||||
|
|
|
@ -709,6 +709,9 @@
|
||||||
|
|
||||||
if (messages.length != 0 && messages.at(-1).done == true) {
|
if (messages.length != 0 && messages.at(-1).done == true) {
|
||||||
const responseMessage = history.messages[history.currentId];
|
const responseMessage = history.messages[history.currentId];
|
||||||
|
responseMessage.done = false;
|
||||||
|
await tick();
|
||||||
|
|
||||||
const modelTag = $models.filter((m) => m.name === responseMessage.model).at(0);
|
const modelTag = $models.filter((m) => m.name === responseMessage.model).at(0);
|
||||||
|
|
||||||
if (modelTag?.external) {
|
if (modelTag?.external) {
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
} from '$lib/stores';
|
} from '$lib/stores';
|
||||||
import { copyToClipboard, splitStream, convertMessagesToHistory } from '$lib/utils';
|
import { copyToClipboard, splitStream, convertMessagesToHistory } from '$lib/utils';
|
||||||
|
|
||||||
import { generateChatCompletion, generateTitle } from '$lib/apis/ollama';
|
import { generateChatCompletion, generateTitle, cancelChatCompletion } from '$lib/apis/ollama';
|
||||||
import {
|
import {
|
||||||
addTagById,
|
addTagById,
|
||||||
createNewChat,
|
createNewChat,
|
||||||
|
@ -711,6 +711,9 @@
|
||||||
|
|
||||||
if (messages.length != 0 && messages.at(-1).done == true) {
|
if (messages.length != 0 && messages.at(-1).done == true) {
|
||||||
const responseMessage = history.messages[history.currentId];
|
const responseMessage = history.messages[history.currentId];
|
||||||
|
responseMessage.done = false;
|
||||||
|
await tick();
|
||||||
|
|
||||||
const modelTag = $models.filter((m) => m.name === responseMessage.model).at(0);
|
const modelTag = $models.filter((m) => m.name === responseMessage.model).at(0);
|
||||||
|
|
||||||
if (modelTag?.external) {
|
if (modelTag?.external) {
|
||||||
|
|
Loading…
Reference in a new issue