Skip to content

Commit

Permalink
add prompt max length
Browse files Browse the repository at this point in the history
  • Loading branch information
Kav-K committed Nov 17, 2023
1 parent 6332a70 commit 60a21e9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions models/openai_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -1398,9 +1398,9 @@ async def send_image_request(
self, ctx, prompt, quality, image_size, style, custom_api_key=None
) -> tuple[File, List[Any]]:
words = len(prompt.split(" "))
if words < 1 or words > 75:
if words < 1 or words > 150:
raise ValueError(
f"Prompt must be greater than 1 word and less than 75, it is currently {words}"
f"Prompt must be greater than 1 word and less than 150, it is currently {words}"
)

await self.usage_service.update_usage_image(image_size)
Expand Down

0 comments on commit 60a21e9

Please sign in to comment.