Retrieving total total consumed tokens per thread per assistant

Mohamed Hussein 45 Reputation points
2024-11-06T20:13:41.0866667+00:00

Good Day,

Is there any REST API to get total consumed token per thread (not per run) at Azure OpenAI assistants, as one the higlighted at the playground

User's image

Azure OpenAI Service
Azure OpenAI Service
An Azure service that provides access to OpenAI’s GPT-3 models with enterprise capabilities.
3,224 questions
0 comments No comments
{count} votes

Accepted answer
  1. YutongTie-MSFT 52,776 Reputation points
    2024-11-06T23:23:35.3433333+00:00

    Hello Mohamed,

    Thanks for reaching out to us. I can understand this feature is truly useful for usage moderation, however, at this moment there is no API can get total consumed token per thread - https://learn.microsoft.com/en-us/azure/ai-services/openai/assistants-reference-threads?tabs=python#tool_resources-properties

    I will forward your feedback to product team but we have no ETA for it.

    Right now, only run object provides usage information - https://learn.microsoft.com/en-us/azure/ai-services/openai/assistants-reference-runs?tabs=python#run-object

    Assistant API is only in preview stage so please feel free to share your feedback!

    Regards,

    Yutong

    -Please kindly accept the answer if you feel helpful to support the community, thanks a lot.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.