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

I need to obtain prompt_token and perfection_token. How can I modify the source code to obtain this information? #569

Open
lichao4Java opened this issue Jan 21, 2025 · 0 comments

Comments

@lichao4Java
Copy link

How to obtain the tokens consumption of a model through api/search API access, such as using an openai model, and how to obtain the model token consumed by a single request, such as:

"usage": {
"prompt_tokens": 13,
"completion_tokens": 7,
"total_tokens": 20,
"completion_tokens_details": {
"reasoning_tokens": 0,
"accepted_prediction_tokens": 0,
"rejected_prediction_tokens": 0
}
}

I need to obtain prompt_token and perfection_token. How can I modify the source code to obtain this information?

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