diff --git a/daras_ai_v2/asr.py b/daras_ai_v2/asr.py index 0ddc4b314..6c4aa34fe 100644 --- a/daras_ai_v2/asr.py +++ b/daras_ai_v2/asr.py @@ -1112,12 +1112,12 @@ def run_asr( raise_for_status(r) data = r.json() elif selected_model == AsrModels.gpt_4_o_audio: - from daras_ai_v2.language_model import _run_openai_chat + from daras_ai_v2.language_model import run_openai_chat audio_r = requests.get(audio_url) raise_for_status(audio_r, is_user_url=True) - return _run_openai_chat( + return run_openai_chat( model=asr_model_ids[selected_model], messages=[ { @@ -1137,7 +1137,7 @@ def run_asr( ], }, ], - max_tokens=4096, + max_completion_tokens=4096, num_outputs=1, temperature=1, )[0]["content"] diff --git a/daras_ai_v2/language_model.py b/daras_ai_v2/language_model.py index af058646d..529ed9379 100644 --- a/daras_ai_v2/language_model.py +++ b/daras_ai_v2/language_model.py @@ -775,7 +775,7 @@ def _run_chat_model( ) match api: case LLMApis.openai: - return _run_openai_chat( + return run_openai_chat( model=model, avoid_repetition=avoid_repetition, max_completion_tokens=max_tokens, @@ -1027,7 +1027,7 @@ def _run_anthropic_chat( @retry_if(openai_should_retry) -def _run_openai_chat( +def run_openai_chat( *, model: str, messages: list[ConversationEntry],