Browse Source
        
      
      update
      
        Signed-off-by: junjie.jiang <junjie.jiang@zilliz.com>
      
      
        main
      
      
     
    
    
    
	
		
			
				 1 changed files with 
5 additions and 
1 deletions
			 
			
		 
		
			
				- 
					
					
					 
					milvus_client.py
				
 
			
		
		
			
			
			
			
			
			
				
				
					
						
							
								
									
	
		
			
				| 
					
					
					
				 | 
				@ -1,6 +1,6 @@ | 
			
		
		
	
		
			
				 | 
				 | 
				import uuid | 
				 | 
				 | 
				import uuid | 
			
		
		
	
		
			
				 | 
				 | 
				import logging | 
				 | 
				 | 
				import logging | 
			
		
		
	
		
			
				 | 
				 | 
				from towhee.operator import PyOperator | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				from towhee.operator import PyOperator, SharedType | 
			
		
		
	
		
			
				 | 
				 | 
				from pymilvus import connections, Collection | 
				 | 
				 | 
				from pymilvus import connections, Collection | 
			
		
		
	
		
			
				 | 
				 | 
				
 | 
				 | 
				 | 
				
 | 
			
		
		
	
		
			
				 | 
				 | 
				
 | 
				 | 
				 | 
				
 | 
			
		
		
	
	
		
			
				| 
					
						
							
						
					
					
						
							
						
					
					
				 | 
				@ -39,3 +39,7 @@ class MilvusClient(PyOperator): | 
			
		
		
	
		
			
				 | 
				 | 
				        if mr.err_count > 0: | 
				 | 
				 | 
				        if mr.err_count > 0: | 
			
		
		
	
		
			
				 | 
				 | 
				            raise RuntimeError("Insert to milvus failed") | 
				 | 
				 | 
				            raise RuntimeError("Insert to milvus failed") | 
			
		
		
	
		
			
				 | 
				 | 
				        return None | 
				 | 
				 | 
				        return None | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				
 | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				    @property | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				    def shared_type(self): | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				        return SharedType.Shareable     | 
			
		
		
	
	
		
			
				| 
					
					
					
				 | 
				
  |