xpander-sdk
LLMMetrics
Detailed LLM usage metrics
LLMMetrics
extends LLMTokens
with additional context about an LLM call.
Properties
Property | Type | Description |
---|---|---|
completion_tokens | number | Tokens produced by the model |
prompt_tokens | number | Tokens from the prompt |
total_tokens | number | Total tokens used |
provider | LLMProvider | LLM provider name |
model | string | Model identifier |
function_name | string[] | Functions executed, if any |
duration | number | Inference time in milliseconds |
finish_reason | string | LLM finish reason |
source_node_type | string | Source node type in the graph |
Example
Python
For all metric fields, consult the xpander-sdk docs.