resp_process | R Documentation |
Process httr2 response object
resp_process(
resp,
output = c("df", "jsonlist", "raw", "resp", "text", "tools")
)
resp |
A httr2 response object. |
output |
The output format. Default is "df". Other options are "jsonlist", "raw", "resp" (httr2 response object), "text", "tools" (tool_calls), "structured" (structured output). |
A data frame, json list, raw or httr2 response object.
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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.