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

Add a token limit flat to the command. #41

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

shanecp
Copy link

@shanecp shanecp commented Apr 3, 2023

  • Add token limit flag and file limit, so output can be split by tokens
  • Update docs to support
  • Add requirements file.

This gives a solution for #35, #37. Perhaps #26

- Update docs to support
- Add requirements file.

This gives a solution for mpoon#35, mpoon#37. Perhaps mpoon#26
@shanecp shanecp requested a review from mpoon as a code owner April 3, 2023 07:36
@davidvasandani
Copy link

Tested with a huge repo using the following params and output:

-t 62000000 -m 20

Writing to file output_1.txt
Written 61963289 tokens to file.
Writing to file output_2.txt
Written 61914604 tokens to file.
Writing to file output_3.txt
Written 23705417 tokens to file.
Writing to file output_4.txt
Written 1191179680 tokens to file.
Writing to file output_5.txt
Repository contents written to 5 file(s).

output_4.txt is 1191179680 tokens which is greater than the specified 62000000 tokens.

@shanecp
Copy link
Author

shanecp commented May 30, 2023

If a source file is larger than the given output token limit, there are only a few options.

  • Ignore the token limit, and output the complete file (This is the current method chosen. That's why you might be seeing a file going above the token limit)
  • Split input file to multiple output files
  • Ignore that file

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