---
title: "Perplexity"
output: rmarkdown::html_vignette
vignette: >
%\VignetteIndexEntry{Perplexity}
%\VignetteEngine{knitr::rmarkdown}
%\VignetteEncoding{UTF-8}
---
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>"
)
```
### Creating an Perplexity Account
- Go to the [Perplexity website](https://perplexity.ai/) and sign up.
- Verify your account as instructed.
### Creating an Perplexity API Key
- Log into your Perplexity account and navigate to the [API documentation](https://docs.perplexity.ai/).
- Create an API key following their guidelines. Check Perplexity's API documentation for more details.
### Setting the Perplexity API Key in .Renviron
To modify the `.Renviron` file:
```{r}
#| eval: false
require(usethis)
edit_r_environ()
```
For a persistent setting, add the following line to `.Renviron`, replacing `""` with your actual Perplexity API key:
```bash
PERPLEXITY_API_KEY=""
```
Save the file and restart your R session for the changes to take effect.
**Caution:** Ensure `.Renviron` is not exposed if using version control systems.