I saw it is possible to get token usage output for completion models if I do streaming. What if I don’t want to do streaming, how can I access the token usage? Specifically, the number of output tokens.
Was only able to find the runs object within Assistant endpoint and not completion.
If you are using Assistant’s API, the run object has it. You may hit the endpoint or use SDK to retrieve the object and infer form “usage”. Hope this helps. Cheers
right, but I am using the completion API, where can I see it there?
Even completion comes with usage. Check this completions object out.
1 Like