Skip to contents

set_presence_penalty sets the presence penalty related to the model in the workflow.

Usage

set_presence_penalty(workflow_obj, presence_penalty)

Arguments

workflow_obj

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

presence_penalty

the presence penalty value used by the model. A value closer to 1 encourages the model to generate more novel and diverse text. A lower value, closer to 0, encourages cliche phrases.

Details

Set the presence_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_presence_penalty(0.9)