Araeynn commited on
Commit
a8bbf8d
1 Parent(s): d519496

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +17 -16
app.py CHANGED
@@ -125,22 +125,23 @@ async def on_message(message):
125
  finally:
126
  with open(f"data/{guild_name}/{msgchannel_name}", "r") as f:
127
  context = f.read()
128
- context += f"GPT4 Correct Assistant: {message.content}<|end_of_turn|>"
129
- title = ec(context, "<title>", "</title>")[0]
130
- output = LLM.text_generation(context,
131
- stop_sequences=[""],
132
- max_new_tokens=4096)
133
- with open(f"data/{guild_name}/{msgchannel_name}", "a") as f:
134
- f.write(f"GPT4 Correct Assistant: {output}<|end_of_turn|>")
135
- embed = discord.Embed(title=title,
136
- description=output.replace(
137
- f"<title>{title}</title>", ""),
138
- color=0x1E81B0)
139
- embed.set_footer(
140
- text=
141
- """Information or code generated by Lyre may not always be correct. Lyre was made by Araeyn."""
142
- )
143
- e = await message.reply(embed=embed)
 
144
  except Exception as e:
145
  print(Fore.RED)
146
  print(e)
 
125
  finally:
126
  with open(f"data/{guild_name}/{msgchannel_name}", "r") as f:
127
  context = f.read()
128
+ if "Feeway" in guild_name:
129
+ context += f"GPT4 Correct Assistant:"
130
+ title = ec(context, "<title>", "</title>")[0]
131
+ output = LLM.text_generation(context,
132
+ stop_sequences=[""],
133
+ max_new_tokens=4096)
134
+ with open(f"data/{guild_name}/{msgchannel_name}", "a") as f:
135
+ f.write(f"GPT4 Correct Assistant: {output}<|end_of_turn|>")
136
+ embed = discord.Embed(title=title,
137
+ description=output.replace(
138
+ f"<title>{title}</title>", ""),
139
+ color=0x1E81B0)
140
+ embed.set_footer(
141
+ text=
142
+ """Information or code generated by Lyre may not always be correct. Lyre was made by Araeyn."""
143
+ )
144
+ e = await message.reply(embed=embed)
145
  except Exception as e:
146
  print(Fore.RED)
147
  print(e)