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

Return number of input tokens when details=True #83

Open
tgaddair opened this issue Nov 29, 2023 · 1 comment
Open

Return number of input tokens when details=True #83

tgaddair opened this issue Nov 29, 2023 · 1 comment
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@tgaddair
Copy link
Contributor

We return the number of generated tokens when details=True, but systems like OpenAI API also return the number of input tokens. This i useful, for example, for metering systems that limit users based on number of input + output tokens.

Current:

'details': {'generated_tokens': 20}

Proposal:

'details': {'prompt_tokens': 120, 'generated_tokens': 20}
@tgaddair tgaddair added enhancement New feature or request good first issue Good for newcomers labels Nov 29, 2023
@wiredinhp
Copy link

@tgaddair Hi there ! I am a new contributor to this repository and would love to contribute by solving this issue. Could you please assign this issue to me ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants