mirror of
https://github.com/open-webui/open-webui
synced 2024-11-28 15:05:07 +00:00
fix: chat completed
This commit is contained in:
parent
6199296205
commit
a3ecf62564
@ -247,13 +247,13 @@
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const chatCompletedHandler = async (model, messages) => {
|
const chatCompletedHandler = async (modelId, messages) => {
|
||||||
await mermaid.run({
|
await mermaid.run({
|
||||||
querySelector: '.mermaid'
|
querySelector: '.mermaid'
|
||||||
});
|
});
|
||||||
|
|
||||||
const res = await chatCompleted(localStorage.token, {
|
const res = await chatCompleted(localStorage.token, {
|
||||||
model: model.id,
|
model: modelId,
|
||||||
messages: messages.map((m) => ({
|
messages: messages.map((m) => ({
|
||||||
id: m.id,
|
id: m.id,
|
||||||
role: m.role,
|
role: m.role,
|
||||||
@ -902,7 +902,7 @@
|
|||||||
} else {
|
} else {
|
||||||
const messages = createMessagesList(responseMessageId);
|
const messages = createMessagesList(responseMessageId);
|
||||||
|
|
||||||
await chatCompletedHandler(model, messages);
|
await chatCompletedHandler(model.id, messages);
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user