langgenius / dify

Dify is an open-source LLM app development platform. Dify's intuitive interface combines AI workflow, RAG pipeline, agent capabilities, model management, observability features and more, letting you quickly go from prototype to production.
https://dify.ai
Other
52.64k stars 7.7k forks source link

The Langfuse monitoring platform cannot count the cost of the model in the parameter extractor #10684

Open fanjiuen opened 1 week ago

fanjiuen commented 1 week ago

Self Checks

Dify version

0.11.1

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

image

✔️ Expected Behavior

Model costs can calculate the cost of all models in the workflow

❌ Actual Behavior

Model costs The cost of the model in the parameter extractor cannot be counted

dosubot[bot] commented 1 week ago

@fanjiuen Hello there! I'm here to assist you with any bugs, questions, or contributions while you wait for a human maintainer. Let's tackle this together!

The issue you're experiencing with Langfuse not being able to count the cost of the model in the parameter extractor might be related to how the parameter extractor is integrated or how the data is being tracked. While I don't have specific information on this exact issue, I can provide some insights into how errors are typically handled in the parameter extractor.

When the cost calculation fails in the parameter extractor, it usually results in exceptions such as InvalidArrayValueError, InvalidBoolValueError, and others. These errors are caught and logged, and the process returns a NodeRunResult with a failed status [1].

To troubleshoot, you might want to check the logs for any of these specific errors to see if they provide more context on why the cost isn't being calculated. Additionally, ensure that the integration with Langfuse is correctly set up, as it relies on token usage data for cost calculations [2]. If the issue persists, reviewing the configuration settings related to the parameter extractor and Langfuse might help identify any discrepancies.

To continue talking to Dosu, mention @dosu.