-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
I get a reproducible error where a fresh R session works for something like this as long as its sufficiently few rows (<5)
run_chat <- function(call_string) {
result <- call_string %c% "message"
return(result)
}
results <- map(test_df$call_string, run_chat)
for larger datasets, i.e. n = 10, i get something like this, although the index at which it occurs varies
HTTP error : Bad Request
Error inmap():
ℹ In index: 10.
Caused by error inmessages():
! Invalid parameter value. Expecting list or chatlog object.Backtrace:
▆
- ├─purrr::map(test_production$call_string, run_chat)
- │ └─purrr:::map_("list", .x, .f, ..., .progress = .progress)
- │ ├─purrr:::with_indexed_errors(...)
- │ │ └─base::withCallingHandlers(...)
- │ ├─purrr:::call_with_cleanup(...)
- │ └─global .f(.x[[i]], ...)
- │ └─call_string %c% "message"
- │ └─TheOpenAIR::chat(message = message, output = output)
- │ └─resp %>% messages() %>% add_to_chatlog(chatlog_id)
- ├─TheOpenAIR::add_to_chatlog(., chatlog_id)
- │ └─base::is.data.frame(msgs)
- └─TheOpenAIR::messages(.)
- └─base::stop("Invalid parameter value. Expecting list or chatlog object.")
After this error occurred once, simply using the chat() function throws the same error, which is resolved when I restart the session.
Metadata
Metadata
Assignees
Labels
No labels