---
title: "Ask ChatGPT"
author: "Duncan Golicher"
date: "3/20/2023"
output: html_document
---

```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)

library(tidyverse)

library(chatgpt)

Sys.setenv(OPENAI_API_KEY = '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')

```


```{r, echo=FALSE}
ask_chatgpt("Wwite an essay elaborating on the main theories that explain why biodiversity is higher in the tropics?") ->a
```

`r a`
