Skip to content

Commit 0c4e7f0

Browse files
Fix CLI tool for generating JSONL for classifications (#62)
Edited line 597 to match condition in line 242, "classifications". Also edited line 243 to match documentation ("label", not "labels").
1 parent 26fbacb commit 0c4e7f0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

openai/cli.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ def prepare_data(cls, args, purpose):
240240
optional_fields = ["metadata"]
241241

242242
if purpose == "classifications":
243-
required_fields = ["text", "labels"]
243+
required_fields = ["text", "label"]
244244
else:
245245
required_fields = ["text"]
246246

@@ -594,7 +594,7 @@ def help(args):
594594
action="store_true",
595595
help="Auto accepts all suggestions, without asking for user input. To be used within scripts.",
596596
)
597-
sub.set_defaults(func=partial(Search.prepare_data, purpose="classification"))
597+
sub.set_defaults(func=partial(Search.prepare_data, purpose="classifications"))
598598

599599
sub = subparsers.add_parser("answers.prepare_data")
600600
sub.add_argument(

0 commit comments

Comments
 (0)