forked from open-webui/open-webui
		
	fix: make sure settings model exists
This commit is contained in:
		
							parent
							
								
									105784bd37
								
							
						
					
					
						commit
						2095d4abb2
					
				
					 1 changed files with 6 additions and 3 deletions
				
			
		|  | @ -39,7 +39,10 @@ | |||
| 			settings = JSON.parse(settings); | ||||
| 			console.log(settings); | ||||
| 
 | ||||
| 			selectedModel = settings.model ?? ''; | ||||
| 			selectedModel = | ||||
| 				settings.model && models.map((model) => model.name).includes(settings.model) | ||||
| 					? settings.model | ||||
| 					: ''; | ||||
| 			system = settings.system ?? null; | ||||
| 			temperature = settings.temperature ?? null; | ||||
| 		} | ||||
|  | @ -233,8 +236,8 @@ | |||
| 				return { models: [] }; | ||||
| 			}); | ||||
| 
 | ||||
| 		const data = res; | ||||
| 		models = data.models; | ||||
| 		console.log(res); | ||||
| 		models = res.models ?? []; | ||||
| 	}; | ||||
| 
 | ||||
| 	const submitPrompt = async (user_prompt) => { | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Timothy J. Baek
						Timothy J. Baek