Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -323,21 +323,20 @@ async def on_message(message):
|
|
323 |
s = f":green[{message.author}]: :violet[{message.content}] :blue[{msgchannel_name}] :orange[{guild_name}]"
|
324 |
if message.author == client.user:
|
325 |
return
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
If there is ImageParsed stuff at the end of the message, that is the text relative to the image."""
|
341 |
try:
|
342 |
os.mkdir("data/" + guild_name)
|
343 |
except:
|
@@ -361,11 +360,11 @@ async def on_message(message):
|
|
361 |
with open(f"data/{guild_name}/{msgchannel_name}", "w") as f:
|
362 |
if message.author.bot:
|
363 |
f.write(
|
364 |
-
f"GPT4 Correct system: {
|
365 |
)
|
366 |
else:
|
367 |
f.write(
|
368 |
-
f"GPT4 Correct system: {
|
369 |
)
|
370 |
with open(f"data/{guild_name}/{msgchannel_name}", "r") as f:
|
371 |
context = f.read()
|
|
|
323 |
s = f":green[{message.author}]: :violet[{message.content}] :blue[{msgchannel_name}] :orange[{guild_name}]"
|
324 |
if message.author == client.user:
|
325 |
return
|
326 |
+
sysrp = f"""GPT4 Correct System:
|
327 |
+
You are lyre, a discord bot. You were made by Araeyn.
|
328 |
+
Your username is lyre#9828.
|
329 |
+
You must use the markdown format for your responses.
|
330 |
+
Do not excessively use bullet points.
|
331 |
+
Use emojis at the start of your responses.
|
332 |
+
Use <|title|> at the start of your title for the response and <|title|> at the end of the title.
|
333 |
+
Your title is a conversation name that ChatGPT would make for the response and question.
|
334 |
+
Always include a title.
|
335 |
+
If the user asks you to generate an image, use the start tag <|image|> and the end tag <|image|> around the prompt to generate it. Put this at the end of your response. Do not use a link for the image.
|
336 |
+
For example, if the user asks you to generate an image of a cat, you could say <|image|>A cute cat with long fur that is looking out a window with curious eyes, hd, realistic<|image|>
|
337 |
+
Do not generate images unless the user speciifes that they want an image.
|
338 |
+
If a user has [bot] next to their username, they are a bot.
|
339 |
+
If there is ImageParsed stuff at the end of the message, that is the text relative to the image."""
|
|
|
340 |
try:
|
341 |
os.mkdir("data/" + guild_name)
|
342 |
except:
|
|
|
360 |
with open(f"data/{guild_name}/{msgchannel_name}", "w") as f:
|
361 |
if message.author.bot:
|
362 |
f.write(
|
363 |
+
f"GPT4 Correct system: {sysrp}<|end_of_turn|>GPT4 Correct {message.author}[bot]: {message.content}{caption}<|end_of_turn|>"
|
364 |
)
|
365 |
else:
|
366 |
f.write(
|
367 |
+
f"GPT4 Correct system: {sysrp}<|end_of_turn|>GPT4 Correct {message.author}: {message.content}{caption}<|end_of_turn|>"
|
368 |
)
|
369 |
with open(f"data/{guild_name}/{msgchannel_name}", "r") as f:
|
370 |
context = f.read()
|