diff --git a/openai/validators.py b/openai/validators.py index 078179a44b..b7f6364084 100644 --- a/openai/validators.py +++ b/openai/validators.py @@ -423,7 +423,7 @@ def completions_space_start_validator(df): def add_space_start(x): x["completion"] = x["completion"].apply( - lambda x: ("" if x[0] == " " else " ") + x + lambda s: ("" if s.startswith(" ") else " ") + s ) return x