Pinecone TypeScript SDK - v8.1.0
    Preparing search index...

    Interface UsageModel

    Describes the token usage associated with interactions with an assistant.

    UsageModel

    interface UsageModel {
        completionTokens?: number;
        promptTokens?: number;
        totalTokens?: number;
    }
    Index
    completionTokens?: number

    For chat interactions, the number of tokens in the assistant's response.
    For context retrieval, this is always 0.

    UsageModel

    promptTokens?: number

    For chat interactions, the number of tokens in the LLM request (message, context snippets, and system prompt). For context retrieval, the number of tokens in the LLM request used to generate search queries from the messages, plus the tokens in the retrieved context snippets.

    UsageModel

    totalTokens?: number

    The total number of tokens used, equal to the sum of prompt_tokens and completion_tokens.

    UsageModel