Process httr2 response object
Usage
resp_process(
resp,
output = c("df", "jsonlist", "raw", "resp", "text", "tools")
)
Examples
if (FALSE) { # test_connection(logical = TRUE)
resp <- list_models("resp")
resp_process(resp, "df") # parse response to dataframe/tibble
resp_process(resp, "jsonlist") # parse response to list
resp_process(resp, "raw") # parse response to raw string
resp_process(resp, "text") # return text/character vector
resp_process(resp, "tools") # return tool_calls
}