Merge branch 'main' into litellm_dev_03_10_2025_p3

This commit is contained in:
Krish Dholakia 2025-03-12 14:56:01 -07:00 committed by GitHub
commit 2d957a0ed9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
105 changed files with 3874 additions and 437 deletions

View file

@ -7,7 +7,11 @@ from pydantic import BaseModel
import litellm
from litellm.litellm_core_utils.audio_utils.utils import get_audio_file_name
from litellm.types.utils import FileTypes
from litellm.utils import TranscriptionResponse, convert_to_model_response_object
from litellm.utils import (
TranscriptionResponse,
convert_to_model_response_object,
extract_duration_from_srt_or_vtt,
)
from .azure import AzureChatCompletion
@ -140,6 +144,8 @@ class AzureAudioTranscription(AzureChatCompletion):
stringified_response = response.model_dump()
else:
stringified_response = TranscriptionResponse(text=response).model_dump()
duration = extract_duration_from_srt_or_vtt(response)
stringified_response["duration"] = duration
## LOGGING
logging_obj.post_call(