forked from open-webui/open-webui
		
	fix: sanitized model name
This commit is contained in:
		
							parent
							
								
									5c18d61d3f
								
							
						
					
					
						commit
						fc4235943d
					
				
					 1 changed files with 4 additions and 3 deletions
				
			
		|  | @ -314,8 +314,9 @@ | ||||||
| 	}; | 	}; | ||||||
| 
 | 
 | ||||||
| 	const pullModelHandler = async () => { | 	const pullModelHandler = async () => { | ||||||
| 		if (modelDownloadStatus[modelTag]) { | 		const sanitizedModelTag = modelTag.trim(); | ||||||
| 			toast.error(`Model '${modelTag}' is already in queue for downloading.`); | 		if (modelDownloadStatus[sanitizedModelTag]) { | ||||||
|  | 			toast.error(`Model '${sanitizedModelTag}' is already in queue for downloading.`); | ||||||
| 			return; | 			return; | ||||||
| 		} | 		} | ||||||
| 		if (Object.keys(modelDownloadStatus).length === 3) { | 		if (Object.keys(modelDownloadStatus).length === 3) { | ||||||
|  | @ -326,7 +327,7 @@ | ||||||
| 		modelTransferring = true; | 		modelTransferring = true; | ||||||
| 
 | 
 | ||||||
| 		modelDownloadQueue.push( | 		modelDownloadQueue.push( | ||||||
| 			{ modelName: modelTag }, | 			{ modelName: sanitizedModelTag }, | ||||||
| 			async (data: { modelName: string; success: boolean; error?: Error }) => { | 			async (data: { modelName: string; success: boolean; error?: Error }) => { | ||||||
| 				const { modelName } = data; | 				const { modelName } = data; | ||||||
| 				// Remove the downloaded model | 				// Remove the downloaded model | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Anuraag Jain
						Anuraag Jain