Labelbox / labelbox-python

The data factory for next gen AI
https://labelbox.com
Apache License 2.0
111 stars 58 forks source link

[PLT-1207] Added prompt classification for python object support #1700

Closed Gabefire closed 2 months ago

Gabefire commented 2 months ago

Description

Please include a summary of the changes and the related issue. Please also include relevant motivation and context.

Type of change

Please delete options that are not relevant.

All Submissions

New Feature Submissions

Gabefire commented 2 months ago
prompt_annotation = lb_types.PromptClassificationAnnotation(
    name="test",
    value=lb_types.PromptText(answer="the answer to the text questions right here"),

)

response_annotation = lb_types.ClassificationAnnotation(
    name="response_radio",
    value=lb_types.Radio(answer = 
                         lb_types.ClassificationAnswer(
                             name="1"
                         ))
)

label = []
label.append(
    lb_types.Label(
        data={"global_key": "clxxmppe00p36073qc3qqfvkq"},
        annotations=[
            prompt_annotation,
            response_annotation
        ],
    ))