Skip to content

Commit 4fd0a12

Browse files
authored
Merge pull request #32 from marxoffice/master
Fix the wrong price for gpt3.5
2 parents 03b8443 + 5627a8f commit 4fd0a12

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)