(fix) check if custom_llm_provider is not None

This commit is contained in:
ishaan-jaff 2024-01-13 12:54:03 -08:00
parent f62dbd0e08
commit 6bae534968

View file

@ -2798,7 +2798,10 @@ def cost_per_token(
prompt_tokens_cost_usd_dollar = 0
completion_tokens_cost_usd_dollar = 0
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
print_verbose(f"Looking up model={model} in model_cost_map")