mirror of
				https://github.com/infiniflow/ragflow.git
				synced 2025-10-31 01:40:20 +00:00 
			
		
		
		
	Fix: empty description (#5747)
### What problem does this PR solve? #5705 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
		
							parent
							
								
									5229a76f68
								
							
						
					
					
						commit
						06b29d7da4
					
				| @ -228,7 +228,7 @@ class KGSearch(Dealer): | ||||
|             ents.append({ | ||||
|                 "Entity": n, | ||||
|                 "Score": "%.2f" % (ent["sim"] * ent["pagerank"]), | ||||
|                 "Description": json.loads(ent["description"]).get("description", "") | ||||
|                 "Description": json.loads(ent["description"]).get("description", "") if ent["description"] else "" | ||||
|             }) | ||||
|             max_token -= num_tokens_from_string(str(ents[-1])) | ||||
|             if max_token <= 0: | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Kevin Hu
						Kevin Hu