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

[Bug] The chunk function in the FixedSizeChunking class is running into an infinite loop. #2119

Open
manishsarvaha12 opened this issue Feb 14, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@manishsarvaha12
Copy link

Description

The chunk function in the FixedSizeChunking class is running into an infinite loop when used specifically when change the overlap value other than zero.

Steps to Reproduce

Import FixedSizeChunking Class in your code and use the chunk function and try setting the overlap size to some value other than zero . Now run the code you will observe it runs into an infinite loop.

Expected Behavior

It was supposed to return the List of Documents which contains the result of fixed chunking .

Actual Behavior

It went into a never ending loop and no output of List of Documents was received.

Environment

  • OS: Ubuntu Linux
  • Agno Version: 1.0.8
  • Additional Environment Details: (e.g., Python 3.12.3)

Possible Solutions (optional)

In fixed.py where inside the FixedChunking Class there is chunk function there replace the first while loop condition:-
(Line No. 27)

  • earlier version :- while start < content._length:
  • updated version:- while start + self.overlap < content._length:
@manishsarvaha12 manishsarvaha12 added the bug Something isn't working label Feb 14, 2025
@manishsarvaha12
Copy link
Author

Resolved the issue in pull request #2121 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant