Merge pull request #746 from ollama-webui/continue

fix: title
This commit is contained in:
Timothy Jaeryang Baek 2024-02-15 04:30:47 -05:00 committed by GitHub
commit 83be93f9ff
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 24 additions and 4 deletions

View file

@ -708,9 +708,19 @@
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) {
await sendPromptOpenAI(responseMessage.model, prompt, responseMessage.id, _chatId); await sendPromptOpenAI(
responseMessage.model,
history.messages[responseMessage.parentId].content,
responseMessage.id,
_chatId
);
} else if (modelTag) { } else if (modelTag) {
await sendPromptOllama(responseMessage.model, prompt, responseMessage.id, _chatId); await sendPromptOllama(
responseMessage.model,
history.messages[responseMessage.parentId].content,
responseMessage.id,
_chatId
);
} else { } else {
toast.error(`Model ${model} not found`); toast.error(`Model ${model} not found`);
} }

View file

@ -709,9 +709,19 @@
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) {
await sendPromptOpenAI(responseMessage.model, prompt, responseMessage.id, _chatId); await sendPromptOpenAI(
responseMessage.model,
history.messages[responseMessage.parentId].content,
responseMessage.id,
_chatId
);
} else if (modelTag) { } else if (modelTag) {
await sendPromptOllama(responseMessage.model, prompt, responseMessage.id, _chatId); await sendPromptOllama(
responseMessage.model,
history.messages[responseMessage.parentId].content,
responseMessage.id,
_chatId
);
} else { } else {
toast.error(`Model ${model} not found`); toast.error(`Model ${model} not found`);
} }