-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
974 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
OPENAI_API_KEY= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
|
||
# dependencies | ||
/node_modules | ||
/.pnp | ||
.pnp.js | ||
|
||
# testing | ||
/coverage | ||
|
||
# next.js | ||
/.next/ | ||
/out/ | ||
|
||
# production | ||
/build | ||
|
||
# misc | ||
.DS_Store | ||
|
||
# debug | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# env files | ||
.env | ||
.env.local | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,37 @@ | ||
# InfoQuest | ||
# OpenAI API Quickstart - Node.js example app | ||
|
||
<p align="center"> | ||
<img src="https://user-images.githubusercontent.com/93431609/206532401-24b430fd-d966-4fde-a88f-4b8524f8c371.png" /> | ||
</p> | ||
This is an example pet name generator app used in the OpenAI API [quickstart tutorial](https://beta.openai.com/docs/quickstart). It uses the [Next.js](https://nextjs.org/) framework with [React](https://reactjs.org/). Check out the tutorial or follow the instructions below to get set up. | ||
|
||
## Setup | ||
|
||
1. If you don’t have Node.js installed, [install it from here](https://nodejs.org/en/) | ||
|
||
2. Clone this repository | ||
|
||
3. Navigate into the project directory | ||
|
||
```bash | ||
$ cd openai-quickstart-node | ||
``` | ||
|
||
4. Install the requirements | ||
|
||
```bash | ||
$ npm install | ||
``` | ||
|
||
5. Make a copy of the example environment variables file | ||
|
||
```bash | ||
$ cp .env.example .env | ||
``` | ||
|
||
6. Add your [API key](https://beta.openai.com/account/api-keys) to the newly created `.env` file | ||
|
||
7. Run the app | ||
|
||
```bash | ||
$ npm run dev | ||
``` | ||
|
||
You should now be able to access the app at [http://localhost:3000](http://localhost:3000)! For the full context behind this example app, check out the [tutorial](https://beta.openai.com/docs/quickstart). |
Oops, something went wrong.