forked from open-webui/open-webui
		
	Merge pull request #262 from ollama-webui/custom-modelfile-load-fix
fix: custom modelfile url search param
This commit is contained in:
		
						commit
						77c1a77fcc
					
				
					 3 changed files with 7 additions and 4 deletions
				
			
		|  | @ -30,7 +30,7 @@ if ENV == "prod": | ||||||
| # WEBUI_VERSION | # WEBUI_VERSION | ||||||
| #################################### | #################################### | ||||||
| 
 | 
 | ||||||
| WEBUI_VERSION = os.environ.get("WEBUI_VERSION", "v1.0.0-alpha.33") | WEBUI_VERSION = os.environ.get("WEBUI_VERSION", "v1.0.0-alpha.34") | ||||||
| 
 | 
 | ||||||
| #################################### | #################################### | ||||||
| # WEBUI_AUTH | # WEBUI_AUTH | ||||||
|  |  | ||||||
|  | @ -98,7 +98,7 @@ | ||||||
| 				<div class=" flex space-x-4 cursor-pointer w-full mb-3"> | 				<div class=" flex space-x-4 cursor-pointer w-full mb-3"> | ||||||
| 					<a | 					<a | ||||||
| 						class=" flex flex-1 space-x-4 cursor-pointer w-full" | 						class=" flex flex-1 space-x-4 cursor-pointer w-full" | ||||||
| 						href={`/?models=${modelfile.tagName}`} | 						href={`/?models=${encodeURIComponent(modelfile.tagName)}`} | ||||||
| 					> | 					> | ||||||
| 						<div class=" self-center w-10"> | 						<div class=" self-center w-10"> | ||||||
| 							<div class=" rounded-full bg-stone-700"> | 							<div class=" rounded-full bg-stone-700"> | ||||||
|  | @ -121,7 +121,7 @@ | ||||||
| 						<a | 						<a | ||||||
| 							class="self-center w-fit text-sm px-2 py-2 border dark:border-gray-600 rounded-xl" | 							class="self-center w-fit text-sm px-2 py-2 border dark:border-gray-600 rounded-xl" | ||||||
| 							type="button" | 							type="button" | ||||||
| 							href={`/modelfiles/edit?tag=${modelfile.tagName}`} | 							href={`/modelfiles/edit?tag=${encodeURIComponent(modelfile.tagName)}`} | ||||||
| 						> | 						> | ||||||
| 							<svg | 							<svg | ||||||
| 								xmlns="http://www.w3.org/2000/svg" | 								xmlns="http://www.w3.org/2000/svg" | ||||||
|  |  | ||||||
|  | @ -93,7 +93,10 @@ SYSTEM """${system}"""`.replace(/^\s*\n/gm, ''); | ||||||
| 	}; | 	}; | ||||||
| 
 | 
 | ||||||
| 	const saveModelfile = async (modelfile) => { | 	const saveModelfile = async (modelfile) => { | ||||||
| 		await modelfiles.set([...$modelfiles, modelfile]); | 		await modelfiles.set([ | ||||||
|  | 			...$modelfiles.filter((m) => m.tagName !== modelfile.tagName), | ||||||
|  | 			modelfile | ||||||
|  | 		]); | ||||||
| 		localStorage.setItem('modelfiles', JSON.stringify($modelfiles)); | 		localStorage.setItem('modelfiles', JSON.stringify($modelfiles)); | ||||||
| 	}; | 	}; | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Timothy Jaeryang Baek
						Timothy Jaeryang Baek