mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-26 19:24:27 +00:00
Litellm dev 12 17 2024 p2 (#7277)
* fix(openai/transcription/handler.py): call 'log_pre_api_call' on async calls * fix(openai/transcriptions/handler.py): call 'logging.pre_call' on sync whisper calls as well * fix(proxy_cli.py): remove default proxy_cli timeout param gets passed in as a dynamic request timeout and overrides config values * fix(langfuse.py): pass litellm httpx client - contains ssl certs (#7052) Fixes https://github.com/BerriAI/litellm/issues/7046
This commit is contained in:
parent
03e711e3e4
commit
57809cfbf4
5 changed files with 67 additions and 1 deletions
|
@ -9,6 +9,7 @@ from litellm.litellm_core_utils.audio_utils.utils import get_audio_file_name
|
|||
from litellm.litellm_core_utils.litellm_logging import Logging as LiteLLMLoggingObj
|
||||
from litellm.types.utils import FileTypes
|
||||
from litellm.utils import TranscriptionResponse, convert_to_model_response_object
|
||||
|
||||
from ..openai import OpenAIChatCompletion
|
||||
|
||||
|
||||
|
@ -103,6 +104,17 @@ class OpenAIAudioTranscription(OpenAIChatCompletion):
|
|||
timeout=timeout,
|
||||
max_retries=max_retries,
|
||||
)
|
||||
|
||||
## LOGGING
|
||||
logging_obj.pre_call(
|
||||
input=None,
|
||||
api_key=openai_client.api_key,
|
||||
additional_args={
|
||||
"api_base": openai_client._base_url._uri_reference,
|
||||
"atranscription": True,
|
||||
"complete_input_dict": data,
|
||||
},
|
||||
)
|
||||
_, response = self.make_sync_openai_audio_transcriptions_request(
|
||||
openai_client=openai_client,
|
||||
data=data,
|
||||
|
@ -147,6 +159,16 @@ class OpenAIAudioTranscription(OpenAIChatCompletion):
|
|||
client=client,
|
||||
)
|
||||
|
||||
## LOGGING
|
||||
logging_obj.pre_call(
|
||||
input=None,
|
||||
api_key=openai_aclient.api_key,
|
||||
additional_args={
|
||||
"api_base": openai_aclient._base_url._uri_reference,
|
||||
"atranscription": True,
|
||||
"complete_input_dict": data,
|
||||
},
|
||||
)
|
||||
headers, response = await self.make_openai_audio_transcriptions_request(
|
||||
openai_aclient=openai_aclient,
|
||||
data=data,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue