这是indexloc提供的服务,不要输入任何密码
Skip to content

Make the Token Count actual #19

@dharamghevariya

Description

@dharamghevariya

Current Implementation: repo-contextr currently uses a simple character-based approximation (~4 characters per token) for token counting. While this provides quick estimates that work reasonably well for English code and documentation, it's not perfectly accurate for real-world LLM usage.

Future Enhancement: We plan to integrate OpenAI's tiktoken library to provide accurate token counts that exactly match GPT-3.5, GPT-4, and other OpenAI models. This will give you precise token estimates for context planning, cost estimation, and optimization decisions when working with LLMs.

This issue was inspired by the implementation of the token count feature in repomix.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions