Skip to content

Commit f10dd7a

Browse files
authored
Update models.py
1 parent b910339 commit f10dd7a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/tot/models.py

Lines changed: 2 additions & 2 deletions
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
45-
return {"completion_tokens": completion_tokens, "prompt_tokens": prompt_tokens, "cost": cost}
44+
cost = completion_tokens / 1000 * 0.002 + prompt_tokens / 1000 * 0.0015
45+
return {"completion_tokens": completion_tokens, "prompt_tokens": prompt_tokens, "cost": cost}

0 commit comments

Comments
 (0)