fix(azure.py): support cost tracking for azure/dall-e-3

This commit is contained in:
Krrish Dholakia 2024-03-12 10:55:54 -07:00
parent 01921aeb5a
commit 7dd94c802e
3 changed files with 44 additions and 1 deletions

View file

@ -3841,7 +3841,9 @@ def completion_cost(
* n
)
else:
raise Exception(f"Model={model} not found in completion cost model map")
raise Exception(
f"Model={image_gen_model_name} not found in completion cost model map"
)
# Calculate cost based on prompt_tokens, completion_tokens
if (
"togethercomputer" in model