From ea36b5fed9649ccfe66324f3ddc4348a8ad5ec70 Mon Sep 17 00:00:00 2001 From: Kaveen Kumarasinghe Date: Mon, 27 Mar 2023 00:29:31 -0400 Subject: [PATCH] Update openai_model.py Signed-off-by: Kaveen Kumarasinghe --- models/openai_model.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/models/openai_model.py b/models/openai_model.py index 5753041..63bd482 100644 --- a/models/openai_model.py +++ b/models/openai_model.py @@ -1143,9 +1143,9 @@ class Model: ) -> tuple[File, list[Any]]: # Validate that all the parameters are in a good state before we send the request words = len(prompt.split(" ")) - if words < 3 or words > 75: + if words < 1 or words > 75: raise ValueError( - "Prompt must be greater than 3 words and less than 75, it is currently " + "Prompt must be greater than 1 word and less than 75, it is currently " + str(words) )