Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -115,15 +115,15 @@ async def on_message(message):
|
|
115 |
except:
|
116 |
try:
|
117 |
with open(f"data/{guild_name}/{msgchannel_name}", "a") as f:
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
except error:
|
123 |
with open(f"data/{guild_name}/{msgchannel_name}", "w") as f:
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
finally:
|
128 |
with open(f"data/{guild_name}/{msgchannel_name}", "r") as f:
|
129 |
context = f.read()
|
|
|
115 |
except:
|
116 |
try:
|
117 |
with open(f"data/{guild_name}/{msgchannel_name}", "a") as f:
|
118 |
+
n = "\n"
|
119 |
+
f.write(
|
120 |
+
f"""GPT4 Correct {message.author.name}: {message.content.strip(n)}<|end_of_turn|>"""
|
121 |
+
)
|
122 |
except error:
|
123 |
with open(f"data/{guild_name}/{msgchannel_name}", "w") as f:
|
124 |
+
f.write(
|
125 |
+
f"GPT4 Correct system: {sysp}<|end_of_turn|>GPT4 Correct {message.author}: {message.content}<|end_of_turn|>"
|
126 |
+
)
|
127 |
finally:
|
128 |
with open(f"data/{guild_name}/{msgchannel_name}", "r") as f:
|
129 |
context = f.read()
|