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

Feature Request: Add Token Count Estimation to Output #1

Open
not-an-llm opened this issue Nov 26, 2024 · 0 comments
Open

Feature Request: Add Token Count Estimation to Output #1

not-an-llm opened this issue Nov 26, 2024 · 0 comments

Comments

@not-an-llm
Copy link

I'd like to propose adding an estimated token count to the generated output. This would help users know if their generated text fits within their LLM's context window limits.

Proposed Feature:

  • Add an estimated token count at the beginning of both llms.txt and llms-full.txt files
  • Display format could be something like:
    Estimated Tokens: 12,345

Why this would be useful:

  • Helps users immediately know if the generated text will fit their LLM's context window
  • Prevents trial-and-error when loading large text files into LLMs
  • Makes it easier to split content into appropriate chunk sizes if needed

Implementation Suggestions:

  • Could use libraries like tiktoken or a simple character-based approximation
  • Token count could be placed in a header section or metadata block at the start of the 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

No branches or pull requests

1 participant