Base
          GeneratorTask
¶
  
            Bases: _Task, GeneratorStep
GeneratorTask is a class that implements the _Task abstract class and adds the
GeneratorStep interface to be used as a step in the pipeline.
Attributes:
| Name | Type | Description | 
|---|---|---|
llm | 
          
             the   | 
        |
group_generations | 
          
             whether to group the   | 
        |
num_generations | 
          
             The number of generations to be produced per input.  | 
        
Source code in src/distilabel/steps/tasks/base.py
              
          Task
¶
  
            Bases: _Task, Step
Task is a class that implements the _Task abstract class and adds the Step
interface to be used as a step in the pipeline.
Attributes:
| Name | Type | Description | 
|---|---|---|
llm | 
          
             the   | 
        |
group_generations | 
          
             whether to group the   | 
        |
num_generations | 
          
             The number of generations to be produced per input.  | 
        
Source code in src/distilabel/steps/tasks/base.py
              
          format_input(input)
  
  
      abstractmethod
  
¶
  Abstract method to format the inputs of the task. It needs to receive an input as a Python dictionary, and generates an OpenAI chat-like list of dicts.
Source code in src/distilabel/steps/tasks/base.py
            
          
          process(inputs)
¶
  Processes the inputs of the task and generates the outputs using the LLM.
Parameters:
| Name | Type | Description | Default | 
|---|---|---|---|
inputs | 
          
                StepInput
           | 
          
             A list of Python dictionaries with the inputs of the task.  | 
          required | 
Yields:
| Type | Description | 
|---|---|
                StepOutput
           | 
          
             A list of Python dictionaries with the outputs of the task.  |