mirror of
https://github.com/princeton-nlp/tree-of-thought-llm
synced 2024-11-16 05:24:05 +00:00
Merge pull request #32 from marxoffice/master
Fix the wrong price for gpt3.5
This commit is contained in:
commit
4fd0a126fd
@ -41,5 +41,5 @@ def gpt_usage(backend="gpt-4"):
|
|||||||
if backend == "gpt-4":
|
if backend == "gpt-4":
|
||||||
cost = completion_tokens / 1000 * 0.06 + prompt_tokens / 1000 * 0.03
|
cost = completion_tokens / 1000 * 0.06 + prompt_tokens / 1000 * 0.03
|
||||||
elif backend == "gpt-3.5-turbo":
|
elif backend == "gpt-3.5-turbo":
|
||||||
cost = (completion_tokens + prompt_tokens) / 1000 * 0.0002
|
cost = completion_tokens / 1000 * 0.002 + prompt_tokens / 1000 * 0.0015
|
||||||
return {"completion_tokens": completion_tokens, "prompt_tokens": prompt_tokens, "cost": cost}
|
return {"completion_tokens": completion_tokens, "prompt_tokens": prompt_tokens, "cost": cost}
|
Loading…
Reference in New Issue
Block a user