forked from phoenix/litellm-mirror
fix(main.py): support max retries for transcription calls
This commit is contained in:
parent
c3e4af76cf
commit
ceabf726b0
3 changed files with 7 additions and 3 deletions
|
@ -3553,6 +3553,7 @@ def transcription(
|
|||
api_key: Optional[str] = None,
|
||||
api_base: Optional[str] = None,
|
||||
api_version: Optional[str] = None,
|
||||
max_retries: Optional[int] = None,
|
||||
litellm_logging_obj=None,
|
||||
custom_llm_provider=None,
|
||||
**kwargs,
|
||||
|
@ -3568,6 +3569,8 @@ def transcription(
|
|||
proxy_server_request = kwargs.get("proxy_server_request", None)
|
||||
model_info = kwargs.get("model_info", None)
|
||||
metadata = kwargs.get("metadata", {})
|
||||
if max_retries is None:
|
||||
max_retries = openai.DEFAULT_MAX_RETRIES
|
||||
|
||||
model_response = litellm.utils.TranscriptionResponse()
|
||||
|
||||
|
@ -3611,6 +3614,7 @@ def transcription(
|
|||
api_key=api_key,
|
||||
api_version=api_version,
|
||||
azure_ad_token=azure_ad_token,
|
||||
max_retries=max_retries,
|
||||
)
|
||||
elif custom_llm_provider == "openai":
|
||||
response = openai_chat_completions.audio_transcriptions(
|
||||
|
@ -3621,6 +3625,7 @@ def transcription(
|
|||
atranscription=atranscription,
|
||||
timeout=timeout,
|
||||
logging_obj=litellm_logging_obj,
|
||||
max_retries=max_retries,
|
||||
)
|
||||
return response
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue