fix(requirements.txt): add bs4 package to requirements.txt for BeautifulSoup usage

feat(functionscalls.py): add new functions send_ascii_art_text and send_ascii_art_image to send messages and images in ascii art
fix(makeprompt.py): import send_ascii_art_text and send_ascii_art_image functions and add corresponding if statements to handle function calls
This commit is contained in:
Paillat
2023-07-18 23:18:47 +02:00
parent e91fafdc51
commit 89778cbd3b
3 changed files with 93 additions and 6 deletions

View File

@@ -13,6 +13,8 @@ from src.functionscalls import (
send_a_stock_image,
create_a_thread,
send_a_gif,
send_ascii_art_text,
send_ascii_art_image,
functions,
server_normal_channel_functions,
)
@@ -151,6 +153,17 @@ async def chatgpt_process(
reply = arguments.get("message", "")
limit = arguments.get("limit", 15)
await send_a_gif(message, query, reply, limit)
if name == "send_ascii_art_text":
if arguments.get("text"):
text = arguments.get("text")
font = arguments.get("font", "standard")
reply = arguments.get("message", "")
await send_ascii_art_text(message, text, font, reply)
if name == "send_ascii_art_image":
if arguments.get("query"):
query = arguments.get("query")
reply = arguments.get("message", "")
await send_ascii_art_image(message, query, reply)
if name == "":
await message.channel.send(
"The function call is empty. Please retry.", delete_after=10