You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+11-3Lines changed: 11 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,11 +6,19 @@ This project takes an equation uses Chat GPT to do computations that the user sp
6
6
7
7
## How to Run
8
8
9
-
### Devcontainers (Nodejs 18)
9
+
### Prerequisites
10
10
11
-
This project uses devcontainers to make it easy to run. If you have VSCode and a working installation of Docker, you can just open the project in a container and it will automatically install all the dependencies and run the project.
11
+
Create an Open AI account and get an API key. Then, create a file called `.env.local` in the root directory and add the key to the environment variable `OPENAI_API_KEY`.
12
12
13
-
Once inside the devcontainer, run the following to get the Next.JS site to run:
13
+
```
14
+
OPENAI_API_KEY=************************
15
+
```
16
+
17
+
### Devcontainers/Codespaces (Nodejs 18)
18
+
19
+
This project uses devcontainers to make it easy to run. If you have VSCode and a working installation of Docker, you can just open the project in a container with a full IDE configuration. You can also open it in a codespace on GitHub.
20
+
21
+
Once inside the devcontainer, run the following to open the project in a browser.
<Linkas={NextLink}color='#c5aaff'href='https://github.com/hackathon-group-301/mathgpt#how-to-run'isExternal> Run this yourself <ExternalLinkIcon/></Link> or get in contact with us!
@@ -8,8 +8,6 @@ const configuration = new Configuration({
8
8
apiKey: process.env.OPENAI_API_KEY,
9
9
});
10
10
11
-
constopenai=newOpenAIApi(configuration);
12
-
13
11
14
12
constPROMPT_CONTEXT=`Make a math bot for school.
15
13
This bot helps with schoolwork by taking in a mathematical problem and solving it, outputting the intermediate steps as well. Mathematical symbols in the input and outputs, as well as the steps, are all done in LaTeX.
0 commit comments