forked from open-webui/open-webui
		
	feat: reset rag template
This commit is contained in:
		
							parent
							
								
									a31feccd64
								
							
						
					
					
						commit
						07b451995e
					
				
					 1 changed files with 3 additions and 1 deletions
				
			
		|  | @ -172,7 +172,9 @@ class RAGTemplateForm(BaseModel): | ||||||
| @app.post("/template/update") | @app.post("/template/update") | ||||||
| async def update_rag_template(form_data: RAGTemplateForm, user=Depends(get_admin_user)): | async def update_rag_template(form_data: RAGTemplateForm, user=Depends(get_admin_user)): | ||||||
|     # TODO: check template requirements |     # TODO: check template requirements | ||||||
|     app.state.RAG_TEMPLATE = form_data.template |     app.state.RAG_TEMPLATE = ( | ||||||
|  |         form_data.template if form_data.template != "" else RAG_TEMPLATE | ||||||
|  |     ) | ||||||
|     return {"status": True, "template": app.state.RAG_TEMPLATE} |     return {"status": True, "template": app.state.RAG_TEMPLATE} | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Timothy J. Baek
						Timothy J. Baek