From 3891f843adde9a2ca9e305974a02bcbcfcbf2bfc Mon Sep 17 00:00:00 2001 From: Migatu Date: Thu, 19 Oct 2023 14:17:25 +0200 Subject: [PATCH] Fix --- bot.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bot.py b/bot.py index 87bb022..2bbc757 100644 --- a/bot.py +++ b/bot.py @@ -585,12 +585,12 @@ async def handle_response(prompt, vykidailo, bartender, history, username, music temp = {"role : system", "content : Kiedy słyszysz " + slowo + " to reagujesz lub dzieje się to " + reakcja[0]} if music: - history.extend(message_table_muzyka) + history.extend(message_table_muzyka[-20:0]) response = await openai.ChatCompletion.acreate( model="gpt-3.5-turbo-16k", messages=history ) else: - history.extend(MESSAGE_TABLE) + history.extend(MESSAGE_TABLE[-20:0]) response = await openai.ChatCompletion.acreate( model="gpt-3.5-turbo-16k", messages=history )