Skip to content

Commit 4d0a486

Browse files
authored
Merge pull request #142 from decorator-factory-clones/smarte-fix-gpu-overload
Limit the length of the donated hardware name
2 parents c563cc8 + 947a862 commit 4d0a486

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

bot/exts/smart_eval/_cog.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,12 @@ async def donate(self, ctx: commands.Context, *, hardware: str | None = None) ->
114114
)
115115
return
116116

117+
if len(hardware) > 255:
118+
await ctx.reply(
119+
"This hardware name is too complicated, I don't have the context window "
120+
"to remember that"
121+
)
122+
return
117123

118124
msg = "Thank you for donating your GPU to our Smart Eval command."
119125
fake_hardware = await self.improve_gpu_name(hardware)

0 commit comments

Comments
 (0)