Optional
completionStartTime?: DateTimestamp when the model started generating completion
Optional
costDetails?: { [key: string]: number }Cost breakdown for the generation (totalCost, etc.)
Optional
model?: stringName of the language model used (e.g., 'gpt-4', 'claude-3')
Optional
modelParameters?: { [key: string]: string | number }Parameters passed to the model (temperature, max_tokens, etc.)
Optional
prompt?: { isFallback: boolean; name: string; version: number }Information about the prompt used from Langfuse prompt management
Whether this is a fallback prompt due to retrieval failure
Name of the prompt template
Version number of the prompt template
Optional
usageDetails?: { [key: string]: number } | OpenAiUsageToken usage and other model-specific usage metrics
Attributes for Langfuse generation observations.
Generations are specialized observations for tracking LLM interactions, including model parameters, usage metrics, costs, and prompt information.