Kevin Hu
commited on
Commit
·
c78c46b
1
Parent(s):
d25748a
Fix page size error. (#4401)
Browse files### What problem does this PR solve?
#4400
### Type of change
- [x] Bug Fix (non-breaking change which fixes an issue)
- rag/nlp/search.py +1 -0
rag/nlp/search.py
CHANGED
@@ -371,6 +371,7 @@ class Dealer:
|
|
371 |
"count": v["count"]} for k,
|
372 |
v in sorted(ranks["doc_aggs"].items(),
|
373 |
key=lambda x:x[1]["count"] * -1)]
|
|
|
374 |
|
375 |
return ranks
|
376 |
|
|
|
371 |
"count": v["count"]} for k,
|
372 |
v in sorted(ranks["doc_aggs"].items(),
|
373 |
key=lambda x:x[1]["count"] * -1)]
|
374 |
+
ranks["chunks"] = ranks["chunks"][:page_size]
|
375 |
|
376 |
return ranks
|
377 |
|