I use TTMSMCPCloudAIService component of TMS AI Studio 1.7.0.0, with Claude API to extract invoice data from an invoice file. I would like to know the token usage for Claude API requests.
According to TMS documentation ( TTMSMCPCloudAI - TMS AI Studio ),
PromptTokens is the number of tokens taken by the LLM prompt,
CompletionTokens is the number of tokens that the response contains, and
TotalTokens is the total number of tokens used by the LLM request.
But after a successful call to Claude API, the component indicates PromptTokens: 2770, CompletionTokens: 0, TotalTokens: 581 (this is a particular example, in other examples the numbers can be different).
The value for CompletionTokens is 0, so it does not correspond to documentation that indicates it "is the number of tokens that the response contains".
Also, TotalTokens does not correspond with the sum of PromptTokens and CompletionTokens.
I have made a call to Mistral API, and in this case, the TotalTokens is equal to the sum of PromptTokens and CompletionTokens. So it seems the bug could be specific to Claude requests.
Thanks in advance