From 22730776d40be26032da5417f7133b538cbefa0f Mon Sep 17 00:00:00 2001 From: mtuszowski Date: Fri, 15 Nov 2024 01:08:34 +0100 Subject: [PATCH] Fix ? --- ai_commands.py | 1 - ai_functions.py | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/ai_commands.py b/ai_commands.py index 8bb4255..6496ab4 100644 --- a/ai_commands.py +++ b/ai_commands.py @@ -21,7 +21,6 @@ from constants import ( WORD_REACTIONS, ) DM_MODE = "assistant" - class Events(commands.Cog): def __init__(self, bot): self.bot = bot diff --git a/ai_functions.py b/ai_functions.py index 26b7007..bbca134 100644 --- a/ai_functions.py +++ b/ai_functions.py @@ -320,12 +320,12 @@ async def chat_with_assistant(message, assistant_name): logger = logging.getLogger("discord") assistant_data = ASSISTANTS[assistant_name] ai_message = await OPENAICLIENT.beta.threads.messages.create( - thread_id=assistant_data[3], role="user", content=message.content + thread_id=assistant_data[3].id, role="user", content=message.content ) logger.info(ai_message) run = await OPENAICLIENT.beta.threads.runs.create_and_poll( thread_id=assistant_data[3].id, - assistant_id=assistant_data[1].id, + assistant_id=assistant_data[1], instructions=f"Pisze do Ciebie {assistant_data[0]} udziel mu wszelkiej pomocy", ) done = False