Send a request to the Perplexity API and return the response
Source:R/service-perplexity.R
query_api_perplexity.Rd
This function sends a JSON post request to the Perplexity API, retries on failure up to three times, and returns the response. The function handles errors by providing a descriptive message and failing gracefully.
Usage
query_api_perplexity(request_body, api_key = Sys.getenv("PERPLEXITY_API_KEY"))