From c858e62a81493dffffad6b506e46783172dfef23 Mon Sep 17 00:00:00 2001 From: Migatu Date: Fri, 20 Oct 2023 19:19:15 +0200 Subject: [PATCH] Fix --- bot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot.py b/bot.py index c2e9ccf..9b1de6c 100644 --- a/bot.py +++ b/bot.py @@ -603,7 +603,7 @@ async def handle_response(prompt, vykidailo, bartender, history, username, music json.dump(file_data, file_memory, indent=4) history = [] history.append(GPT_SETTINGS[0]) - tokens = num_tokens_from_string(GPT_SETTINGS[0]["content"], "gpt-4") + num_tokens_from_string(GPT_SETTINGS[0]["role"], "gpt-4") + tokens = num_tokens_from_string(GPT_SETTINGS[0], "gpt-4") for (slowo, reakcja) in word_reactions.items(): if not reakcja[3]: