Skip to content
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

Test and unify text splitter functionality #1547

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

dayesouza
Copy link
Contributor

Description

The changes involve refactoring the text splitting methods, adding new helper functions, and updating the corresponding unit tests.

Proposed Changes

  • Replaced the _split_text_on_tokens function with split_multiple_texts_on_tokens to improve control over the chunking process.
  • Refactored the split_text method to handle both single and multiple texts, and added the split_single_text_on_tokens and split_multiple_texts_on_tokens functions for better text splitting
  • Added comprehensive unit tests for the new text splitting functions, including tests for edge cases and large inputs.

Checklist

  • I have tested these changes locally.
  • I have reviewed the code changes.
  • I have added appropriate unit tests.

@dayesouza dayesouza requested review from a team as code owners December 20, 2024 18:22
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.

2 participants