We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ba80191 commit 1f80ed1Copy full SHA for 1f80ed1
backend/onyx/llm/utils.py
@@ -506,13 +506,16 @@ def get_llm_contextual_cost(
506
)
507
except Exception:
508
logger.exception(
509
- f"An unexpected error occurred while calculating cost for model {llm.config.model_name} (potentially due to malformed name). Assuming cost is 0."
+ "An unexpected error occurred while calculating cost for model "
510
+ f"{llm.config.model_name} (potentially due to malformed name). "
511
+ "Assuming cost is 0."
512
513
return 0
514
515
# Costs are in USD dollars per million tokens
516
return usd_per_prompt + usd_per_completion
517
518
+
519
def get_llm_max_tokens(
520
model_map: dict,
521
model_name: str,
0 commit comments