Langfuse JS/TS SDKs
    Preparing search index...

    Type Alias LangfuseGenerationAttributes

    LangfuseGenerationAttributes: LangfuseSpanAttributes & {
        completionStartTime?: Date;
        costDetails?: { [key: string]: number };
        model?: string;
        modelParameters?: { [key: string]: string | number };
        prompt?: { isFallback: boolean; name: string; version: number };
        usageDetails?: { [key: string]: number } | OpenAiUsage;
    }

    Attributes for Langfuse generation observations.

    Generations are specialized observations for tracking LLM interactions, including model parameters, usage metrics, costs, and prompt information.

    Type declaration

    • OptionalcompletionStartTime?: Date

      Timestamp when the model started generating completion

    • OptionalcostDetails?: { [key: string]: number }

      Cost breakdown for the generation (totalCost, etc.)

    • Optionalmodel?: string

      Name of the language model used (e.g., 'gpt-4', 'claude-3')

    • OptionalmodelParameters?: { [key: string]: string | number }

      Parameters passed to the model (temperature, max_tokens, etc.)

    • Optionalprompt?: { isFallback: boolean; name: string; version: number }

      Information about the prompt used from Langfuse prompt management

      • isFallback: boolean

        Whether this is a fallback prompt due to retrieval failure

      • name: string

        Name of the prompt template

      • version: number

        Version number of the prompt template

    • OptionalusageDetails?: { [key: string]: number } | OpenAiUsage

      Token usage and other model-specific usage metrics