Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Track Embedding Request Costs in Haystack-Langfuse #1044

Open
kluhan opened this issue Sep 1, 2024 · 0 comments
Open

Feature Request: Track Embedding Request Costs in Haystack-Langfuse #1044

kluhan opened this issue Sep 1, 2024 · 0 comments
Labels
feature request Ideas to improve an integration integration:langfuse P3

Comments

@kluhan
Copy link

kluhan commented Sep 1, 2024

Feature Request: Track Embedding Request Costs in Haystack-Langfuse

Is your feature request related to a problem?

Haystack-Langfuse currently lacks the ability to track the costs associated with embedding requests, making it difficult to manage budgets effectively.

Describe the solution you'd like

Integrate a feature that tracks and displays the cost of embedding requests based on the pricing of the service provider. This should function similarly to the existing cost-tracking for other LLM requests.

Describe alternatives you've considered

  • Manual Tracking: Manually logging and calculating costs, which is cumbersome and prone to error.

Additional context

I attempted to implement this myself by modifying the following code:
Link to Code

However, I encountered an issue where the cost calculation always overwrites the provided usage data, consistently calculating the cost based on the token count of the input and output. This method is inaccurate for embedding requests, where cost calculations should not be based on the output token counts.

@kluhan kluhan added the feature request Ideas to improve an integration label Sep 1, 2024
@julian-risch julian-risch added the P3 label Sep 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Ideas to improve an integration integration:langfuse P3
Projects
None yet
Development

No branches or pull requests

3 participants