Skip to content

Commit 5627a8f

Browse files
committed
Fix the wrong price for gpt3.5
1 parent 03b8443 commit 5627a8f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,5 @@ def gpt_usage(backend="gpt-4"):
4141
if backend == "gpt-4":
4242
cost = completion_tokens / 1000 * 0.06 + prompt_tokens / 1000 * 0.03
4343
elif backend == "gpt-3.5-turbo":
44-
cost = (completion_tokens + prompt_tokens) / 1000 * 0.0002
44+
cost = completion_tokens / 1000 * 0.002 + prompt_tokens / 1000 * 0.0015
4545
return {"completion_tokens": completion_tokens, "prompt_tokens": prompt_tokens, "cost": cost}

0 commit comments

Comments
 (0)