Araeynn commited on
Commit
7531e70
1 Parent(s): 9534d17

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -132,7 +132,7 @@ async def on_message(message:discord.Message):
132
  o = ""
133
  if message.author.id in bannedUsers:
134
  return 0
135
- if (str(message.channel.id) in o.split("\n")) or (message.channel.name == "Direct"):
136
  async with message.channel.typing():
137
  # START LLM RESPONSE
138
  context += f""
@@ -151,7 +151,7 @@ async def on_message(message:discord.Message):
151
  imgp = ec(output)[0]
152
  mscp = ec(output, "<|music|>", "<|music|>")[0]
153
  with open(f"data/{message.guild.name}/{message.channel.name}", "a") as f:
154
- f.write(f"GPT4 Correct Assistant: {output}<|end_of_turn|>")
155
  embed = discord.Embed(title=title,
156
  description=output.replace(
157
  f"<|title|>{title}<|title|>", "").replace(f"<|image|>{imgp}<|image|>", ""),
@@ -239,7 +239,7 @@ async def setup(ctx:discord.ApplicationContext):
239
  "sys",
240
  description="The new system prompt.",
241
  required=False,
242
- default=sysrp
243
  )
244
  async def reset(ctx:discord.ApplicationContext, sys:str):
245
  with open(f"data/{ctx.guild.name}/{ctx.channel.name}", "w") as f:
 
132
  o = ""
133
  if message.author.id in bannedUsers:
134
  return 0
135
+ if (str(message.channel.id) in o.split("\n")) or (message.channel.name == "Direct") or True:
136
  async with message.channel.typing():
137
  # START LLM RESPONSE
138
  context += f""
 
151
  imgp = ec(output)[0]
152
  mscp = ec(output, "<|music|>", "<|music|>")[0]
153
  with open(f"data/{message.guild.name}/{message.channel.name}", "a") as f:
154
+ f.write(f"{output}")
155
  embed = discord.Embed(title=title,
156
  description=output.replace(
157
  f"<|title|>{title}<|title|>", "").replace(f"<|image|>{imgp}<|image|>", ""),
 
239
  "sys",
240
  description="The new system prompt.",
241
  required=False,
242
+ default=sysp
243
  )
244
  async def reset(ctx:discord.ApplicationContext, sys:str):
245
  with open(f"data/{ctx.guild.name}/{ctx.channel.name}", "w") as f: