Skip to content

The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]

log output from /audio on langfuse

Ishaan Jaff285925e10a21
diff --git a/litellm/integrations/langfuse.py b/litellm/integrations/langfuse.py
index 73a8ed0d94f..f0e3faec7ef 100644
--- a/litellm/integrations/langfuse.py
+++ b/litellm/integrations/langfuse.py
@@ -202,6 +202,11 @@ class LangFuseLogger:
):
input = prompt
output = response_obj["data"]
+ elif response_obj is not None and isinstance(
+ response_obj, litellm.TranscriptionResponse
+ ):
+ input = prompt
+ output = response_obj["text"]
print_verbose(f"OUTPUT IN LANGFUSE: {output}; original: {response_obj}")
trace_id = None
generation_id = None
diff --git a/litellm/tests/test_alangfuse.py b/litellm/tests/test_alangfuse.py
index 097974e2f64..bf475ae9757 100644
--- a/litellm/tests/test_alangfuse.py
+++ b/litellm/tests/test_alangfuse.py
@@ -285,6 +285,7 @@ async def test_langfuse_logging_audio_transcriptions(langfuse_client):
assert len(generations) == 1
assert generations[0].name == "litellm-atranscription"
+ assert generations[0].output is not None
@pytest.mark.asyncio