forked from open-webui/open-webui
		
	refac: frontend
This commit is contained in:
		
							parent
							
								
									582d11f191
								
							
						
					
					
						commit
						098ba6ea4e
					
				
					 1 changed files with 3 additions and 11 deletions
				
			
		|  | @ -35,9 +35,6 @@ | |||
| 		k: 4 | ||||
| 	}; | ||||
| 
 | ||||
| 	let embeddingModelConfig = { | ||||
| 		embedding_model: '' | ||||
| 	}; | ||||
| 	let embeddingModel = ''; | ||||
| 
 | ||||
| 	const scanHandler = async () => { | ||||
|  | @ -66,9 +63,9 @@ | |||
| 		updateEmbeddingModelLoading = true; | ||||
| 		const res = await updateEmbeddingModel(localStorage.token, { | ||||
| 			embedding_model: embeddingModel | ||||
| 		}).catch((error) => { | ||||
| 		}).catch(async (error) => { | ||||
| 			toast.error(error); | ||||
| 			embeddingModel = embeddingModelConfig.embedding_model; | ||||
| 			embeddingModel = (await getEmbeddingModel(localStorage.token)).embedding_model; | ||||
| 			return null; | ||||
| 		}); | ||||
| 		updateEmbeddingModelLoading = false; | ||||
|  | @ -79,10 +76,6 @@ | |||
| 				toast.success($i18n.t('Model {{embedding_model}} update complete!', res), { | ||||
| 					duration: 1000 * 10 | ||||
| 				}); | ||||
| 			} else { | ||||
| 				toast.error($i18n.t('Model {{embedding_model}} update failed or not required!', res), { | ||||
| 					duration: 1000 * 10 | ||||
| 				}); | ||||
| 			} | ||||
| 		} | ||||
| 	}; | ||||
|  | @ -108,8 +101,7 @@ | |||
| 			chunkOverlap = res.chunk.chunk_overlap; | ||||
| 		} | ||||
| 
 | ||||
| 		embeddingModelConfig = await getEmbeddingModel(localStorage.token); | ||||
| 		embeddingModel = embeddingModelConfig.embedding_model; | ||||
| 		embeddingModel = (await getEmbeddingModel(localStorage.token)).embedding_model; | ||||
| 
 | ||||
| 		querySettings = await getQuerySettings(localStorage.token); | ||||
| 	}); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Timothy J. Baek
						Timothy J. Baek