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

Merged
merged 13 commits into from
Jan 13, 2025
Merged

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
natoverse
natoverse previously approved these changes Jan 6, 2025
@dayesouza dayesouza merged commit 2f2cfa7 into main Jan 13, 2025
15 checks passed
@dayesouza dayesouza deleted the tests/text_splitter branch January 13, 2025 21:42
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.

3 participants