Skip to contents

add_workflow_step adds another workflow to an existing one. By default it chains the new workflow to the previous one(s).

Usage

add_workflow_step(workflow_obj, workflow_obj_to_add, type = "chain")

Arguments

workflow_obj

the previous workflow object that you want to build on

workflow_obj_to_add

the workflow object you want to add on top of the existing one

type

the type of step you want to add to the existing workflow. Defaults to "chain".

Details

This function will add a new workflow to an existing one. By default the way the new workflow is added is by chaining it to the previous one. The way this works is that it will use the previous output of the last workflow element as input for the next one.

Examples

myflow_template <- ai_workflow() |> 
set_connector("ollama") |>
  set_model(model_name= "llama3.1:8b-instruct-q5_K_M") |> 
  set_n_predict(1000) |> 
  set_temperature(0.8) 
#> → Default IP address has been set to 127.0.0.1.
#> → Default port has been set to 11434.