From 1bfc1e2b60d13ed2d372cd4b6c46187a4c66c301 Mon Sep 17 00:00:00 2001 From: vocode-petern Date: Thu, 5 Sep 2024 10:14:11 -0700 Subject: [PATCH] Add gpt-4o-2024-08-06 to token map (#701) * Have all gpt-4o tokens use the same limit --- vocode/streaming/agent/token_utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vocode/streaming/agent/token_utils.py b/vocode/streaming/agent/token_utils.py index bf014b2b7f..7288f0d4dd 100644 --- a/vocode/streaming/agent/token_utils.py +++ b/vocode/streaming/agent/token_utils.py @@ -56,13 +56,14 @@ "gpt-4-0125-preview": 127940, "gpt-4-turbo": 127940, "gpt-4o": 127940, - "gpt-4o-2024-05-13": 127940, } def get_chat_gpt_max_tokens(model_name: str): if model_name.startswith("ft:"): model_name = model_name.split(":")[1] + if model_name.startswith("gpt-4o"): + model_name = "gpt-4o" if model_name in CHAT_GPT_MAX_TOKENS: return CHAT_GPT_MAX_TOKENS[model_name]