log output from /audio on langfuse

This commit is contained in:
Ishaan Jaff 2024-07-29 08:21:22 -07:00
parent ec28e8e630
commit 285925e10a
2 changed files with 6 additions and 0 deletions

View file

@ -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

View file

@ -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