Skip to content

Commit

Permalink
fix: prevent IndexError in fine-tunes CLI (#768)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-bot committed Nov 10, 2023
1 parent b185cb3 commit 460a282
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/openai/lib/_validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ def completions_space_start_validator(df: pd.DataFrame) -> Remediation:
"""

def add_space_start(x: Any) -> Any:
x["completion"] = x["completion"].apply(lambda x: ("" if x[0] == " " else " ") + x)
x["completion"] = x["completion"].apply(lambda s: ("" if s.startswith(" ") else " ") + s)
return x

optional_msg = None
Expand Down

0 comments on commit 460a282

Please sign in to comment.