mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-26 03:04:13 +00:00
(fix) check if custom_llm_provider is not None
This commit is contained in:
parent
f62dbd0e08
commit
6bae534968
1 changed files with 4 additions and 1 deletions
|
@ -2798,7 +2798,10 @@ def cost_per_token(
|
||||||
prompt_tokens_cost_usd_dollar = 0
|
prompt_tokens_cost_usd_dollar = 0
|
||||||
completion_tokens_cost_usd_dollar = 0
|
completion_tokens_cost_usd_dollar = 0
|
||||||
model_cost_ref = litellm.model_cost
|
model_cost_ref = litellm.model_cost
|
||||||
model_with_provider = custom_llm_provider + "/" + model
|
if custom_llm_provider is not None:
|
||||||
|
model_with_provider = custom_llm_provider + "/" + model
|
||||||
|
else:
|
||||||
|
model_with_provider = model
|
||||||
# see this https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/models
|
# see this https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/models
|
||||||
print_verbose(f"Looking up model={model} in model_cost_map")
|
print_verbose(f"Looking up model={model} in model_cost_map")
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue