mirror of https://github.com/langgenius/dify.git
- Add PROMPT_TOKENS and COMPLETION_TOKENS to WorkflowNodeExecutionMetadataKey - Store prompt/completion tokens in node execution metadata JSON (no schema change) - Calculate workflow-level token split by summing node executions on-the-fly - Export gen_ai.usage.input_tokens and output_tokens to enterprise telemetry - Add semantic convention constants for token attributes - Maintain backward compatibility (historical data shows null) BREAKING: None MIGRATION: None (uses JSON metadata, no schema changes) |
||
|---|---|---|
| .. | ||
| entities | ||
| __init__.py | ||
| draft_trace.py | ||
| enterprise_trace.py | ||
| event_handlers.py | ||
| exporter.py | ||
| id_generator.py | ||
| telemetry_log.py | ||