added maximum chars
All checks were successful
Build and Push Docker Image / build (push) Successful in -9s

This commit is contained in:
wirehack7 2025-05-01 13:35:23 +02:00
parent 992615a42f
commit c9670473da
Signed by: wirehack7
GPG Key ID: C9F4CF85BA505ADC

View File

@ -45,6 +45,16 @@ async def generate(
)
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)
# Auflösung wählen