Sync with main #4
10
src/main.py
10
src/main.py
@ -44,6 +44,16 @@ async def generate(
|
|||||||
ephemeral=True
|
ephemeral=True
|
||||||
)
|
)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
MAX_PROMPT_LENGTH = 500
|
||||||
|
|
||||||
|
if len(prompt) > MAX_PROMPT_LENGTH:
|
||||||
|
await interaction.followup.send(f"Prompt too long! Maximum {MAX_PROMPT_LENGTH} chars allowed.")
|
||||||
|
return
|
||||||
|
|
||||||
|
if len(negative) > MAX_PROMPT_LENGTH:
|
||||||
|
await interaction.followup.send(f"Negative Prompt too long! Maximum {MAX_PROMPT_LENGTH} chars allowed.")
|
||||||
|
return
|
||||||
|
|
||||||
await interaction.response.defer(thinking=True)
|
await interaction.response.defer(thinking=True)
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user