forked from phoenix/litellm-mirror
Merge pull request #5219 from dhlidongming/fix-messages-length-check
Fix incorrect message length check in cost calculator
This commit is contained in:
commit
1a3b686580
1 changed files with 1 additions and 1 deletions
|
@ -665,7 +665,7 @@ def completion_cost(
|
|||
|
||||
if custom_llm_provider is not None and custom_llm_provider == "vertex_ai":
|
||||
# Calculate the prompt characters + response characters
|
||||
if len("messages") > 0:
|
||||
if len(messages) > 0:
|
||||
prompt_string = litellm.utils.get_formatted_prompt(
|
||||
data={"messages": messages}, call_type="completion"
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue