changed an error message to make it slightly more clear

This commit is contained in:
Seaswimmer 2024-09-18 11:45:33 -04:00
parent 25e61b9a79
commit 9b7d01c402
Signed by: cswimr
GPG key ID: 3813315477F26F82

View file

@ -113,7 +113,7 @@ class FloweryAPI:
"""
if len(text) > 2048:
if not self.config.allow_truncation:
raise ValueError('Text must be less than 2048 characters')
raise ValueError('Text must be less than or equal to 2048 characters')
self.config.logger.warning('Text is too long, will be truncated to 2048 characters by the API')
params = {
'text': text,