diff --git a/argilla-server/src/argilla_server/api/schemas/v1/chat.py b/argilla-server/src/argilla_server/api/schemas/v1/chat.py index 11f5184ac1..9fd93318d0 100644 --- a/argilla-server/src/argilla_server/api/schemas/v1/chat.py +++ b/argilla-server/src/argilla_server/api/schemas/v1/chat.py @@ -12,13 +12,14 @@ # See the License for the specific language governing permissions and # limitations under the License. +import os from pydantic import BaseModel, Field -MIN_MESSAGE_LENGTH = 1 -MAX_MESSAGE_LENGTH = 20000 +MIN_MESSAGE_LENGTH = int(os.getenv("ARGILLA_MIN_MESSAGE_LENGTH", 1)) +MAX_MESSAGE_LENGTH = int(os.getenv("ARGILLA_MAX_MESSAGE_LENGTH", 20000)) -MIN_ROLE_LENGTH = 1 -MAX_ROLE_LENGTH = 20 +MIN_ROLE_LENGTH = int(os.getenv("ARGILLA_MIN_ROLE_LENGTH", 1)) +MAX_ROLE_LENGTH = int(os.getenv("ARGILLA_MAX_ROLE_LENGTH", 20)) class ChatFieldValue(BaseModel):