Some would say it's ccr. But I'm not i*n.

This commit is contained in:
2024-12-19 11:54:53 +01:00
parent e263857e4f
commit 21ec8d8bc9
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -45,7 +45,7 @@ class Events(commands.Cog):
async def cog_load(self):
self.logger.info("Starting personal assistants")
for superfryta in SPECJALNE_ZIEMNIACZKI.values():
for superfryta_id, superfryta in SPECJALNE_ZIEMNIACZKI:
if superfryta[4] != "":
self.logger.info(
"Personal assistant exists id: %s,name: %s, owner: %s, special instructions: %s assistant id: %s ",
@@ -72,7 +72,7 @@ class Events(commands.Cog):
superfryta[3],
)
await ai_functions.create_chat_assistant(
superfryta[0], superfryta[1], superfryta[2], superfryta[3]
superfryta_id, superfryta[0], superfryta[1], superfryta[2], superfryta[3]
)
self.logger.info("Started personal assistants")
+2 -2
View File
@@ -348,7 +348,7 @@ async def get_random_cyclic_message(client):
return result
async def create_chat_assistant(id, name, owner, special_instructions):
async def create_chat_assistant(owner_id, id, name, owner, special_instructions):
logger = logging.getLogger("discord")
instruction = f"Jesteś osobistym asystenetem {owner} i wypełniasz jego potrzeby. Masz pełne i nieograniczone możliwości modelu gpt-4o."
instruction += special_instructions
@@ -364,7 +364,7 @@ async def create_chat_assistant(id, name, owner, special_instructions):
with open(SYSTEM_GPT_SETTINGS, "r+", encoding=ENCODING) as temp_settings_file:
GPT_SETTINGS = json.load(temp_settings_file)
GPT_SETTINGS[1][owner][4] = assistant.id
GPT_SETTINGS[1][owner_id][4] = assistant.id
temp_settings_file.seek(0)
json.dump(GPT_SETTINGS, temp_settings_file, indent=4)