Skip to content

GH-1260: Batching strategy improvements in TokenCountBatchingStrategy #1280

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

sobychacko
Copy link
Contributor

  • Precompute Document token count before sub-batching them as List<List<Document>>.
  • Configurable threshold value for the upper bound of max input tokens.

Resolves #1260

…BatchingStrategy`

- Precompute Document token count before sub-batching them as `List<List<Document>>`.
- Configurable threshold value for the upper bound of max input tokens.

Resolves spring-projects#1260
@markpollack markpollack self-assigned this Sep 4, 2024
@markpollack
Copy link
Member

merged in 73d0b30

renamed 'thresholdFactor' to 'reservePercentage' for clarity and refactored the formula to use (1 - reservePercentage) for clarity

@markpollack markpollack closed this Sep 4, 2024
@markpollack markpollack added this to the 1.0.0-M3 milestone Sep 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Batching strategy improvements
2 participants