Token usage information from the A.I. chatbot.

INestiaAgentTokenUsage is a structure representing the token usage information from the NestiaAgent class. And you can get the token usage information by calling the NestiaAgent.getTokenUsage method.

For reference, INestiaAgentTokenUsage provides only the token usage information, and does not contain any price or cost information. It is because the price or cost can be changed by below reasons.

  • Type of LLM provider
  • INestiaAgentProvider.model in the LLM provider.
  • Just by a policy change of the LLM provider company.

Jeongho Nam - https://github.com/samchon

interface INestiaAgentTokenUsage {
    completion: ICompletion;
    prompt: IPrompt;
    total: number;
}

Properties

completion: ICompletion

Token usage in the completion.

In other words, it is called as the output token.

prompt: IPrompt

Token usage in the prompt.

In other words, it is called as the input token.

total: number

Total token usage.