Skip to contents

set_seed sets the seed for the model.

Usage

set_seed(workflow_obj, seed)

Arguments

workflow_obj

an ai_workflow object created by ai_workflow() in the first place.

seed

the seed to be used by the model in the workflow, if you intend to fix it. The same seed will give the same answer. It is interesting to fix it if you want to compare the effect of other parameters.

Value

the workflow object with the seed to be applied.

Details

Set the seed to be used by the model in the workflow.

Examples

my_workflow <- ai_workflow() |> 
set_model(model_name="llama3:8b-instruct-q5_0") |> 
set_seed(12312312312)