We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 03b8443 + 5627a8f commit 4fd0a12Copy full SHA for 4fd0a12
models.py
@@ -41,5 +41,5 @@ def gpt_usage(backend="gpt-4"):
41
if backend == "gpt-4":
42
cost = completion_tokens / 1000 * 0.06 + prompt_tokens / 1000 * 0.03
43
elif backend == "gpt-3.5-turbo":
44
- cost = (completion_tokens + prompt_tokens) / 1000 * 0.0002
+ 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