Create a chat completion request to the Perplexity API
Source:R/service-perplexity.R
create_completion_perplexity.Rd
This function sends a series of messages alongside a chosen model to the Perplexity API to generate a chat completion. It returns the API's generated responses.
Usage
create_completion_perplexity(
prompt,
model = "mistral-7b-instruct",
api_key = Sys.getenv("PERPLEXITY_API_KEY")
)