Skip to contents

set_frequency_penalty sets the frequency penalty related to the model in the workflow.

Usage

set_frequency_penalty(workflow_obj, frequency_penalty)

Arguments

workflow_obj

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

frequency_penalty

the frequency penalty value used by the model. A higher value (closer to 1) makes the AI avoid repeating words or phrases, while a lower value (closer to 0) allows for more repetitions.

Value

the workflow object with the frequency penalty specified as new parameter to be applied.

Details

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

Examples

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