mirror of
https://github.com/open-webui/open-webui
synced 2024-11-16 05:24:02 +00:00
Merge pull request #465 from anuraagdjain/fix/sanitized-model
fix: sanitized model name
This commit is contained in:
commit
bc3df5ac51
@ -314,8 +314,9 @@
|
||||
};
|
||||
|
||||
const pullModelHandler = async () => {
|
||||
if (modelDownloadStatus[modelTag]) {
|
||||
toast.error(`Model '${modelTag}' is already in queue for downloading.`);
|
||||
const sanitizedModelTag = modelTag.trim();
|
||||
if (modelDownloadStatus[sanitizedModelTag]) {
|
||||
toast.error(`Model '${sanitizedModelTag}' is already in queue for downloading.`);
|
||||
return;
|
||||
}
|
||||
if (Object.keys(modelDownloadStatus).length === 3) {
|
||||
@ -326,7 +327,7 @@
|
||||
modelTransferring = true;
|
||||
|
||||
modelDownloadQueue.push(
|
||||
{ modelName: modelTag },
|
||||
{ modelName: sanitizedModelTag },
|
||||
async (data: { modelName: string; success: boolean; error?: Error }) => {
|
||||
const { modelName } = data;
|
||||
// Remove the downloaded model
|
||||
|
Loading…
Reference in New Issue
Block a user