powered by
This function extracts the usage data from the parsed HTTP response of an API call to the OpenAI chat completions endpoint.
usage(response)
a data frame with the usage statistics of the API call (how many tokens used)
a list object representing the HTTP response