Skip to content

Classify workflow

ClassifyWorkflow #

ClassifyWorkflow(question: str, options: list[str])

Bases: Workflow

A workflow for classification tasks.

This class represents a classification workflow where a question is presented along with a list of possible options for classification.

Parameters:

Name Type Description Default
question str

The classification question to be presented.

required
options list[str]

A list of possible classification options.

required

Attributes:

Name Type Description
_question str

The classification question.

_options list[str]

The list of classification options.

Source code in src/rapidata/rapidata_client/workflow/classify_workflow.py
def __init__(self, question: str, options: list[str]):
    super().__init__(type="SimpleWorkflowConfig")
    self._question = question
    self._options = options