From f10dd7a586268ea0d996308bb7126420bbe8d247 Mon Sep 17 00:00:00 2001 From: Shunyu Yao Date: Thu, 13 Jul 2023 16:05:39 -0400 Subject: [PATCH] Update models.py --- src/tot/models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tot/models.py b/src/tot/models.py index 05710d6..b3c4fe0 100644 --- a/src/tot/models.py +++ b/src/tot/models.py @@ -41,5 +41,5 @@ def gpt_usage(backend="gpt-4"): if backend == "gpt-4": cost = completion_tokens / 1000 * 0.06 + prompt_tokens / 1000 * 0.03 elif backend == "gpt-3.5-turbo": - cost = (completion_tokens + prompt_tokens) / 1000 * 0.0002 - return {"completion_tokens": completion_tokens, "prompt_tokens": prompt_tokens, "cost": cost} \ No newline at end of file + cost = completion_tokens / 1000 * 0.002 + prompt_tokens / 1000 * 0.0015 + return {"completion_tokens": completion_tokens, "prompt_tokens": prompt_tokens, "cost": cost}