if (FALSE) {
set_api_key()
prompt <- "Is this study about a Functional Family Therapy (FFT) intervention?"
obj_with_error <-
tabscreen_gpt(
data = filges2015_dat[1:2,],
prompt = prompt,
studyid = studyid,
title = title,
abstract = abstract,
model = c("gpt-3.5-turbo-0613", "gpt-3.5-turbo-16k-0613"),
max_tries = 1,
reps = 10
)
obj_rescreened <-
obj_with_error |>
screen_error()
# Alternatively re-set max_tries if errors still appear
obj_rescreened <-
obj_with_error |>
screen_error(max_tries = 16)
}
Run the code above in your browser using DataLab