forked from phoenix/litellm-mirror
Merge pull request #2426 from BerriAI/litellm_whisper_cost_tracking
feat: add cost tracking + caching for `/audio/transcription` calls
This commit is contained in:
commit
c7d0af0a2e
11 changed files with 247 additions and 41 deletions
|
@ -3295,6 +3295,7 @@ async def audio_transcriptions(
|
|||
user_api_key_dict, "team_id", None
|
||||
)
|
||||
data["metadata"]["endpoint"] = str(request.url)
|
||||
data["metadata"]["file_name"] = file.filename
|
||||
|
||||
### TEAM-SPECIFIC PARAMS ###
|
||||
if user_api_key_dict.team_id is not None:
|
||||
|
@ -3329,7 +3330,7 @@ async def audio_transcriptions(
|
|||
data = await proxy_logging_obj.pre_call_hook(
|
||||
user_api_key_dict=user_api_key_dict,
|
||||
data=data,
|
||||
call_type="moderation",
|
||||
call_type="audio_transcription",
|
||||
)
|
||||
|
||||
## ROUTE TO CORRECT ENDPOINT ##
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue