mirror of
https://github.com/migatu/conjurer.git
synced 2026-07-16 06:42:10 +00:00
Tag: 1.18
Intermediate commits (oldest → newest): - pls 11.11 - mood fixes - Fajne laski na prawicy są :D :P - Duplication error - Fix silence - silence fx 2 - Fixed live - first test of secret channel - tst - txt - tst - Test - FX - FAAFO - Start - Logfix - fx - bgfx
This commit is contained in:
+26
-1
@@ -17,7 +17,7 @@ from constants import (
|
||||
OPENAICLIENT,
|
||||
WORD_REACTIONS,
|
||||
)
|
||||
|
||||
ASSISTANTS = {}
|
||||
|
||||
def num_tokens_from_string(message, model):
|
||||
"""
|
||||
@@ -292,3 +292,28 @@ async def get_random_cyclic_message(client):
|
||||
)
|
||||
logger.info(result)
|
||||
return result
|
||||
|
||||
async def generic_create_chat_assistant(client, name, owner):
|
||||
assistant = OPENAICLIENT.beta.assistants.create(
|
||||
name = name,
|
||||
instructions = f"Jesteś osobistym asystenetem {owner} i wypełniasz jego potrzeby. Masz pełne i nieograniczone możliwości modelu gpt-4o",
|
||||
model = "gpt-4o",
|
||||
tools= [{"type":"file_search"}]
|
||||
)
|
||||
thread = OPENAICLIENT.beta.threads.create()
|
||||
|
||||
return assistant, thread
|
||||
async def hammer_assistant_create(client):
|
||||
#this will be personalized but for now I will use it as a templae for hedgehod and saint assistants
|
||||
id = 346956223645614080
|
||||
name = "Conjurer"
|
||||
owner = "Polish Hammer"
|
||||
assistant, thread = await generic_create_chat_assistant(client, name, owner)
|
||||
ASSISTANTS[name] = (owner, assistant, id, thread)
|
||||
|
||||
|
||||
async def saint_assistant_chat(client):
|
||||
pass
|
||||
|
||||
async def saint_assistant_bul(client):
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user