zylon-ai / private-gpt

Interact with your documents using the power of GPT, 100% privately, no data leaks

Home Page:https://privategpt.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Could not get token usage when use openai

ks-dipeshc opened this issue · comments

Hello,
Thank you to create Private-GPT.

I used openai model for Private-GPT. everything is working fine, but I could not get the token usage for the question-answer.
I need to know how many tokens were used for prompt and completion, so I can charge from my customer accordingly.

I used the Chat completion API: https://docs.privategpt.dev/api-reference/api-reference/contextual-completions/chat-completion
But in response there is no token usage.

Thank you.