mirror of
https://git.mirrors.martin98.com/https://github.com/infiniflow/ragflow.git
synced 2025-04-19 12:39:59 +08:00

### What problem does this PR solve? Sometimes, the **s** in **chunks (s, a)** is an empty string. This causes the condition **if s and len(a) > 0** in the line **chunks = [(s, a) for s, a in chunks if s and len(a) > 0]** to fail, which changes the length of the new chunks. As a result, the final assertion **assert len(chunks) - end == n_clusters, "{} vs. {}".format(len(chunks) - end, n_clusters)** fails and raises a confusing error like 7 vs. 8 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue) - [ ] New Feature (non-breaking change which adds functionality) - [ ] Documentation Update - [ ] Refactoring - [ ] Performance Improvement - [ ] Other (please describe):