diff --git a/api/apps/kb_app.py b/api/apps/kb_app.py index 53e42303f..d0c4469dd 100644 --- a/api/apps/kb_app.py +++ b/api/apps/kb_app.py @@ -819,7 +819,7 @@ def check_embedding(): return [] n = min(n, total) - offsets = sorted(random.sample(range(total), n)) + offsets = sorted(random.sample(range(min(total,1000)), n)) out = [] for off in offsets: