mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-05-20 16:26:42 +08:00
The Langfuse Python SDK v3+ removed `start_generation()` method. RagFlow's code called this non-existent method, causing AttributeError when Langfuse tracing is enabled. Replace all `start_generation()` calls with `start_observation(as_type="generation")` which is the correct v4 SDK API. Affected files: - api/db/services/llm_service.py (12 occurrences) - api/db/services/dialog_service.py (1 occurrence) Fixes #14204 Related to #9243 ### What problem does this PR solve? _Briefly describe what this PR aims to solve. Include background context that will help reviewers understand the purpose of the PR._ ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue) --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>