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 )