-
Notifications
You must be signed in to change notification settings - Fork 2
/
README.Rmd
74 lines (47 loc) · 2.65 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
---
output: github_document
---
# mergen <img src="man/figures/mergen_logo.png" align="right" height="200" style="float:right; height:200px;"/>
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
### Overview
mergen employs artificial intelligence to convert data analysis questions into executable code, explanations, and algorithms. The self-correction feature ensures the generated code is optimized for performance and accuracy. mergen features a user-friendly chat interface, enabling users to interact with the AI agent and extract valuable insights from their data effortlessly.
### Installation
The easiest way to install mergen is via `install.packages`
```{r,eval=FALSE}
install.packages("mergen")
```
#### Development version
To get a bug fix or to use a feature from the development version, you can install the development version of mergen from GitHub.
```{r,eval=FALSE}
# install.packages("pak")
pak::pak("BIMSBbioinfo/mergen")
```
### Prerequisites
- Make an AI account
- [Create an OpenAI API key](https://platform.openai.com/account/api-keys) to use with the package
- [Create a replicate API key](https://replicate.com/pricing)
- Set up the API key in R
#### Configuring your AI API key
To interact with an AI API, you require a valid AI API key. To configure your key so that it is present globally in your environment at all times, you can include it in your .Renviron file. This will ensure that the key is automatically loaded.
For setting up mergen, this variable should be called `AI_API_KEY`.
For more information on setting up an agent, we recommend you visit __Get Started__ .
__Caution:__ If you’re using version control systems like GitHub, include .Renviron in your .gitignore file to prevent exposing your personal API key.
Here is how to open your .Renviron file for modification in your project:
```{r,eval=FALSE}
require(usethis)
edit_r_environ(scope="project")
```
For a persistent loading of your API key, add the following line to your .Renviron file replacing `"your_key"` with your key.
```{r,eva=FALSE}
AI_API_KEY="your_key"
```
__NOTE:__ After setting up your API key in the .Renviron file, either restart the R session or run `readRenviron(".Renviron")` to apply the changes.
If you however wish to set this variable only for a single session, you can use the following command:
```{r,eval=FALSE}
Sys.setenv(AI_API_KEY="your_key")
```
### Getting help
If you encounter a clear bug, please file an issue with a minimal reproducible example on [GitHub](https://github.com/BIMSBbioinfo/mergen). There you can also post further questions.