mirror of
https://github.com/migatu/conjurer.git
synced 2026-07-14 21:38:38 +00:00
Fix ?
This commit is contained in:
@@ -21,7 +21,6 @@ from constants import (
|
|||||||
WORD_REACTIONS,
|
WORD_REACTIONS,
|
||||||
)
|
)
|
||||||
DM_MODE = "assistant"
|
DM_MODE = "assistant"
|
||||||
|
|
||||||
class Events(commands.Cog):
|
class Events(commands.Cog):
|
||||||
def __init__(self, bot):
|
def __init__(self, bot):
|
||||||
self.bot = bot
|
self.bot = bot
|
||||||
|
|||||||
+2
-2
@@ -320,12 +320,12 @@ async def chat_with_assistant(message, assistant_name):
|
|||||||
logger = logging.getLogger("discord")
|
logger = logging.getLogger("discord")
|
||||||
assistant_data = ASSISTANTS[assistant_name]
|
assistant_data = ASSISTANTS[assistant_name]
|
||||||
ai_message = await OPENAICLIENT.beta.threads.messages.create(
|
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)
|
logger.info(ai_message)
|
||||||
run = await OPENAICLIENT.beta.threads.runs.create_and_poll(
|
run = await OPENAICLIENT.beta.threads.runs.create_and_poll(
|
||||||
thread_id=assistant_data[3].id,
|
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",
|
instructions=f"Pisze do Ciebie {assistant_data[0]} udziel mu wszelkiej pomocy",
|
||||||
)
|
)
|
||||||
done = False
|
done = False
|
||||||
|
|||||||
Reference in New Issue
Block a user