Skip to contents

set_mode sets the mode of the model in the workflow. This usually means either 'chat', 'completion' or 'embeddings'.

Usage

set_mode(workflow_obj, mode)

Arguments

workflow_obj

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

mode

the mode to be used by the model in the workflow - it needs to be either 'chat', 'completion' or 'embeddings'.

Value

the workflow object with the mode to be used applied as a new parameter.

Details

This sets the mode of the model in the workflow. This usually means either 'chat','completion' or 'embeddings'.

Examples

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