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

Prompt Events Redundantly Count Tokens #479

Open
collindutter opened this issue Dec 5, 2023 · 0 comments
Open

Prompt Events Redundantly Count Tokens #479

collindutter opened this issue Dec 5, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@collindutter
Copy link
Member

We calculate token_count as part of StartPromptEvent and FinishPromptEvent Events here.

This can be improved in the following ways:

  • For StartPromptEvent, we should calculate this value once in the BasePromptDriver and then pass the value to subclasses.
  • For FinishPromptEvent, many of the LLMs will return the token count in the response. We should not calculate it ourselves unless the value is missing.
@collindutter collindutter added the enhancement New feature or request label Dec 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant