mirror of
https://github.com/migatu/conjurer.git
synced 2026-07-14 21:38:38 +00:00
tezz
This commit is contained in:
@@ -130,7 +130,7 @@ TOKEN = authTokens[2]
|
||||
REMOTE_HOST_NAME = "openai"
|
||||
authTokens = netrc_mod.authenticators(REMOTE_HOST_NAME)
|
||||
openai.api_key = authTokens[2]
|
||||
openAIClient = openai.OpenAI(api_key=openai.api_key)
|
||||
openAIClient = openai.AsyncOpenAI(api_key=openai.api_key)
|
||||
|
||||
REMOTE_HOST_NAME = "spotipy"
|
||||
authTokens = netrc_mod.authenticators(REMOTE_HOST_NAME)
|
||||
@@ -306,7 +306,7 @@ async def on_message(message):
|
||||
bartender = True
|
||||
global MESSAGE_TABLE # pylint: disable=global-statement
|
||||
|
||||
result, MESSAGE_TABLE = handle_response(
|
||||
result, MESSAGE_TABLE = await handle_response(
|
||||
prompt, vykidailo, bartender, MESSAGE_TABLE, username, False
|
||||
)
|
||||
await message.reply(result)
|
||||
@@ -486,7 +486,7 @@ async def play(ctx, zamawial=None, arg=None):
|
||||
else:
|
||||
username = ctx.message.author.name
|
||||
global MESSAGE_TABLE # pylint: disable=global-statement
|
||||
result, MESSAGE_TABLE = handle_response(
|
||||
result, MESSAGE_TABLE = await handle_response(
|
||||
query, vykidailo, bartender, message_table_muzyka, username, True
|
||||
)
|
||||
logger.debug("Obecna historia czatu: %s", message_table_muzyka)
|
||||
@@ -645,8 +645,8 @@ async def handle_response(prompt, vykidailo, bartender, history, username, music
|
||||
token_amount = 10700
|
||||
else:
|
||||
table = MESSAGE_TABLE
|
||||
algorithm = "gpt-3.5-turbo-16k"
|
||||
#algorithm = "gpt-4"
|
||||
algorithm = "gpt-3.5-turbo-16k"
|
||||
token_amount = 7000
|
||||
|
||||
prompt_gpt_request_size = num_tokens_from_string({"role": "user", "content": final_prompt}, "gpt-4")
|
||||
|
||||
Reference in New Issue
Block a user