| 
				
			 | 
			
			 | 
			@@ -29,7 +29,18 @@ import requests | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			def factories(): | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			    try: | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			        fac = LLMFactoriesService.get_all() | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			        return get_json_result(data=[f.to_dict() for f in fac if f.name not in ["Youdao", "FastEmbed", "BAAI"]]) | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			        fac = [f.to_dict() for f in fac if f.name not in ["Youdao", "FastEmbed", "BAAI"]] | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			        llms = LLMService.get_all() | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			        mdl_types = {} | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			        for m in llms: | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			            if m.status != StatusEnum.VALID.value: | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			                continue | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			            if m.fid not in mdl_types: | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			                mdl_types[m.fid] = set([]) | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			            mdl_types[m.fid].add(m.model_type) | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			        for f in fac: | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			            f["model_types"] = list(mdl_types.get(f["name"], [])) | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			        return get_json_result(data=fac) | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			    except Exception as e: | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			        return server_error_response(e) | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			
  |