[PR #27908] fix: total_batches calculation error #31889

Open
opened 2026-02-21 20:50:20 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/langgenius/dify/pull/27908

State: open
Merged: No


Fix total_batches calculation error

batch_size = 1000
total_batches = len(texts) + batch_size - 1

total_batches calculation error,i correct as below:
total_batches = (len(texts) + batch_size - 1) // batch_size

**Original Pull Request:** https://github.com/langgenius/dify/pull/27908 **State:** open **Merged:** No --- Fix total_batches calculation error batch_size = 1000 total_batches = len(texts) + batch_size - 1 total_batches calculation error,i correct as below: total_batches = (len(texts) + batch_size - 1) // batch_size
yindo added the pull-request label 2026-02-21 20:50:20 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#31889