This function sets up a POST request to the Perplexity API's chat/completions endpoint and includes necessary headers such as 'accept', 'content-type', and 'Authorization' with a bearer token.
Usage
request_base_perplexity(api_key = Sys.getenv("PERPLEXITY_API_KEY"))