Closed hburrichter closed 1 week ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
litellm | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Jun 16, 2024 2:17pm |
@ishaan-jaff, thanks for the reply!
I want to make this change because the current output token count is inaccurate. As shown in the image I added to the linked issue, the Langfuse UI displays 28,410 output tokens. However, the actual number of generated tokens is only 10 + 278 = 288. Langfuse incorrectly includes the embedding output, a long floating-point vector, in the generated token count.
This makes it difficult to accurately track the number of tokens used in a trace, which is an important metric.
Additionally, I do not see any value in displaying the floating-point vector with all its values in the UI.
LGTM!
Title
Langfuse Integration ignore Embedding Output
Relevant issues
Fixes #4225
Type
🐛 Bug Fix
Changes
When handling a
litellm.EmbeddingResponse
, set the Langfuseoutput
toNull
to avoid Langfuse counting the embedding vector as the observation/generation output.Also I fixed one Langfuse test function
create_async_task
in which the Azure api version parameter was missing. Without the api version, the test fails:[REQUIRED] Testing