ART Framework API Docs
    Preparing search index...

    Interface LLMMetadata

    Structure for holding metadata about an LLM call, typically received via a METADATA StreamEvent or parsed from a non-streaming response. Fields are optional as availability varies by provider and stream state.

    LLMMetadata

    interface LLMMetadata {
        inputTokens?: number;
        outputTokens?: number;
        providerRawUsage?: any;
        stopReason?: string;
        thinkingTokens?: number;
        timeToFirstTokenMs?: number;
        totalGenerationTimeMs?: number;
        traceId?: string;
    }
    Index

    Properties

    inputTokens?: number

    The number of tokens in the input prompt, if available.

    outputTokens?: number

    The number of tokens generated in the output response, if available.

    providerRawUsage?: any

    Optional raw usage data provided directly by the LLM provider for extensibility (structure depends on provider).

    stopReason?: string

    The reason the LLM stopped generating tokens (e.g., 'stop_sequence', 'max_tokens', 'tool_calls'), if available.

    thinkingTokens?: number

    The number of tokens identified as part of the LLM's internal thinking process (if available from provider).

    timeToFirstTokenMs?: number

    The time elapsed (in milliseconds) until the first token was generated in a streaming response, if applicable and available.

    totalGenerationTimeMs?: number

    The total time elapsed (in milliseconds) for the entire generation process, if available.

    traceId?: string

    The trace ID associated with the LLM call, useful for correlating metadata with the specific request.