Skip to contents

set_custom_processing_skill sets a custom made processing skill to give to the workflow.

Usage

set_custom_processing_skill(workflow_obj, filepath)

Arguments

workflow_obj

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

filepath

the file path where you have saved the processing skill. It needs to be a ".txt" file.

Value

the workflow object with the appropriate processing skill applied on the prompt vector(s)

Details

This sets a custom processing skill that you want to give to the workflow. You can create a template of the skill file by using the create_custom_processing_skill() function.

Examples

create_custom_processing_skill("write_poem.txt",
  system_prompt = "You are an AI specialized in writing poems like in the 18th century.",
  chat_prompt = "Write a poem based on the following text extract:", 
  final_guidance = "Only return the poem and nothing else. Do not add comments.")
#> → The file at write_poem.txt has been filled with a processing skill template. 
#> → You can now customize it, and load it once you are done with the set_custom_processing_skill() function.
my_workflow <- ai_workflow() |> 
  set_model(model_name="llama3:8b-instruct-q5_0") |> 
  set_custom_processing_skill("write_poem.txt")